Process synchronization simulators
Experiment with locks and semaphores.
Module 3
Session 3.4
Lesson 2 of 2
Process Synchronization Interactive Simulators
Producer-Consumer Problem
Demonstrates bounded-buffer synchronization using semaphores (Mutex, Empty, Full).
Readers-Writers Problem
Multiple readers can access data concurrently, but writers require exclusive access.
Shared Database
IDLE
Active Operations
Queue
Dining Philosophers Problem
Illustrates allocation of limited shared resources (forks/spoons) without triggering deadlock.
Philosopher State Transition Lifecycle:
- THINKING (Gray): Default state. The process is executing remainder section code and does not require shared utensils. Utensils remain unlit/gray.
- HUNGRY (Orange): The process requests access to its left and right utensils (entering the entry section). It remains blocked until both adjacent utensils become free.
- EATING (Green): Both left and right utensils are successfully acquired (
wait()calls pass). The utensil icons highlight bright cyan representing exclusive lock acquisition during critical section execution.