Course contentsShow
← Computer Science
Lesson 1277 of 2,87230. Process SynchronizationFree lesson

Bounded Waiting Property

Ensuring fairness by guaranteeing that a process will eventually enter its critical section after requesting access.

Bounded Waiting Property

What You'll Learn

You'll understand how the Bounded Waiting Property ensures that every process gets a fair turn to enter its critical section, preventing indefinite postponement.

The Fairness Guarantee

Imagine standing in line at a coffee shop where people keep cutting in front of you. No matter how long you wait, you never get served. Frustrating, right? In operating systems, the Bounded Waiting Property prevents this from happening to processes competing for access to critical sections.

This property guarantees that once a process requests entry to its critical section, there exists a limit (or bound) on the number of times other processes can enter their critical sections before this process gets its turn. In other words, no process should be starved indefinitely.

Why This Matters

Recall that we've already discussed two requirements for critical section solutions:

  • Mutual Exclusion: Only one process in the critical section at a time
  • Progress: If no process is executing in the critical section, the selection of the next process cannot be postponed indefinitely

Bounded Waiting adds the crucial fairness element. Without it, a process could theoretically wait forever while others repeatedly enter their critical sections. This would satisfy mutual exclusion and progress, but create an unfair, unacceptable system.

The Bound

The "bound" is typically expressed as: After process P requests entry, at most N-1 other processes (where N is the total number of competing processes) may enter before P must be granted access. More sophisticated systems may use tighter bounds.

This ensures that every waiting process makes measurable progress toward its goal, even in highly competitive scenarios.

Key Takeaway: The Bounded Waiting Property guarantees fairness by ensuring that any process requesting access to its critical section will eventually be granted entry within a finite, bounded number of turns, preventing starvation.