03_Processes - CSC 4103 Operating Systems Fall 2009...

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

View Full Document Right Arrow Icon
1 CSC 4103 - Operating Systems Fall 2009 Tevfik Ko ! ar Louisiana State University September 1 st , 2009 Lecture - III Processes 2 Roadmap • Processes Basic Concepts Process Creation Process Termination Context Switching Process Queues Process Scheduling Interprocess Communication 3 Process Concept • a Process is a program in execution ; Typical process image implementation Stal ings, W. (2004) Operating Systems: Internals and Design Principles (5th Edition). ! A process image consists of three components 1. an executable program 2. the associated data needed by the program 3. the execution context of the process, which contains all information the O/S needs to manage the process (ID, state, CPU registers, stack, etc.) user address space Process Control Block 4 ! The Process Control Block (PCB) Typical process image implementation " is included in the context, along with the stack " is a “snapshot” that contains all necessary and sufficient data to restart a process where it left off (ID, state, CPU registers, etc.) " is one entry in the operating system’s process table (array or linked list) PCB 1 PCB 2 PCB 3 . . . context user address space program code data stack process control block (PCB) Process Control Block 5 Illustrative contents of a process image in (virtual) memory ! Example of process and PCB location in memory O/S process 2 process 1 context program code data program code data stack process control block (PCB) identification program code data stack CPU state info control info stack • numeric identifier • parent identifier • user identifier • etc. • user-visible registers • control & status registers • program counter • stack pointers, etc. • links to other proc’s • memory limits • open files • etc. 6 Process State As a process executes, it changes state new : The process is being created ready : The process is waiting to be assigned to a processor running : Instructions are being executed waiting : The process is waiting for some event to occur terminated : The process has finished execution
Background image of page 1

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

View Full DocumentRight Arrow Icon
Process Creation 7 ! Some events that lead to process creation (enter) " the system boots # when a system is initialized, several background processes or “daemons” are started (email, logon, etc.) " a user requests to run an application # by typing a command in the CLI shell or double-clicking in the GUI shell, the user can launch a new process " an existing process spawns a child process # for example, a server process (print, file) may create a new process for each request it handles # the init daemon waits for user login and spawns a shell " a batch system takes on the next job in line all cases of process spawning Process Creation 8 ! Process creation by spawning
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/01/2011 for the course CSC 4103 taught by Professor Ullmer,b during the Fall '08 term at LSU.

Page1 / 7

03_Processes - CSC 4103 Operating Systems Fall 2009...

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

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