SlideShare a Scribd company logo
Process Concept
Program, Process, Processor
• A progam is a set of instructions. A process is a program in execution.
It is a unit of work within the system. Program is a passive entity,
process is an active entity.
• Processor is the device which executes programs.
• Process needs resources to accomplish its task
– CPU, memory, I/O, files
– Initialization data
• Process termination requires reclaim of any reusable resources
Threads
• A thread is predefined instance of a process. A thread performs a specific
function. A process may consist a set of threads
• Single-threaded process has one program counter specifying location of
next instruction to execute
– Process executes instructions sequentially, one at a time, until completion
• Multi-threaded process has one program counter per thread
• Typically system has many processes, some user, some operating system
running concurrently on one or more CPUs
– Concurrency by multiplexing the CPUs among the processes / threads
Single and Multithreaded Processes
Process Management Activities
• The operating system is responsible for the
following activities in connection with process
management:
– Creating and deleting both user and system
processes
– Suspending and resuming processes
– Providing mechanisms for process synchronization
– Providing mechanisms for process communication
– Providing mechanisms for deadlock handling
Process Creation
• System Initialization – Boots up
• User related events – click, double click, drag
• Execution of a function call- process creates a
child process
Process Termination
• System shut down
• Process termination – completes execution
• Error condition(Voluntary)
• Fatal error(Involuntary
• Killed by another process
Process States
• New – just created, arrived in memory
• Ready – prepared for execution once the CPU
becomes available
• Running – Being executed.
• Blocked – has suspended running, requires an
I/O device.
• Terminated – Has finished executed, prepared
to exit memory.
Process Control Block (PCB)
Stores Information associated with each
process
• Process state
• Program counter
• CPU registers
• CPU scheduling information
• Memory-management information
• Accounting information
• I/O status information
Process Control Block (PCB)
Process Interruption
• CPU Switch From Process to Process
Process Scheduling Queues
• Ready queue – set of all processes residing in
main memory, ready and waiting to execute
• Device queues – set of processes waiting for
an I/O device
• Processes migrate among the various queues
Representation of Process Scheduling
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
• Context-switch time is overhead; the system does
no useful work while switching
• Time dependent on hardware support
Process Creation
• Parent process create children processes, which,
in turn create other processes, forming a tree of
processes
• Resource sharing may be
– Parent and children share all resources
– Children share subset of parent’s resources
– Parent and child share no resources
• Execution mode may be
– Parent and children execute concurrently
– Parent waits until children terminate
Process Termination
• Process executes last statement and asks the operating
system to delete it (exit)
– Output data from child to parent (via wait)
– Process’ resources are deallocated by operating system
• Parent may terminate execution of children processes
(abort) if
– Child has exceeded allocated resources
– Task assigned to child is no longer required
– If parent is exiting
• Some operating system do not allow child to continue if its parent
terminates
– All children terminated - cascading termination

More Related Content

PPTX
Operating system 17 process management
Vaibhav Khanna
 
PPTX
Os concepts 4 functions of os
Vaibhav Khanna
 
PPTX
Operating system 18 process creation and termination
Vaibhav Khanna
 
PPTX
Operating system 05 functions of os
Vaibhav Khanna
 
PPTX
Processes
RaviRaj339
 
PDF
Ch3 processes
Welly Dian Astika
 
PPTX
Operating system concepts
Arnav Chowdhury
 
PDF
CSI-503 - 2. Processor Management
ghayour abbas
 
Operating system 17 process management
Vaibhav Khanna
 
Os concepts 4 functions of os
Vaibhav Khanna
 
Operating system 18 process creation and termination
Vaibhav Khanna
 
Operating system 05 functions of os
Vaibhav Khanna
 
Processes
RaviRaj339
 
Ch3 processes
Welly Dian Astika
 
Operating system concepts
Arnav Chowdhury
 
CSI-503 - 2. Processor Management
ghayour abbas
 

What's hot (20)

PPTX
Os unit 2
Arnav Chowdhury
 
PPTX
Operating systems
Saqib Shehzad
 
PPTX
Processes and operating systems
RAMPRAKASHT1
 
PPT
Lecture5
Ali Shah
 
PPTX
Basic concept of process
Nabin Dahal
 
PPTX
Unit v: Device Management
Arnav Chowdhury
 
PPTX
Operating system 31 multiple processor scheduling
Vaibhav Khanna
 
PPTX
Mis unit iii by arnav
Arnav Chowdhury
 
PDF
Operating Systems 1 (6/12) - Processes
Peter Tröger
 
PPT
08 operating system support
Bitta_man
 
PPT
Process management
Digpal Singh Jhala
 
PPT
08 operating system support
Anwal Mirza
 
PPTX
Process Control Block & Threads and Their Management
Ujjwal Kumar
 
PPTX
Memory management1
rizwanaabassi
 
PPTX
Learn about computer hardware and software
farrukh ishaq choudhary
 
PPTX
Os unit 3 , process management
Arnav Chowdhury
 
PPTX
Unit 1 operating system
Meeta
 
Os unit 2
Arnav Chowdhury
 
Operating systems
Saqib Shehzad
 
Processes and operating systems
RAMPRAKASHT1
 
Lecture5
Ali Shah
 
Basic concept of process
Nabin Dahal
 
Unit v: Device Management
Arnav Chowdhury
 
Operating system 31 multiple processor scheduling
Vaibhav Khanna
 
Mis unit iii by arnav
Arnav Chowdhury
 
Operating Systems 1 (6/12) - Processes
Peter Tröger
 
08 operating system support
Bitta_man
 
Process management
Digpal Singh Jhala
 
08 operating system support
Anwal Mirza
 
Process Control Block & Threads and Their Management
Ujjwal Kumar
 
Memory management1
rizwanaabassi
 
Learn about computer hardware and software
farrukh ishaq choudhary
 
Os unit 3 , process management
Arnav Chowdhury
 
Unit 1 operating system
Meeta
 
Ad

Viewers also liked (10)

PPTX
PAQUETE MATEMATICO grado 5° primaria
juanhosarmiento
 
PPSX
Práctica ofimática
lvpenayo
 
PPTX
Unidadesdemedida 140516185146-phpapp02
Mateo Logroño Santillan
 
PPTX
Ofimatica i clase
Xavier Gómez
 
PPTX
Construcción de las unidades de medida
Itzel Ponce Silva
 
DOCX
Planeacion bloque i - primero
Jua Jua Cuac Cuax
 
DOCX
Plan de aula tecnologia 2014 2015 primaria 3-5
Colegio Nuestra Señora de La Anunciacion cali
 
DOCX
Plan de asignatura tecnologia 2014 completo
Independiente
 
PDF
Plan anual ofimatica 2º 2014 2015
Monix de Ciudad
 
PDF
Actividades de matemáticas 2º educación primaria
Hatsep Sen
 
PAQUETE MATEMATICO grado 5° primaria
juanhosarmiento
 
Práctica ofimática
lvpenayo
 
Unidadesdemedida 140516185146-phpapp02
Mateo Logroño Santillan
 
Ofimatica i clase
Xavier Gómez
 
Construcción de las unidades de medida
Itzel Ponce Silva
 
Planeacion bloque i - primero
Jua Jua Cuac Cuax
 
Plan de aula tecnologia 2014 2015 primaria 3-5
Colegio Nuestra Señora de La Anunciacion cali
 
Plan de asignatura tecnologia 2014 completo
Independiente
 
Plan anual ofimatica 2º 2014 2015
Monix de Ciudad
 
Actividades de matemáticas 2º educación primaria
Hatsep Sen
 
Ad

Similar to Processes (20)

PDF
Process Management.pdf
Yashjangid9
 
PPTX
Operating Systems Process Management.pptx
Sivakumar M
 
PPTX
OS_Unit II - Process Management_CATI.pptx
Gokhul2
 
PPTX
UNIT I-Processes.pptx
GaneshKumar537286
 
PPTX
UNIT 2 OS.pptx Introduction of Operating System
DevPatel62412
 
PPTX
opearating system notes mumbai university.pptx
ssuser3dfcef
 
PPTX
Unit 2...............................................
likhithmuthyalu2
 
PPTX
introduction to operating system unit 2
likhithmuthyalu2
 
PPTX
introduction to operating systems and services.pptx
anilvarsha1
 
PDF
Unit 1.1.pdfOperating_SystemOperating_System
DharmatejMallampati
 
PPTX
process_concept_introduction_overview.pptx
RishabhDevShukla4
 
PDF
process.pdfzljwiyrouyaeutoaetodtusiokklhh
abhinandpk2405
 
PPT
L-5 BCEProcess management.ppt
Kirti Verma
 
PPTX
Chapter -2 operating system presentation
chnrketan
 
PPTX
Process management system in operating system
VeereshDevakkalavar
 
PPTX
Process management in operating system, process creation, process sheduling
VeereshDevakkalavar
 
PPTX
Handling Large Data Volumes in Salesforce with Apex
MuhammadMahad31
 
PDF
Lecture 2- Processes.pdf
Amanuelmergia
 
PPTX
Operating Systems chap 2_updated2 (1).pptx
Amanuelmergia
 
PPTX
Operating Systems unit 1 & 2 - BBA / MBA
bhargavivarala99
 
Process Management.pdf
Yashjangid9
 
Operating Systems Process Management.pptx
Sivakumar M
 
OS_Unit II - Process Management_CATI.pptx
Gokhul2
 
UNIT I-Processes.pptx
GaneshKumar537286
 
UNIT 2 OS.pptx Introduction of Operating System
DevPatel62412
 
opearating system notes mumbai university.pptx
ssuser3dfcef
 
Unit 2...............................................
likhithmuthyalu2
 
introduction to operating system unit 2
likhithmuthyalu2
 
introduction to operating systems and services.pptx
anilvarsha1
 
Unit 1.1.pdfOperating_SystemOperating_System
DharmatejMallampati
 
process_concept_introduction_overview.pptx
RishabhDevShukla4
 
process.pdfzljwiyrouyaeutoaetodtusiokklhh
abhinandpk2405
 
L-5 BCEProcess management.ppt
Kirti Verma
 
Chapter -2 operating system presentation
chnrketan
 
Process management system in operating system
VeereshDevakkalavar
 
Process management in operating system, process creation, process sheduling
VeereshDevakkalavar
 
Handling Large Data Volumes in Salesforce with Apex
MuhammadMahad31
 
Lecture 2- Processes.pdf
Amanuelmergia
 
Operating Systems chap 2_updated2 (1).pptx
Amanuelmergia
 
Operating Systems unit 1 & 2 - BBA / MBA
bhargavivarala99
 

Processes

  • 2. Program, Process, Processor • A progam is a set of instructions. A process is a program in execution. It is a unit of work within the system. Program is a passive entity, process is an active entity. • Processor is the device which executes programs. • Process needs resources to accomplish its task – CPU, memory, I/O, files – Initialization data • Process termination requires reclaim of any reusable resources
  • 3. Threads • A thread is predefined instance of a process. A thread performs a specific function. A process may consist a set of threads • Single-threaded process has one program counter specifying location of next instruction to execute – Process executes instructions sequentially, one at a time, until completion • Multi-threaded process has one program counter per thread • Typically system has many processes, some user, some operating system running concurrently on one or more CPUs – Concurrency by multiplexing the CPUs among the processes / threads
  • 5. Process Management Activities • The operating system is responsible for the following activities in connection with process management: – Creating and deleting both user and system processes – Suspending and resuming processes – Providing mechanisms for process synchronization – Providing mechanisms for process communication – Providing mechanisms for deadlock handling
  • 6. Process Creation • System Initialization – Boots up • User related events – click, double click, drag • Execution of a function call- process creates a child process
  • 7. Process Termination • System shut down • Process termination – completes execution • Error condition(Voluntary) • Fatal error(Involuntary • Killed by another process
  • 9. • New – just created, arrived in memory • Ready – prepared for execution once the CPU becomes available • Running – Being executed. • Blocked – has suspended running, requires an I/O device. • Terminated – Has finished executed, prepared to exit memory.
  • 10. Process Control Block (PCB) Stores Information associated with each process • Process state • Program counter • CPU registers • CPU scheduling information • Memory-management information • Accounting information • I/O status information
  • 12. Process Interruption • CPU Switch From Process to Process
  • 13. Process Scheduling Queues • Ready queue – set of all processes residing in main memory, ready and waiting to execute • Device queues – set of processes waiting for an I/O device • Processes migrate among the various queues
  • 15. 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 • Context-switch time is overhead; the system does no useful work while switching • Time dependent on hardware support
  • 16. Process Creation • Parent process create children processes, which, in turn create other processes, forming a tree of processes • Resource sharing may be – Parent and children share all resources – Children share subset of parent’s resources – Parent and child share no resources • Execution mode may be – Parent and children execute concurrently – Parent waits until children terminate
  • 17. Process Termination • Process executes last statement and asks the operating system to delete it (exit) – Output data from child to parent (via wait) – Process’ resources are deallocated by operating system • Parent may terminate execution of children processes (abort) if – Child has exceeded allocated resources – Task assigned to child is no longer required – If parent is exiting • Some operating system do not allow child to continue if its parent terminates – All children terminated - cascading termination