Question:

The Dining Philosopher problem can be solved by:

Show Hint

In the Dining Philosopher problem, semaphores are used to avoid deadlock and ensure mutual exclusion while sharing resources.
Updated On: Sep 25, 2025
  • Use of semaphores
  • Use of overlays
  • Mutual exclusion
  • Bounded waiting
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation


Step 1: Definition of the Dining Philosopher Problem.
The Dining Philosopher problem is a synchronization problem that models the situation where multiple philosophers share a set of resources (e.g., forks), but need to avoid deadlock and ensure that they can eat in turn.

Step 2: Use of semaphores.
Semaphores are used in operating systems to manage synchronization. In the Dining Philosopher problem, semaphores can be used to ensure that only one philosopher can pick up a fork at a time, thus avoiding deadlock and ensuring mutual exclusion.

Step 3: Explanation of other options.
- (2) Use of overlays: Overlays refer to a technique in memory management and are not relevant to the solution of the Dining Philosopher problem.
- (3) Mutual exclusion: While mutual exclusion is required to avoid deadlock, semaphores specifically are used to enforce this in the context of the Dining Philosopher problem.
- (4) Bounded waiting: Bounded waiting ensures that no process waits indefinitely, but it is not the primary solution to the problem.

Step 4: Conclusion.
The correct answer is **(1) Use of semaphores**, which ensures that philosophers can safely pick up and put down forks without causing deadlock.

Was this answer helpful?
0
0

Questions Asked in CUET PG exam

View More Questions