Exit, Then Wait¶
Exercise: 51k_fork_wait · Thu Dec 3 · Length: 6:32 · Reading: Week 15 · exit, the zombie, and wait · Explainer: Exit, Then Wait
A narrated walk through the explainer, for before Thursday's session (Dec 3),
to go with the Week 15 reading
fork, wait, and the User Shell:
exit makes a process a Zombie, which never runs
again, and its slot keeps its pid, its status and its pages until its parent's
wait collects them. The video reads a slot's four states and what moves a
slot from one to the next, then steps through the example program from One
Fork, Two Paths, one call at a time, a parent that waits twice and a child
that exits, with the process table, both status words and every answer at
each step. The three outcomes of wait follow, with the given code that made
them; then kernel A, a broken kernel whose child names no parent, with
its states and the line the test prints for it. The video ends on what you
write, the test's own programs, and how to read a failure. It shows no
solution code: only the process table's slots, the status words and each
call's answer at each step, with an example program, or the test's own.
Download the video (MP4, 8 MB) · Captions (WebVTT) · All eleven Week 15 videos