indicogniBuild a VMM

Lab

Lock order

Used in chapter 09, the host-concurrency primer.

Be the scheduler for two threads and their locks: step them into a deadlock, see the cycle, fix the order, then make a condvar lose its wake-up.

Runs in browser
The deadlock from deadlock.rs as a wait-for cycle After four steps (vCPU thread locks device, stdin thread locks input, vCPU thread asks for input, stdin thread asks for device) the device lock is held by the vCPU thread, which waits for the input lock, which is held by the stdin thread, which waits for the device lock. The arrows form a cycle, so neither thread can ever move. If both threads take device first, the cycle cannot form. device vCPU thread input stdin thread held by waits for held by waits for cycle

All labs