Process Synchronization – Hilzer Barbershop Problem

Process Synchronization – Hilzer Barbershop Problem

Complex barbershop with 3 barbers, 4 sofa seats, 20 capacity, and single cash register. Uses dual queues, multiplexing, and payment synchronization. Demonstrates advanced concurrent resource management with capacity constraints and FIFO ordering.

Process Synchronization – FIFO Barbershop

Process Synchronization – FIFO Barbershop

Extends barbershop problem with FIFO service ordering. Each thread has personal semaphore in queue ensuring first-come-first-served. Barber removes and signals threads sequentially maintaining arrival order through queue management and mutex protection.

Process Synchronization – Barbershop Problem

Process Synchronization – Barbershop Problem

Classical Dijkstra barbershop problem with waiting room capacity. Customers balk when full, barber sleeps when idle. Solution combines scoreboard and dual rendezvous patterns ensuring mutual exclusion during haircuts with proper wake-sleep coordination.

Process Synchronization – Dining Savages Problem

Process Synchronization – Dining Savages Problem

Addresses communal dining synchronization with finite pot capacity. Cook-savage coordination using scoreboard pattern and rendezvous. Ensures pot refilled when empty and savages wait for cook, demonstrating deadlock-free producer-consumer variant.

POSIX Threads – Utility Code and Wrappers

POSIX Threads – Utility Code and Wrappers

Presents utility code for POSIX Threads with error checking wrappers. Covers pthread_create, pthread_join, semaphore initialization, and compilation with -lpthread flag. Includes structure semantics and pointer handling for thread-safe code.