2026 · Completed 2026 · STATUS: COMPLETED
Kernel Deadlock Detection
Deadlock detection in the xv6-riscv kernel: it walks the lock-ownership chain before a process blocks and reports cycles through a new system call.
-
C
- xv6-riscv
Overview
An Operating Systems course project. I added deadlock detection to the xv6-riscv teaching kernel.
What I Built
- Before a process blocks on a sleeplock, the kernel walks the lock-ownership chain to catch a cycle.
- The result is exposed to user programs through a new system call.
Testing
I tested it with a no-deadlock baseline and with a forced deadlock under load. It caught the deadlock with no false positives.