Questions: Critical Section Problem: Formal Definition

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A lock implementation ensures mutual exclusion (no two processes in the critical section at once) and liveness (every process that enters eventually leaves). Does this satisfy all three formal requirements of the critical section problem?

AYes — mutual exclusion and liveness together imply all three requirements
BNo — the implementation may still allow a process to be indefinitely postponed (violating bounded waiting) even while the system as a whole makes progress
CNo — mutual exclusion already subsumes both progress and bounded waiting
DYes — as long as no process waits forever overall, bounded waiting is trivially satisfied
Question 2 Multiple Choice

Peterson's algorithm achieves mutual exclusion, progress, and bounded waiting for two processes on paper. Why does it fail on modern multicore hardware?

AModern CPUs execute too quickly for the algorithm's timing assumptions to hold
BCPUs and compilers reorder memory operations for performance, invalidating the memory-ordering guarantees that Peterson's algorithm relies on
CThe algorithm requires atomic read-modify-write operations not available without special hardware
DPeterson's algorithm is only defined for three or more processes, not for two
Question 3 True / False

Bounded waiting is violated if one process is perpetually denied entry to the critical section while other processes successfully enter and exit, even if the system overall continues making progress.

TTrue
FFalse
Question 4 True / False

Mutual exclusion implies progress: if at most one process can be in the critical section at a time, processes waiting to enter will typically be able to do so in finite time.

TTrue
FFalse
Question 5 Short Answer

Explain the difference between the 'progress' requirement and the 'bounded waiting' requirement in the critical section problem. Why are both necessary?

Think about your answer, then reveal below.