Banker's Algorithm: Deadlock Avoidance Through Safe State Detection

    The Banker’s Algorithm The Banker’s Algorithm is a deadlock avoidance algorithm developed by Edsger Dijkstra in 1965. It models a bank that has limited cash and customers with credit limits who request loans in chunks. The bank only grants loans if the system stays in a “safe state” - meaning it can fulfill all future maximum requests. The Scenario A bank has: Limited cash available Multiple customers with credit limits Customers request loans in chunks over time The rules: ...

    November 18, 2025 · 14 min · Rafiul Alam

    Drinking Philosophers: Generalized Resource Contention

    The Drinking Philosophers Problem The Drinking Philosophers Problem is a generalization of the classic Dining Philosophers Problem, proposed by K. M. Chandy and J. Misra in 1984. Unlike the dining version where philosophers share forks with immediate neighbors in a circle, drinking philosophers share bottles with arbitrary neighbors based on a conflict graph. This makes it much more realistic for modeling real-world resource allocation. The Scenario The drinking party has: ...

    November 18, 2025 · 12 min · Rafiul Alam

    The Elevator Problem: Scheduling and Load Balancing

    The Elevator Problem The Elevator Problem is a classic scheduling and optimization challenge that models how multiple elevators coordinate to serve passengers efficiently. It demonstrates load balancing, scheduling algorithms, optimization trade-offs, and decentralized coordination. Unlike many concurrency problems, it focuses on real-time decision-making and multi-objective optimization. The Scenario A building has: N elevators moving between floors M floors Passengers arriving at random floors with random destinations Call buttons (up/down) on each floor Destination buttons inside each elevator The goals: ...

    November 18, 2025 · 14 min · Rafiul Alam