Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Process Management

This document describes the process management subsystem of the Kyronix kernel. It is the child of Kernel and parent of process management component documents.

Components

ComponentSourceDescription
Process Tableproc/proc.cProcess allocation, lifecycle, scheduling
Schedulerproc/sched.SContext switch (assembly)
SMPproc/smp.cCPU enumeration, AP boot
Signalsproc/signal.cPOSIX signal delivery
Jailsproc/jail.cSandbox/container isolation
ELF Loaderexec/elf.c64-bit ELF parsing and loading
Process Execexec/process.cExec, stack setup, userspace entry

Process States

StateValueDescription
PROC_UNUSED0Slot is free
PROC_RUNNING1Currently executing on a CPU
PROC_READY2Eligible to run, waiting for time slice
PROC_WAITING3Blocked (I/O, signal, etc.)
PROC_ZOMBIE4Exited, not yet reaped
PROC_DYING5In the process of exiting
PROC_STOPPED6Job-control stopped

Process Table

  • Fixed array of 64 slots (PROC_MAX)
  • Spinlock-protected allocation
  • PID = slot index + 1 (PID 0 reserved for idle)

Global Bitmasks

BitmaskDescription
g_ready_maskProcesses in READY state (eligible for scheduling)
g_used_maskAll allocated process slots
g_timer_maskProcesses with active timers

Last reviewed: 2026-07-22