0% found this document useful (0 votes)
24 views16 pages

Process Management

Basics of process management in Operating System

Uploaded by

Ankur Biswas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views16 pages

Process Management

Basics of process management in Operating System

Uploaded by

Ankur Biswas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

PROCESS

MANAGEMENT
BUILDING THE CONCEPT

Monday 15 July 2024 Ankur Biswas 1


RESOURCE MANAGER
• Operating systems primarily are resource managers.
• The hardware resources such as the CPU, memory, I/O devices,
secondary storage devices, and so on are managed only by the OS.
• As a resource manager, the OS also hides the unnecessary details of
the hardware resources from the user and abstracts the resources in
such a manner that the user does not worry about the configuration of
the hardware resources.

Monday 15 July 2024 Ankur Biswas 2


RESOURCE TYPES
• The major hardware resources are processors, memory, I/O devices,
and hard disk.
• The hardware resources that have been abstracted or transformed into
other resources are known as virtual resources.
• The processes, virtual memory, logical devices, and files are examples of
virtual resources.

Monday 15 July 2024 Ankur Biswas 3


PROCESS CONCEPT
• An operating system executes a variety of programs that run as a process.
• Process – a program in execution; process execution must progress in
sequential fashion. No parallel execution of instructions of a single process
• Multiple parts
• The program code, also called text section
• Current activity including program counter, processor registers
• Stack containing temporary data
• Function parameters, return addresses, local variables
• Data section containing global variables
• Heap containing memory dynamically allocated during run time

Monday 15 July 2024 Ankur Biswas 4


PROCESS CONCEPT (CONT.)
• Program is passive entity stored on disk (executable file); process is
active
• Program becomes process when an executable file is loaded into memory
• Execution of program started via GUI mouse clicks, command line
entry of its name, etc.
• One program can be several processes
• Consider multiple users executing the same program

Monday 15 July 2024 Ankur Biswas 5


PROCESS IN MEMORY

Monday 15 July 2024 Ankur Biswas 6


PROCESS STATE
• As a process executes, it changes state
• New: The process is being created
• Running: Instructions are being executed
• Waiting: The process is waiting for some event to occur
• Ready: The process is waiting to be assigned to a processor
• Terminated: The process has finished execution

Monday 15 July 2024 Ankur Biswas 7


DIAGRAM OF PROCESS STATE

Monday 15 July 2024 Ankur Biswas 8


PROCESS CONTROL BLOCK (PCB)
Information associated with each process(also called task control
block)
• Process state – running, waiting, etc.
• Program counter – location of instruction to next execute
• CPU registers – contents of all process-centric registers
• CPU scheduling information- priorities, scheduling queue pointers
• Memory-management information – memory allocated to the process
• Accounting information – CPU used, clock time elapsed since start,
time limits
• I/O status information – I/O devices allocated to process, list of open
files

Monday 15 July 2024 Ankur Biswas 9


READY AND WAIT QUEUES

Monday 15 July 2024 Ankur Biswas 10


REPRESENTATION OF PROCESS
SCHEDULING

Monday 15 July 2024 Ankur Biswas 11


CPU SWITCH FROM PROCESS TO
PROCESS
A context switch
occurs when the
CPU switches from
one process to
another.

Monday 15 July 2024 Ankur Biswas 12


CONTEXT SWITCH
• When CPU switches to another process, the system must save the
state of the old process and load the saved state for the new process
via a context switch
• Context of a process represented in the PCB
• Context-switch time is pure overhead; the system does no useful work
while switching
• The more complex the OS and the PCB  the longer the context switch
• Time dependent on hardware support
• Some hardware provides multiple sets of registers per CPU  multiple
contexts loaded at once

Monday 15 July 2024 Ankur Biswas 13


LIFE CYCLE OF A PROCESS

Monday 15 July 2024 Ankur Biswas 14


TYPES OF
SCHEDULERS AND
THERE WORKING
Long-term, Medium-term and Short-term
Scheduler

Monday 15 July 2024 Ankur Biswas 15


Thank You

Monday 15 July 2024 Ankur Biswas 16

You might also like