the process model
Allows the OS to simplify:
- Resource allocation
- Resource accounting
- Resource limiting
OS maintains information on the resources and the internal state of every single process in the system
processes in the process model
concurrent processes
process hierarchies
parent -> child (address space)
Four principal events that cause processes to be created
process termination
all the resources are deallocated after termination
a parent may terminate its child because
typical conditions which terminate a process:
information associated with a process
ID (PID), User (UID), Group (GID)
memory address space
hardware registers (e.g. pc)
open files
signals
Where is information associated with a process stored?
in the operating system’s Process Table
PCB
process control block, consist of:
- process ID
- process state
- process number
- program counter
- registers (CPU registers)
- CPU scheduling information
- memory limits - memory management information
- list of open file
- accounting information
- I/O information
process states
process blocks for input
running -> blocked
scheduler picks another process
running -> ready
scheduler picks this process
ready -> running
input becomes available
blocked -> running
Which layer handles interrupts and scheduling
the lowest layer of a process-structured operating system
scheduling queues
job -> ready ->CPU
context switches
state save
state restore
Why is context switch time pure overhead?
because the system does no useful work while switching
Interrupt vector
Who continues process execution after interrupts?
interrupt handler
interrupt types
sw, hw, device (async), exceptions