Generalized Smokers Problem

Generalized Smokers Problem

Extended smokers problem allowing ingredient accumulation on table. Uses integer counters instead of booleans to track multiple ingredient instances, demonstrating scoreboard pattern where threads check state and react accordingly to available resources.

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.