1. What is a race condition?
2. What is a critical section?
3. What are the three requirements that a solution to the critical-section problem must satisfy.
4. Why does this Algorithm 1 not satisfy the progress requirement?
5. Describe the how an OS implements a semaphore.
6. How does the test&set instruction solve the critical section problem?
7. What are the four conditions necessary for deadlock to occur?
8. What is the difference between deadlock prevention and deadlock avoidance?
9. a) List and describe the 4 necessary conditions for deadlock.
9. b) Does starvation imply deadlock? Does deadlock imply starvation?
10. Consider a 4-way stop sign, with traffic from all four directions. The law states that, if one or more cars come to a stop at the same time, the car on the right has the right of way. Does the rule "yield to the car on the right" prevent deadlock? Why or why not?
11. Why is the “dirty” or “modified” bit necessary in a virtual memory system?
12. Why are page sizes always a power of 2?
13. What is a TLB and what is its purpose?
14. Consider a system which has a page size of 1KB. If a process requires 10000 bytes, indicate how much internal fragmentation has occurred, and how much external fragmentation has occurred.
15. What is meant by the term “re-entrant code”?
16. Consider a logical address space of eight pages of 1,024 words each, mapped onto a physical memory of 32 frames. a) How many bits are there in the logical address? b) How many bits are there in the physical address?
17. Given memory partitions of 100K, 500K, 200K, 300K, and 600K (in that order), how would each of the first-fit, best-fit, and worst- fit algorithms place processes of 212K, 417K, 112K, and 426K (in that order)? Which algorithm makes the most efficient use of memory?