Module 04 · How Computers Work · Inside the operating system
Four ways to get stuck: deadlock
Concurrency and the Hardware · Open board
Two cores, one lock, and the rule that only one core may hold it at a time. This lesson is what happens when there are two locks and each core is holding the one the other wants.
Before you start. A lock lets only one thread at a time near a shared value, and a thread that cannot get it has to wait (Concurrency & the Hardware). A waiting thread is set aside by the scheduler and gets no turns until something wakes it, so it costs nothing while it waits (Waiting without spinning). Waiting is safe. This lesson is about the one way waiting can last forever.
Lesson 16 of 19 in How Computers Work
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year, or $19.50 for your first year with LAUNCH50, ends 1 Nov, 18:30 UTC.