Task state and resource lifetime

This figure documents the historical i386 source baseline. Current native x86-64/AArch64 qualification is recorded separately; this is not an ELF64 or native SMP implementation diagram.

Task state and resource lifetime READY dispatches to RUNNING; yield or preemption returns it to READY. Sleep, wait and I/O can block; a wake source makes it ready again. Stop signals produce STOPPED and SIGCONT restores readiness. Exit produces a waitable ZOMBIE when there is a live parent, otherwise DEAD; wait or orphan cleanup makes zombies dead. Reaping frees resources and the slot. ready->running dispatch ready->stopped SIGSTOP / SIGTSTP running->ready yield / preempt running->blocked sleep / wait / I/O running->stopped stop signal running->zombie exit; live parent can wait running->dead exit without waitable parent blocked->ready deadline / wake source stopped->ready SIGCONT zombie->dead parent wait() / orphan cleanup dead->reaped ready READY running RUNNING blocked BLOCKED stopped STOPPED zombie ZOMBIE dead DEAD reaped Reap resources → reusable slot
Task state and resource lifetime READY dispatches to RUNNING; yield or preemption returns it to READY. Sleep, wait and I/O can block; a wake source makes it ready again. Stop signals produce STOPPED and SIGCONT restores readiness. Exit produces a waitable ZOMBIE when there is a live parent, otherwise DEAD; wait or orphan cleanup makes zombies dead. Reaping frees resources and the slot. ready->running dispatch ready->stopped SIGSTOP / SIGTSTP running->ready yield / preempt running->blocked sleep / wait / I/O running->stopped stop signal running->zombie exit; live parent can wait running->dead exit without waitable parent blocked->ready deadline / wake source stopped->ready SIGCONT zombie->dead parent wait() / orphan cleanup dead->reaped ready READY running RUNNING blocked BLOCKED stopped STOPPED zombie ZOMBIE dead DEAD reaped Reap resources → reusable slot

Exiting is not the same as reclaiming: waitable children remain zombies until collected.

Text equivalent and source references
  • READY dispatches to RUNNING; yield or preemption returns it to READY. Sleep, wait and I/O can block; a wake source makes it ready again.
  • Stop signals produce STOPPED and SIGCONT restores readiness. Exit produces a waitable ZOMBIE when there is a live parent, otherwise DEAD; wait or orphan cleanup makes zombies dead. Reaping frees resources and the slot.

State machine. Source paths refer to the atlas baseline; the kernel checkout is private.

  • include/task.h · task_state_t
  • kernel/core/task.c · task_finish, task_wait, task_reap, task_kill