{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lec07-PCB - National University of Computer Emerging...

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

View Full Document Right Arrow Icon
Operating System Spring 07 National University of Computer & Emerging Sciences Lec07-Processes Prepared by Uzma Maroof [email protected]
Background image of page 1

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

View Full Document Right Arrow Icon
2 Reference Reference Operating System Concepts, 6th Edition, Silberschatz 4.1 Process Concept 4.2 Process Scheduling
Background image of page 2
3 Process Process A Context for Computation CPU registers contain the current state 1. Processor Status Word (PSW): includes bits Privileged or normal Outcome of the last arithmetic operation (zero,-ve, +ve, overflow, carry) Which interrupts are allowed and which are not
Background image of page 3

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

View Full Document Right Arrow Icon
4 CPU State CPU State 2. Instruction Register (IR): The current instruction being executed 3. Program Counter (PC): Address of the next instruction to be executed 4. Stack Pointer (SP): the address of the current stack frame, including function’s local variables and return information. 5. General purpose registers: used to store addresses and data values as directed by the compiler.
Background image of page 4
5 Memory Contents Memory Contents Only a small part of an application’s data can be stored in registers. The rest is in memory. Typically divided into a few segments: Text The application's code Read-only might be shared by a number of processes? Data The application's predefined data structures Heap An area from which space can be allocated dynamically at runtime, using functions like new or malloc . Stack Where register values are saved local variables allocated Return Address of subroutine calls All the addressable memory together is called? The process's address space.
Background image of page 5

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

View Full Document Right Arrow Icon
6 Environment Environment Contains the relationships with other entities A process does not exist in a vacuum It typically has connections with other entities, such as A terminal where the user is sitting. Open files Communication channels to other processes, possibsssly on other machines.
Background image of page 6
7 Process Control Block Process Control Block The OS keeps all the data it needs about a process in the process control block (PCB)
Background image of page 7

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

View Full Document Right Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}