COMP 314 - U2C3

Operating System Concepts, Seventh Edition

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

View Full Document Right Arrow Icon
COMP 314 - Unit 2 (Notes) Process Concepts (81) o A process is a unit of work in a modern time-sharing system. A batch system executes jobs. A time-sharing system has user programs, or tasks (processes). o The Process A process is more than just the program code ( text section ) it is also the values of the program counter and processor’s stack registers. (82) A process usually includes a process stack This contains temporary data (function parameters, return addresses, etc.) and a data section which contains global variables. May include a heap, which is memory dynamically allocated during run time. A program is not a process; a program is a passive entity, whereas a process is an active entity. A program becomes a process when it is loaded into memory. Multiple executions of the same program result in multiple distinct processes. o Process State (83) Each process may be in one of the following states; New – Process is being created. Running – Instructions are being executed. Waiting – The process is waiting for some event to occur (such as I/O) Ready – The process is waiting to be assigned to a processor. Terminated – The process has finished execution. Only one process can be running on a processor at any given time, others may be ready or waiting. o Process Control Block (83) Each process is represented in the OS by a process control block (PCB) or task control block. It contains many pieces of information, which include: Process state – ready, new, waiting, etc. Program Counter – Address of the next instruction to be processed. CPU registers o Vary in number and type. o They include accumulators, index registers, stack pointers, and general-purpose registers, plus any condition-coding information. o Along with the program counter, this state information must be saved when an interrupt occurs, to allow the process to be continued correctly afterwards. CPU-Scheduling Information o Includes a process priority, pointers to scheduling queues, and any other scheduling parameters. o May include such information as the value of the base and limit registers, the page tables, or the segment tables, depending on the memory system used by the OS. Memory-Management Information o Includes values of base and limit registers, page tables, or the segments tables. Accounting Information o Amount of CPU and real time used, time limits, account numbers, job or process numbers, and so on. I/O status information o List of I/O devices allocated to the process, a lit of open files, and so on. o Threads (84) This is a thread of execution of which single thread computing only allows one thread to be executed at a time. Process Scheduling
Background image of page 1

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

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

This note was uploaded on 07/18/2011 for the course COMP 314 taught by Professor Dr.dunwei(grant)wen during the Spring '11 term at Open Uni..

Page1 / 6

COMP 314 - U2C3 - COMP 314 - Unit 2 (Notes) Process...

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

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