Classical Synchronization Problems – Overview

Classical Synchronization Problems – Overview

Comprehensive overview of classical synchronization problems including producer-consumer, reader-writer, and dining philosophers. Discusses real-world analogies to OS problems and presents foundational synchronization constraints and patterns.

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.