define operating system
a program that acts as an intermediary between a user and hardware
OS goals
OS is a …. (roles and responsibilities)
what is a process
a unit of execution that uses associated resources to execute collection of instructions completing a reasonable task
OS process management roles
process includes
information of process stored as:
a process control block. holds info on:
process state (~status)
process state cycle
new –(admitted)–> ready –(scheduler dispatch)–>running
running–(interrupt)–> ready
running –(I/O or event wait)–> waiting – (event completion or I/O)–> ready
running – (exit) –> terminated
process creation
a new process, as a parent process, can create a number of child processes which can create processes themselves, forming a tree of processes.
process creation: sharing resources
parent and child processes can either:
process creation: execution
parent and child either:
process termination
process executes final instruction and requests OS to delete it:
why would parent process terminate execution of child process?
aim of kernel
provide an environment in which processes can exist
four essential components of a kernel
kernel consists of
what is an interrupt
a signal from either hardware or software of an event causing a change in process:
e. g. hardware: triggers an interrupt by sending a signal to the CPU via the system bus (eg IO event- printing complete)
software: triggers an interrupt by making a system call asking for some action by the OS (eg asking for time
interrupt routines
OS routines executed whenever an interrupt has occurred
function of FLIH
determine source of interrupt
initiate servicing of interrupt: select suitable dispatcher process
privileged instruction set
some instructions can only be accessible to OS:
dual mode
when switch from user to kernel mode?
what does dispatcher do
assigns resources to processes