PPT: Process Management | Operating System - Computer Science Engineering (CSE) PDF Download

Download, print and study this document offline
Please wait while the PDF view is loading
 Page 1


Process 
Management
Page 2


Process 
Management
Program vs Process
Program
A 'passive' entity consisting of code 
instructions
Source code files (.c, .cpp)
Compiled binary files (.exe)
Stored on disk
Process
An 'active' entity - a program in execution
Loaded into memory
Assigned system resources
Multiple instances possible
When we compile a program written in C or C++, the compiler creates binary code. Both the 
original code and the binary output are considered programs. The transformation occurs when 
we execute this binary code - it becomes a process. A single program can spawn multiple 
processes when run multiple times, similar to opening the same application repeatedly.
Page 3


Process 
Management
Program vs Process
Program
A 'passive' entity consisting of code 
instructions
Source code files (.c, .cpp)
Compiled binary files (.exe)
Stored on disk
Process
An 'active' entity - a program in execution
Loaded into memory
Assigned system resources
Multiple instances possible
When we compile a program written in C or C++, the compiler creates binary code. Both the 
original code and the binary output are considered programs. The transformation occurs when 
we execute this binary code - it becomes a process. A single program can spawn multiple 
processes when run multiple times, similar to opening the same application repeatedly.
Process Memory Structure
Text Section
Contains the program code and current activity represented by 
the Program Counter value. This is where the executable 
instructions reside.
Stack
Stores temporary data such as function parameters, return 
addresses, and local variables. Grows and shrinks dynamically 
during program execution.
Data Section
Houses global variables and static data that exist for the entire 
duration of the process.
Heap Section
Area for dynamically allocated memory that the process can 
request during runtime. Managed through functions like 
malloc() and free().
Page 4


Process 
Management
Program vs Process
Program
A 'passive' entity consisting of code 
instructions
Source code files (.c, .cpp)
Compiled binary files (.exe)
Stored on disk
Process
An 'active' entity - a program in execution
Loaded into memory
Assigned system resources
Multiple instances possible
When we compile a program written in C or C++, the compiler creates binary code. Both the 
original code and the binary output are considered programs. The transformation occurs when 
we execute this binary code - it becomes a process. A single program can spawn multiple 
processes when run multiple times, similar to opening the same application repeatedly.
Process Memory Structure
Text Section
Contains the program code and current activity represented by 
the Program Counter value. This is where the executable 
instructions reside.
Stack
Stores temporary data such as function parameters, return 
addresses, and local variables. Grows and shrinks dynamically 
during program execution.
Data Section
Houses global variables and static data that exist for the entire 
duration of the process.
Heap Section
Area for dynamically allocated memory that the process can 
request during runtime. Managed through functions like 
malloc() and free().
Process Attributes
Process ID
A unique identifier assigned by the operating system to track 
each process
Process State
Current execution status (ready, running, waiting, etc.)
CPU Registers
Program Counter and other registers that must be saved 
during context switches
Resource Information
Accounts data, I/O status (allocated devices, open files), and 
CPU scheduling information (priority)
All these attributes collectively form the context of a process. Each 
process has its own Process Control Block (PCB) that contains this 
information. The PCB serves as the process's identity card in the 
operating system and is essential for process management.
Page 5


Process 
Management
Program vs Process
Program
A 'passive' entity consisting of code 
instructions
Source code files (.c, .cpp)
Compiled binary files (.exe)
Stored on disk
Process
An 'active' entity - a program in execution
Loaded into memory
Assigned system resources
Multiple instances possible
When we compile a program written in C or C++, the compiler creates binary code. Both the 
original code and the binary output are considered programs. The transformation occurs when 
we execute this binary code - it becomes a process. A single program can spawn multiple 
processes when run multiple times, similar to opening the same application repeatedly.
Process Memory Structure
Text Section
Contains the program code and current activity represented by 
the Program Counter value. This is where the executable 
instructions reside.
Stack
Stores temporary data such as function parameters, return 
addresses, and local variables. Grows and shrinks dynamically 
during program execution.
Data Section
Houses global variables and static data that exist for the entire 
duration of the process.
Heap Section
Area for dynamically allocated memory that the process can 
request during runtime. Managed through functions like 
malloc() and free().
Process Attributes
Process ID
A unique identifier assigned by the operating system to track 
each process
Process State
Current execution status (ready, running, waiting, etc.)
CPU Registers
Program Counter and other registers that must be saved 
during context switches
Resource Information
Accounts data, I/O status (allocated devices, open files), and 
CPU scheduling information (priority)
All these attributes collectively form the context of a process. Each 
process has its own Process Control Block (PCB) that contains this 
information. The PCB serves as the process's identity card in the 
operating system and is essential for process management.
Process States
New
Process is being 
created
Ready
Waiting to be assigned 
to CPU
Running
Currently executing in 
CPU
Waiting/Blocked
Waiting for I/O or event
Terminated
Execution completed
Beyond these five basic states, some systems implement additional states like Suspended Ready 
and Suspended Block. These states come into play when the ready or waiting queues become 
full, requiring some processes to be temporarily moved to secondary storage to free up memory 
resources.
Read More
10 videos|141 docs|33 tests
Related Searches

Important questions

,

shortcuts and tricks

,

Objective type Questions

,

mock tests for examination

,

Semester Notes

,

PPT: Process Management | Operating System - Computer Science Engineering (CSE)

,

study material

,

Viva Questions

,

Extra Questions

,

MCQs

,

pdf

,

PPT: Process Management | Operating System - Computer Science Engineering (CSE)

,

Free

,

past year papers

,

practice quizzes

,

PPT: Process Management | Operating System - Computer Science Engineering (CSE)

,

video lectures

,

Sample Paper

,

Previous Year Questions with Solutions

,

ppt

,

Summary

,

Exam

;