Operating Systems are programs, so they also have data structures
- Process list – track the state of each process
- Running processes
- Currently running processes
- Blocked processes
xv6 kernel proc structure:
- Register context
- Holds the contents of register state for a stopped process
- When a process is stopped, its register state will be saved to this memory location
- By restoring these registers (i.e., placing their values back into the actual physical registers), the OS can resume running the process.
- Initial state
- State of process when it is being created
- Final/zombie state
- Exited but has not been cleaned up
- Can be helpful for examining return code to determine execution success