Question 57

Computer Awareness Process and Thread Managements Easy

'The Dining Philosopher' problem can be solved by: $$ \text{(a) Use of semaphores } $$ $$ \text{ (b) Use of overlays } $$ $$ \text{ (c) Mutual exclusion } $$ $$ \text{(d) Bounded waiting} $$

(A) a
(B) b
(C) c
(D) d
View Dynamic Solution & Explanation
Correct Solution: Option A

Step-by-step Solution:

Solution:

The Dining Philosopher problem is a classic synchronization problem that illustrates issues like deadlock and resource contention. It involves philosophers sitting at a table, each needing two forks (shared resources) to eat.

To prevent deadlock and ensure proper synchronization, we can use:

  • Semaphores: Counting or binary semaphores control access to the shared forks.

Other options like overlays, mutual exclusion, and bounded waiting are concepts related to process management, but the direct mechanism to solve this problem is the use of semaphores.

Answer: (a) Use of semaphores