Mutual Exclusion and Synchronization
Mutual Exclusion and Synchronization
1. To enforce …………………. two functions are provided enter-critical and exit-critical, where each function takes
as an argument the name of the resource that is the subject of competition.
A) Mutual Exclusion B) Synchronization C) Deadlock D) Starvation
2. In ………………. only one process at a time is allowed into its critical section, among all processes that have
critical sections for the same resource.
A) Mutual Exclusion B) Synchronization C) Deadlock D) Starvation
3. Which of the following facilities or capacities are required to provide support for mutual exclusion?
i) A process that halts in its noncritical section must do so without interfering with other processes.
ii) The assumption should be made about relative process speeds or the number of processors.
iii) A process remains inside its critical section for a finite time only
A) i and ii only B) ii and iii only C) i and iii only D) All i, ii and iii
4. The use of special machine instruction to enforce mutual exclusion has the following advantages.
i) It is applicable to any number of processes on either a single processor or multiple processors sharing main memory.
ii) It is simple therefore easy to verify iii) It can be used to support multiple critical sections.
A) i and ii only B) ii and iii only C) i and iii only D) All i, ii and iii
5. Which of the following is/are the disadvantages of the machine instruction approach to enforce mutual exclusion.
i) Busy waiting employees ii) hard to verify iii) starvation is possible iv) Deadlock is possible
A) i, ii and iii only B) ii, iii and iv only C) i, iii and iv only D) All i, ii, iii and iv
6. ………………. When a process leaves a critical section and more than one process is waiting, the selection of a
waiting process is arbitrary.
A) Busy waiting is employed B) Starvation is possible
7. ……………………. techniques can be used to resolve conflicts, such as competition for resources, and
synchronize processes so that they can co-operate.
A) Mutual Exclusion B) Synchronization C) Deadlock D) Starvation
8. State whether the statements are True or False for the operations of semaphore.
ii) The wait operation decrements the semaphore value iii) The single operation increments the semaphore value.
A) i and ii only B) ii and iii only C) i and iii only D) All i, ii and iii
9. A semaphore whose definition includes the fairest policy First-in-First-Out (FIFO) is called a …………….
A) binary semaphore B) strong semaphore C) weak semaphore D) multi semaphore
10. A semaphore that does not specify the order in which processes are removed from the queue is a ……………
A) binary semaphore B) strong semaphore C) weak semaphore D) multi semaphore
11. For semaphores and binary semaphores, a ………………… is used to hold processes waiting on the semaphore.
A) Stack B) Queue C) Tree D) Graph
12. ……… are used for signaling among processes and can be readily used to enforce a mutual exclusion discipline.
A) Semaphores B) Messages C) Monitors D) Addressing
13. Semaphores provide a primitive yet powerful and flexible tool for enforcing mutual exclusion and for co-
coordinating processes called …………
A) monitor B) message passing C) strong semaphore D) binary semaphore
14. State whether the following statements are correct for the characteristics of the monitor
i) The local data variables are accessible not only by the monitors’ procedures but also by the external procedure.
15. ……………. lends itself to implementation in distributed systems as well as in shared-memory multiprocessor
and uni-processor systems.
A) monitor B) message passing C) strong semaphore D) binary semaphore
16. A ……… is a software module consisting of one or more procedures, an initialization sequence, and local data.
A) monitor B) message passing C) strong semaphore D) binary semaphore
17. State whether the following statements are True or False for the communication of message between two
processes.
i) The receiver cannot receive a message until it has been set by another process.
ii) We need to specify what happens to a process after it issues a send or receives primitive.
A) i-True, ii-False B) i-False, ii-True C) i-True, ii-True D) i-False, ii-False
18. With ………………. they send primitive includes a specific identifier of the destination processes.
A) direct addressing B) indirect addressing
19. In ………………. messages are not sent directly from sender to receiver but rather are sent to a shared data
structure consisting of queues that can temporarily hold messages.
A) direct addressing B) indirect addressing
20. ……………………… are useful for the enforcement of mutual exclusion and provide an effective means of
inter-process communication.
A) Semaphores B) Messages C) Monitors D) Addressing