A. Readers ? writers problem
B. Dining ? philosophers problem
C. Producer ? consumer problem
D. None of the mentioned
A. Count the number of empty and full buffers
B. Count the number of empty and full memory spaces
C. Count the number of empty and full queues
D. None of the mentioned
A. There is only one buffer
B. There are n buffers ( n being greater than one but finite)
C. There are infinite buffers
D. The buffer size is bounded
A. Readers
B. Writers
C. Readers and writers
D. None of the mentioned
A. 5 philosophers and 5 chopsticks
B. 4 philosophers and 5 chopsticks
C. 3 philosophers and 5 chopsticks
D. 6 philosophers and 5 chopsticks
Explanation: 1. DefinitionOne-liner: It is a classical synchronization problem used to model the challenges of allocating multiple shared resources among several processes without causing deadlock. 2. Primary CausesDeadlock: Occurs when all philosophers pick up their left fork simultaneously, leaving no right forks available (Circular Wait).Starvation: Occurs when a philosopher is indefinitely unable to acquire both forks because their neighbors are constantly alternating eating and thinking.3. Key Solutions (Deadlock Prevention)Resource Hierarchy: Assign numbers to forks and require philosophers to always pick up the lower-numbered fork first.Limitation: Allow only $n-1$ philosophers (e.g., 4 out of 5) to sit at the table simultaneously.Asymmetric Strategy: Have even-positioned philosophers pick the right fork first and odd-positioned philosophers pick the left fork first.Atomicity: Use a Monitor or Semaphore to ensure a philosopher only picks up forks if both are available at the same time.
A. Necessarily eliminates the possibility of starvation
B. Does not necessarily eliminate the possibility of starvation
C. Eliminates any possibility of any kind of problem further
D. None of the mentioned
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
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
A. Mutual exclusion but not progress
B. Progress but not mutual exclusion
C. Neither mutual exclusion nor progress
D. Both mutual exclusion and progress
Explanation: The while(S1==S2) or while(S1!=S2) loops will work as a mutex. When either P1 or P2 enters the Critical section (CS), they will make sure to change the values of S1 or S2 upon exit from the CS such that the other process enters the CS while that process waits on the mutex.