Docsity

Operating System Process Control Block and Process States, Slides of Operating Systems

Partial preview of the text

Download Operating System Process Control Block and Process States and more Slides Operating Systems in PDF only on Docsity!

Process

Description

Control

Requirements of an Operating System

 Interleave the execution of multiple

processes to maximize processor utilization

while providing reasonable response time

 Allocate resources to processes

 Support interprocess communication and

user creation of processes

Manage Execution of Applications

 Resources made available to multiple

applications

 Processor is switched among multiptle

application

 The processor and I/O devices can be used

efficiently

Process

 A program in execution

 An instance of a program running on a computer

 The entity that can be assigned to and executed on

a processor

 A unit of activity characterized by the execution of a

sequence of instructions, a current state, and an associated set of system instructions

Process Control Block

 Memory pointers

 Includes pointer to data and memory address

 Context data

 These are data that are present in registers

 I/O status information

 Include I/O request , I/O devices and list of files used by the process

 Accounting information

 Includes amount of processor time, clock time used time limits and so on.

Process Control Block

 Contains the process elements

 Created and manage by the operating system

 Allows support for multiple processes

Trace of Process

 Sequence of instruction that execute for a

process

 Dispatcher switches the processor from one

process to another

Example Execution

Two-State Process Model

 Process may be in one of two states

 Running

 Not-running

Process Creation

Process Termination

Processes

 Not-running

 ready to execute

 Blocked

 waiting for I/O

 Dispatcher cannot just select the process that

has been in the queue the longest because it

may be blocked

A Five-State Model

 Running

 Ready

 Blocked

 New

 Exit