Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M3837

Sleeping Barber Problem

Sleeping Barber Problem
SystemsHigh supportSystems Theory
Included
account_tree

Updated 2026-07-28

Loading revision record…

Summary

In computer science, the sleeping barber problem is a classic inter-process communication and synchronization problem that illustrates the complexities that arise when there are multiple operating system processes.

Definition

In computer science, the sleeping barber problem is a classic inter-process communication and synchronization problem that illustrates the complexities that arise when there are multiple operating system processes. The problem was originally proposed in 1965 by computer science pioneer Edsger Dijkstra, who used it to make the point that general semaphores are often superfluous.

How to use

In computer science, the sleeping barber problem is a classic inter-process communication and synchronization problem that illustrates the complexities that arise when there are multiple operating system processes.

Mechanism

A classic concurrency synchronization problem in operating systems: how to coordinate customer arrivals, waiting, and wake-up when the barber is asleep or busy, demonstrating inter-process synchronization, mutual exclusion, and avoidance of deadlock and starvation.

Practice

In progress 0/3

Practice this model in one real situation:

Check to track your progress (stored locally)
Learning progress0%

Cases

  • In a thread pool, workers sleep when idle and are woken up when tasks arrive; service rate limiting and queueing.

Common pitfalls

  • Ignoring lost wakeups can lead to permanent sleep or starvation; improper lock granularity can cause poor performance.
Sources

Source support: Explicit

References currently contain only Wikipedia links; primary sources still need review.

  • link
    en.wikipedia.orghttps://en.wikipedia.org/wiki/Sleeping_barber_problemZH · Explicit
    verified
account_treeGenealogyexpand_more

RELATED MODELS