03_process concept

03_process concept - Chapter 3: Process-Concept Chapter...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Chapter 3: Process Chapter 3: Process - - Concept Concept
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
3.2 Modified by Bo Li ©2009 Operating System Concepts Chapter 3: Process Chapter 3: Process - - Concept Concept ± Process Concept ± Process Scheduling ± Operations on Processes ± Cooperating Processes ± Interprocess Communication
Background image of page 2
3.3 Modified by Bo Li ©2009 Operating System Concepts Process Concept Process Concept ± Process – a program in execution; process execution must progress in sequential fashion z A process has a life cycle ± A process includes: z program counter z stack z data section
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
3.4 Modified by Bo Li ©2009 Operating System Concepts Process in Memory Process in Memory
Background image of page 4
3.5 Modified by Bo Li ©2009 Operating System Concepts Multiple Processes Multiple Processes - - Address Address Prog 1 Virtual Address Space 1 Prog 2 Virtual Address Space 2 Code Data Heap Stack Code Data Heap Stack Code Data Heap Stack Code Data Heap Stack Translation Map 1 Translation Map 2 Physical Address Space
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
3.6 Modified by Bo Li ©2009 Operating System Concepts Traditional UNIX Process Traditional UNIX Process ± Process: Operating system abstraction to represent what is needed to run a single program z Often called a “Heavy Weight Process” (“Light Weight Process” or Thread will be defined in Chapter 4) z Formally: a single, sequential stream of execution in its own address space ± Two parts: z Sequential Program Execution Stream ± Code executed as a single, sequential stream of execution ± Includes State of CPU registers z Protected Resources: ± Main Memory State (contents of Address Space) ± I/O state (i.e. file descriptors) ± Important: There is no concurrency in a heavyweight process
Background image of page 6
3.7 Modified by Bo Li ©2009 Operating System Concepts Process States and Diagram Process States and Diagram ± As a process executes, it changes state z new: The process is being created z running: Instructions are being executed z waiting: The process is waiting for some event to occur z ready: The process is waiting to be assigned to a process z terminated: The process has finished execution
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
3.8 Modified by Bo Li ©2009 Operating System Concepts Process =? Program Process =? Program ± A process is more than just a program: z A program is just part of the process state z Same program can be run by different processes ± A process is “less” than a program: z A program can invoke (call) more than one process ± A program is static (line of codes stored) and a process has a “life” and is always in some “state” main () { …; } A() { } main () { …; } A() { } main () { …; } A() { } main () { …; } A() { } Heap Stack A main Program Process
Background image of page 8
3.9 Modified by Bo Li ©2009 Operating System Concepts Process Control Block (PCB) Process Control Block (PCB) ± Each process has a unique PCB, that OS uses to manage the process z Scheduling, allocating memory space and etc. ± Information associated with each process
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 35

03_process concept - Chapter 3: Process-Concept Chapter...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online