CHAPTER 3:PROCESSES Operating System Concepts with Java-7th Edition,Nov 15,2006 Silberschatz,Galvin and Gagne 2007
Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Silberschatz, Galvin and Gagne ©2007 CHAPTER 3: PROCESSES
o How do we provide multiprogramming? o What are processes? o How to describe the process? o State model of the process
How do we provide multiprogramming? What are processes? How to describe the process? State model of the process
o Uniprogramming:one thread at a time CPU Test printer MS/DOS,early Macintosh,Batch state processing Easier for operating system builder Get rid concurrency by defining it If state is not ready, away then repeat Does this make sense for personal test computers? print
Uniprogramming: one thread at a time MS/DOS, early Macintosh, Batch processing Easier for operating system builder Get rid concurrency by defining it away Does this make sense for personal computers?
o Multiprogramming: CPU more than one thread at a time PX Multics,UNIX/Linux, PX waiting for I/O,give up CPU OS/2.Windows Other NT/2000/XP,Mac OS X program ·Often called occupy “multitasking',but CPU multitasking has other I/O finish,PX executing again meanings PX
Multiprogramming: more than one thread at a time Multics, UNIX/Linux, OS/2, Windows NT/2000/XP, Mac OS X Often called “multitasking”, but multitasking has other meanings
PROCESS =PROGRAM main () main () Heap …i …i Stack A(){ A(){ A main Program Process o More to a process than just a program: Program is just part of the process state I run emacs on lectures.txt,you run it on homework.java- Same program,different processes o Less to a process than a program: A program can invoke more than one process cc starts up cpp,cc1,cc2,as,and ld
PROCESS =? PROGRAM More to a process than just a program: Program is just part of the process state I run emacs on lectures.txt, you run it on homework.java – Same program, different processes Less to a process than a program: A program can invoke more than one process cc starts up cpp, cc1, cc2, as, and ld main () { …; } A() { … } main () { …; } A() { … } Heap Stack A main Program Process