- No process calls itself.
- The process holding L1 calls P3.
- P2 does not hold L3.
- P3 does not call P1.
- The process calling P1 holds L2.
02 / the first morning
Andy arrived on Monday at 8:47. Fourth floor, last desk on the left, next to the vending machine that dispensed only error codes.
He sat down. The chair squeaked. The monitor was already on.
Before he could type his password, the terminal flashed red.
[ALERT] INC-0002 — Process freeze detected, P1 unresponsive for 5min
[ALERT] Three processes unresponsive since 09:17:33
[ALERT] Lock contention cycle suspected
Bob materialized behind him. Andy had not heard him approach.
“Don’t log in yet.” Bob set his coffee on the desk. “Your first ticket just came in.”
He leaned over Andy’s shoulder and pointed at the screen.
“Three processes. Each one grabbed a lock and then tried to call another process. Now they’re all waiting. Nothing moves.”
Andy stared at the alert. “A deadlock?”
“A perfect one. Three processes, three locks, one cycle. Figure out which process completes the loop — that’s the one we kill to break the freeze.”
Three processes froze. Each one grabbed a lock and then tried to call another process. Now they're all waiting on each other. Classic circular wait.
P1 was the last process called before the hang. Whatever called P1 is the one we kill to break the cycle.
Left columns are processes. Right columns are call targets. Top rows are locks, bottom rows are call targets. The blacked-out corner is where call targets cross themselves — ignore it. Each process holds one lock and calls one other process.
Find the process that called P1. Enter it as: process, lock, called process.
fault
Process deadlock — circular lock dependency
scenario
prod / first incident
freeze time
09:17:33
| P1 | P2 | P3 | →P1 | →P2 | →P3 | |
|---|---|---|---|---|---|---|
| L1 | ||||||
| L2 | ||||||
| L3 | ||||||
| →P1 | ||||||
| →P2 | ||||||
| →P3 |
Question: Which process closes the deadlock cycle? Enter: process, its lock, and the process it calls.