Wednesday, January 17, 2007

OS 3

What is the cost for a context-switch?
Do virtualized processes really run in about 1/n slower than real CPU?
What economies can you gain by duplicate a subset of state data?
Why is it so difficult to get an "isolated" process today?
Try to debug the results of multiple processes that share state data!
What is the probability of a race condition when you have two processes that both read, increment, then write?
Break down operations into their atomic units aka "critical section".
Why do you need compiler support to atomicity in a uniprocessor environment?
No trap + No interrupt = No context switch
How can you mask interrupts?
Don't mask interrupts by increasing the thread's priority only to have your thread go into an infinite loop.
What are the pros and cons of locking a thread?
What idiomatic expression connotes acquiring and releasing the lock?
Don't disable preemption and then go into an infinite loop.
When implementing multiprocessing locks, how can you leverage the hardware?
Can you build up a lock from more primitive instructions?
What is a "spin lock"?
What are the issues associated with spinning?

No comments: