Simulates citizenship ceremony with immigrants, judge, and spectators. Covers check-in process, oath confirmation, and certificate distribution with turnstile control. Extended version ensures all immigrants leave before next ceremony begins.
Explores bus boarding synchronization with 50-passenger capacity constraint. Two solutions presented: pass-the-baton pattern and I-will-do-it-for-you pattern. Bus departs only when full, with mutex protection and multiplex control.
Analyzes Dean-student synchronization where Dean searches empty rooms or breaks up parties with 50+ students. Uses turnstiles, rendezvous patterns, and pass-the-baton technique with state tracking for complex constraint enforcement.
Advanced child care synchronization ensuring 1:3 adult-to-child ratio. Uses scoreboard pattern, queues, and I-will-do-it-for-you technique. Prevents deadlock while maximizing resource utilization with waiting and leaving constraints.
Covers sushi bar synchronization where customers wait when capacity reaches 5 seats. Demonstrates pass-the-baton and I-will-do-it-for-you patterns. Includes child care problem with adult-child ratio constraints and deadlock prevention.