Data Structure Summary
Process
Data is contained within a proc
structure.
proc
structure includes:
- list of kernel threads for the process
- pointer to the process’s virtual address space
- user credentials
- signal handlers
Light-weight Process (LWP)
Contains the process-control-block, or PCB. The PCB includes:
- user-level process registers
- system call (syscall) arguments
- signal mask
- resource usage information
- profiling pointers
The LWP also includes:
- pointers to the kernel thread associated with the LWP
proc
structure for the LWP
See: additional notes on light-weight processes
Kernel-thread
Kernel thread structure contains:
- kernel level registers
- scheduling class (scheduling info)
- dispatch queue links (scheduling info)
- stack pointer
- pointer to associated LWP
- pointer to associated process structure
- pointer to CPU structure
CPU
The cpu
structure contains per-processor data, including:
- pointer to currently executing thread and list of kernel threads
- the idle thread for the CPU
- current dispatching and scheduling information
- other architecture-dependent information
“Interrupts as Threads” Summary
SunOS 5.0 had preallocated threads dedicated to handling interrupts. These threads would perform the interrupt work and the interrupted thread would be “pinned” and could not be scheduled while until the interrupt thread finished.
This eliminates the need of raising and lowering interrupt priority to prevent deadlocks from occurring because an interrupt that wants to lock a mutex interrupts something that already has a lock on the mutex (maybe? 🙂 still a little fuzzy on this part of the paper).