All processes share a semaphore variable mutex, initialized to 1. Each process must execute wait(mutex) before entering the critical section and signal(mutex) afterward.
Suppose a process executes in the following manner.
wait(mutex);
…..
critical section
…..
wait(mutex);
a) a deadlock will occur
b) processes will starve to enter critical section
c) several processes maybe executing in their critical section
d) all of the mentioned
Answer: a
Explanation: A deadlock will occur
Related Posts
For a deadlock to arise, which of the following conditions must hold simultaneously?
What are Multithreaded programs?
The request and release of resources are ___________
The number of resources requested by a process ____________
To avoid deadlock ____________
Which one of the following is a visual ( mathematical ) way to determine the deadlock occurrence?
A problem encountered in multitasking when a process is perpetually denied necessary resources is called ____________
Join The Discussion