Dining Philosopher's problem is a :

2015

Dining Philosopher's problem is a :

  1. A.

    Producer - consumer problem

  2. B.

    Classical IPC problem

  3. C.

    Starvation problem

  4. D.

    Synchronization primitive

Attempted by 474 students.

Show answer & explanation

Correct answer: B

Answer: Dining Philosophers is a classical inter-process communication (IPC) and synchronization problem that illustrates resource-allocation issues such as deadlock and starvation.

  • Problem setup: Several philosophers sit around a table with one fork between each pair. To eat, a philosopher must hold both adjacent forks, so processes compete for shared resources.

  • Key issues demonstrated: deadlock (e.g., every philosopher holds one fork and waits forever), starvation (some philosophers may never get both forks), and the need for proper synchronization.

  • Typical solution approaches: use semaphores or mutexes; impose an ordering on resources (number forks and pick lower-numbered first); limit the number of philosophers that may try to pick up forks at once; or use asymmetric pick-up strategies to avoid circular wait.

  • Why other labels are incorrect: the producer–consumer problem deals with a bounded buffer and different coordination patterns; starvation is a possible effect but not the full problem definition; a synchronization primitive is a tool (like a semaphore), not the concurrency problem itself.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor