Back to the 2024 paper

Module 3: Inter-process Communication

20242m

In Peterson's solution for two processes, which condition ensures mutual exclusion?
(i) Both processes wait infinitely
(ii) Only one process enters the critical section at a time
(iii) Both processes enter the critical section together
(iv) The process with a higher ID always wins

Worked SolutionAI Assisted

Answer: (ii) Only one process enters the critical section at a time

Peterson's flags+turn ensures mutual exclusion, progress, bounded waiting for 2 processes without hardware support.

Similar questions

Budget AppAndroid App

Pocketly on Android

Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.