◄ Wiki / OS
reaper
A background kernel thread that cleans up threads that have finished, freeing their resources.
When a thread exits it can't fully clean up after itself, so a dedicated 'reaper' thread reclaims the leftover memory and structures of dead threads. It's the janitor of the scheduler. A bug here is dangerous: if the reaper touches an already-freed thread structure (a use-after-free), it operates on garbage memory and can corrupt the system.
See also
- PID / TIDUnique ID numbers the operating system assigns to each running program (PID) and each thread inside it (TID).
- preemption / preemptiveWhen the OS forcibly pauses a running thread mid-execution to let a different one run.
- race / race conditionA bug where the outcome depends on the unpredictable timing of two things happening at once.
- return frameThe saved snapshot of a thread's state that the CPU restores to resume it exactly where it left off.
Referenced by
PID / TID · race / race condition · return frame · ring buffer