2-Review Questions
2-Review Questions
Part I: Write true if the statement is correct and false otherwise (1 pt each)
1. Peterson’s solution works correctly for more than two processors.
2. Semaphores can provide the same functionality as mutex locks.
3. A binary semaphore is functionally equivalent to a mutex lock.
4. Preemptive scheduling may cause starvation.
5. A non-preemptive kernel is essentially free from race conditions in single processor systems.
6. Round robin is better than FCFS in terms of response time
7. Under preemptive scheduling, when a process switches from the running to the ready state, it may lose
control of the CPU.
8. The multilevel feedback queue scheduling algorithm allows processes to migrate between different
queues.
Part II : Choose the best answer from the given alternatives (1pt each)
1. Which of the following components of program state are shared across threads in a multithreaded
process? (you may choose more than 1 option)
a. Register values b. Global variables c . Stack memory d. All
2. If a process is executing in its critical section, then no other processes can be executing in their critical
section. This condition is called
a) mutual exclusion b) critical exclusion c) synchronous exclusion d) asynchronous
exclusion
3. Which one of the following is a synchronization tool?
a) thread b) pipe c) semaphore d) socket
4. Binary semaphore is a shared integer variable
a) that can not drop below zero c) that can not drop below one
b) that can not be more than zero d) that can not be more than one