Os 2
Os 2
" The most central concept in any operating system is the process: an abstraction of a running
program. Ererything else hinges on this concept.
" A process is a program in execution. A process will need certain resources- -Such as CPU
time. memory, files, and I'O devices--to accomplish its task.
" These resources are typically allocated to the process while it is executing.
ready running
PROCESS STATES
" PROCESSCREATION
"PROCESS SCHEDULING
PROCESSCREATION
"Parent process create children processes, which, in turn create other
processes, forming atree of processes
"Resource sharing
"Parent and children share all resources
" Children share subset of parent's resources
" Parent and child share no resources
"Execution
Parent and children execute concurrently
" Parent waits until children terminate
PROCESS TERMINATION
" Process executes last statement and asks the operating system to delete it
(exit)
" Output data from child to parent
" Process' resources are deallocated by operating system
regsters
memory limits
Bst of open fles
ex. Inpre-emptive process, the process gets halted and its context is saved.
idie
interrupt or syslem call execuing
Each prOcess executes the same code but Allthread can share same set of open files,
has its own memory ad file resources child process
Multiple redundant process use more Multiple threaded process use fewer
resources resources
User Level thread Kernel LevelThresd
User level threads are faster tocreate and Kernel level threads are slower to create
manage and manage.
User level thread is generic and can run on Kernel level thread is specific to the
any operating system operating system
o Aready queue header contains pointer to first & last PCBs in the linked list.
o Each PCB has pointer, points to next process in queue.
ODevice queues - set of processes waiting for an IOdevice
-Processes migrate among the various queues
Long term scheduler Short term scheduler Medium term
Scheduler
executing