Skip to content
Tech Atlas, home
Search
Esc
  • All roadmapsBrowse every learning path
  • ExploreFind a technology area
  • ProjectsGuided projects and builds
  • My AtlasYour learning dashboard
Skill

Deadlocks & Liveness

Recognize, prevent and debug deadlocks, livelock, starvation and priority inversion in concurrent programs.

Intermediate1 roadmap

4 objectives 6 steps about 115 min

Check what you know

The lessons are coming later. The knowledge check is ready now.

Take the knowledge check

This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.

Learning objectives

  • State the four necessary conditions for deadlock and model a deadlock with a resource-allocation or wait-for graph.
  • Prevent deadlocks with a global lock order, lock hierarchies, try-lock with back-off or timeouts, and explain where avoidance and detection fit.
  • Diagnose a hung multithreaded process from thread stacks (gdb or /proc) and identify the lock cycle.
  • Explain livelock, starvation and priority inversion and how priority inheritance resolves inversion.

Lesson plan

6 steps, about 115 min · 0 of 5 lessons available so far

  1. Four conditions, one cycle: modeling deadlock with wait-for graphs Concept · 20 min · coming later
  2. Prevention in practice: global lock order, hierarchies and try-lock with back-off Worked example · 25 min · coming later
  3. Avoidance and detection: where Banker's algorithm, timeouts and lockdep fit Concept · 15 min · coming later
  4. Lab: freeze a program, then find the cycle with gdb thread backtraces Lab · 25 min · coming later
  5. Livelock, starvation and priority inversion, with the Mars Pathfinder case Concept · 15 min · coming later
  6. Check: diagnose three hangs from stack dumps Knowledge check · 8 questions

Practise it

Take a provided multithreaded transfer program that deadlocks under load, capture thread stacks of the hung process, draw the wait-for graph, fix it with a documented lock order, and add a stress test that completes 1,000 iterations without hanging.

References

Hard prerequisites

Unlocks

Nothing depends on this skill yet.

On these roadmaps

Progress and evidence for this skill are shared across all of them.