Documente Academic
Documente Profesional
Documente Cultură
LECTURE - 2
K.ARIVUSELVAN
Assistant Professor (Senior) (SITE)
VIT University
PROCESS MANAGEMENT
Program
A program consists of:
Preparing a Program
static libraries
(libc, streams)
compiler/
assembler
source
file
Linker
o files
.o
Executable file
PROCESS
Program in Execution
The collection of data structures that fully describes how far the
execution of the program has progressed.
PROCESS
A Process includes 4 Segments:
CODE / TEXT: Holds program
DATA: Holds program variables
HEAP: Holds intermediate computation data generated
during run time
STACK: Holds
=> Local
L
l variables
i bl
=> Temporaries & Procedure Calls
=> Return addresses
Process in Memory
Processes in Memory
PROGRAM
Instructions in any
programming language
Passive Entity
PROCESS
Active Entity
PROCESS IMAGE
C ll ti
DATA STACK & ATTRIBUTES
Collection
off CODE
CODE,DATA,STACK
Parent & Child ID
Process Identification
Content of
processor register
Process State
Information
Priority, State
Process Control
Information
PCB
User Stack
U
User
Add
Address Space
S
(Code& Data)
Shared Address Space
p
Process 1
PImg-1
PImg 1
Process 2
PImg-2
.
Process n
Primary Process Table
PImg-n
Process
Image
g
Structure of PCB
U i
id d by
b OS on process
Unique
ID provided
creation
New, Ready, Running, Suspend,
Terminated
May be Internal (Set by OS) or
External (depends on external
factors)
Id tifi
Identifier
State
Priority
Program Counter
M
Memory
Pointer
P i t
Context Data
is executing
Includes
=> I/O requests,I/o devices asssigned to this
process
=> List of Files in use by the process
I/O Status
Information
Accounting
I f
Information
ti