★ Multiprogrammingof 4 programs ¥ ★ One program counter Four program counters AProcess switch B A B D B D Time Programs in memory Conceptual view Time line view
6 Programs in memory Conceptual view Time line view Multiprogramming of 4 programs
★ Process Creation ¥ 斗 ★★ Principal events that cause process creation 1. System initialization 2. Execution of a process creation system 3. User request to create a new process
7 Process Creation Principal events that cause process creation 1. System initialization 2. Execution of a process creation system 3. User request to create a new process
★ Process Temination ¥ 斗 ★★ Conditionswhich teminate processes 1. Nomal exit(voluntary) 2. Error exit(voluntary) 3. Fatal error(involuntary) 4. Killed by another process (involuntary)
8 Process Termination Conditions which terminate processes 1. Normal exit (voluntary) 2. Error exit (voluntary) 3. Fatal error (involuntary) 4. Killed by another process (involuntary)
★ Process hierarchies ¥ 斗 ★★ o Parent creates a child process o Child processes can create its own process o Processes creation foms a hierarchy UNdX callsthis a"processgroup Windowshasno concept of such hierarchy, i.e. all processesare createdequal
9 Process Hierarchies Parent creates a child process Child processes can create its own process Processes creation forms a hierarchy – UNIX calls this a "process group" – Windows has no concept of such hierarchy, i.e. all processes are created equal
★ Process states ¥ 斗 ★★ o Possible process states running blocked read Running Process blocks Scheduler picks for input another process Scheduler picks this process Blocked Ready Input becomes available
10 Process States Running Blocked Ready Possible process states – running, blocked, ready Process blocks for input Scheduler picks another process Input becomes available Scheduler picks this process