OSCh3 - Chapter 3: Processes Processes 1 Outline ! ! ! ! !...

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

View Full Document Right Arrow Icon
Processes 1 Processes 1 Chapter 3: Processes 2 Outline ! Overview. ! Process Scheduling. ! Operations on Processes. ! Interprocess Communication. ! Examples of IPC Systems. ! Communication in Client-Server Systems.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Processes 2 3 Process Concept ! The name of CPU activities varies in different systems: " Batch system jobs . " Time-shared systems user programs or tasks . ! Textbook uses the terms job and process almost interchangeably, but prefers process . " However, much of operating-system theory and terminology was developed during the batch era. " Job (such as job scheduling) would be used to avoid misunderstanding. 4 Process Concept (cont’d) ! Process: " A program in execution. " Execution must progress in sequential fashion. ! A process in memory includes: " Text section : the program code. " Stack : contains temporary data (local variable, function parameters ). " Data section : contains global variables. " Heap : used for dynamical memory allocation. " Program counter : the address of next instruction. " Register context Process in memory
Background image of page 2
Processes 3 5 Process Concept (cont’d) ! A program is not a process: " A program is a passive entity; a list of instruction stored on disk. " A process is an active entry. # A program becomes a process when an executable file is loaded into memory. ! Two (or more) processes may be associated with the same program. " For example, a user may invoke many copies of the web browser program. " Each of these is a separate process. # While the text sections are equivalent, the data, heap, and stack sections vary. 6 Process State ! The state of a process is defined by the current activity of that process. ! Each process may be in one of the following states: " New : the process is being created. " Running : instructions are being executed. " Waiting : the process is waiting for some event to occur. # Such as an I/O completion. " Ready : the process is waiting to be assigned to a process. " Terminated : the process has finished execution. ! Only one process can be running on any processor at any instance. " Many processes may be ready and waiting .
Background image of page 3

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

View Full DocumentRight Arrow Icon
Processes 4 7 Process State (cont’d) Diagram of Process State 8 Process Control Block ! Process control block (PCB): a representation of a process in the operating system. ! Information associated with each PCB: " Process state . " Program counter . # The address of next instruction. " CPU registers . " CPU scheduling information . # Process priority (chapter 5). " Memory-management information (chapter 8). " Accounting information . # E.g., amount of CPU time. " I/O status information . # Allocated devices, files, and so on. Different processes have different PCB information.
Background image of page 4
Processes 5 9 Threads ! So far, we focus on single-thread process. " Only one task can be performed at one time. " For example, a single-thread word program can not run the spell checker when the user simultaneously type in characters.
Background image of page 5

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

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

This note was uploaded on 03/01/2012 for the course CMP 426 taught by Professor Gwangs.jung during the Spring '12 term at CUNY Lehman.

Page1 / 41

OSCh3 - Chapter 3: Processes Processes 1 Outline ! ! ! ! !...

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

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