Cigarette Smokers Problem

Cigarette Smokers Problem

Complex synchronization puzzle with agent distributing resources to three smokers. Addresses helper thread design (pushers), ingredient availability tracking, and deadlock avoidance in scenarios where multiple resources must be available before proceeding.

Dining Philosophers Problem

Dining Philosophers Problem

Classic synchronization problem with five philosophers sharing forks. Demonstrates deadlock scenarios, starvation concerns, and multiple solution approaches including resource limiting, asymmetric solutions, and Tanenbaum’s algorithm with state tracking.

Reader-Writer Priority and Starvation

Reader-Writer Priority and Starvation

Addresses writer starvation in reader-writer problems and priority solutions. Explains categorical starvation where readers prevent writers from executing, and demonstrates no-starve solutions using turnstiles to control reader access when writers queue.

No-Starve Mutex Solutions

No-Starve Mutex Solutions

Explores starvation prevention in mutex implementation. Discusses weak vs strong semaphores, Morris’s solution using dual turnstiles and waiting rooms, and bounded waiting guarantees to prevent thread starvation in mutual exclusion.

Producer-Consumer Problem

Producer-Consumer Problem

Presents classic producer-consumer synchronization using event buffers. Details constraints on buffer access exclusivity and consumer blocking on empty buffers, with solutions using items and spaces semaphores for finite buffer handling.