SlideShare a Scribd company logo
1 of 17
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

What's hot

Processes and operating systems
Processes and operating systemsProcesses and operating systems
Processes and operating systemsRAMPRAKASHT1
 
Basic concept of process
Basic concept of processBasic concept of process
Basic concept of processNabin Dahal
 
Unit v: Device Management
Unit v: Device ManagementUnit v: Device Management
Unit v: Device ManagementArnav Chowdhury
 
Operating system 31 multiple processor scheduling
Operating system 31 multiple processor schedulingOperating system 31 multiple processor scheduling
Operating system 31 multiple processor schedulingVaibhav Khanna
 
Operating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - ProcessesOperating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - ProcessesPeter Tröger
 
08 operating system support
08 operating system support08 operating system support
08 operating system supportBitta_man
 
08 operating system support
08 operating system support08 operating system support
08 operating system supportAnwal Mirza
 
Process Control Block & Threads and Their Management
Process Control Block & Threads and Their ManagementProcess Control Block & Threads and Their Management
Process Control Block & Threads and Their ManagementUjjwal Kumar
 
Learn about computer hardware and software
Learn about computer hardware and softwareLearn about computer hardware and software
Learn about computer hardware and softwarefarrukh ishaq choudhary
 
Os unit 3 , process management
Os unit 3 , process managementOs unit 3 , process management
Os unit 3 , process managementArnav Chowdhury
 
Unit 1 operating system
Unit 1 operating systemUnit 1 operating system
Unit 1 operating systemMeeta
 

What's hot (20)

Os unit 2
Os unit 2Os unit 2
Os unit 2
 
Operating systems
Operating systemsOperating systems
Operating systems
 
Processes and operating systems
Processes and operating systemsProcesses and operating systems
Processes and operating systems
 
Lecture5
Lecture5Lecture5
Lecture5
 
Basic concept of process
Basic concept of processBasic concept of process
Basic concept of process
 
Unit v: Device Management
Unit v: Device ManagementUnit v: Device Management
Unit v: Device Management
 
Operating system 31 multiple processor scheduling
Operating system 31 multiple processor schedulingOperating system 31 multiple processor scheduling
Operating system 31 multiple processor scheduling
 
Os4
Os4Os4
Os4
 
Os
OsOs
Os
 
Mis unit iii by arnav
Mis unit iii by arnavMis unit iii by arnav
Mis unit iii by arnav
 
Operating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - ProcessesOperating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - Processes
 
08 operating system support
08 operating system support08 operating system support
08 operating system support
 
Process management
Process managementProcess management
Process management
 
08 operating system support
08 operating system support08 operating system support
08 operating system support
 
Process Control Block & Threads and Their Management
Process Control Block & Threads and Their ManagementProcess Control Block & Threads and Their Management
Process Control Block & Threads and Their Management
 
Os1
Os1Os1
Os1
 
Memory management1
Memory management1Memory management1
Memory management1
 
Learn about computer hardware and software
Learn about computer hardware and softwareLearn about computer hardware and software
Learn about computer hardware and software
 
Os unit 3 , process management
Os unit 3 , process managementOs unit 3 , process management
Os unit 3 , process management
 
Unit 1 operating system
Unit 1 operating systemUnit 1 operating system
Unit 1 operating system
 

Viewers also liked

PAQUETE MATEMATICO grado 5° primaria
PAQUETE MATEMATICO grado 5° primariaPAQUETE MATEMATICO grado 5° primaria
PAQUETE MATEMATICO grado 5° primariajuanhosarmiento
 
Práctica ofimática
Práctica ofimáticaPráctica ofimática
Práctica ofimáticalvpenayo
 
Construcción de las unidades de medida
Construcción de las unidades de medida Construcción de las unidades de medida
Construcción de las unidades de medida Itzel Ponce Silva
 
Planeacion bloque i - primero
Planeacion   bloque i - primeroPlaneacion   bloque i - primero
Planeacion bloque i - primeroJua Jua Cuac Cuax
 
Plan de asignatura tecnologia 2014 completo
Plan de asignatura tecnologia 2014 completoPlan de asignatura tecnologia 2014 completo
Plan de asignatura tecnologia 2014 completoIndependiente
 
Plan anual ofimatica 2º 2014 2015
Plan anual ofimatica  2º 2014 2015Plan anual ofimatica  2º 2014 2015
Plan anual ofimatica 2º 2014 2015Monix de Ciudad
 
Actividades de matemáticas 2º educación primaria
Actividades de matemáticas 2º educación primariaActividades de matemáticas 2º educación primaria
Actividades de matemáticas 2º educación primariaHatsep Sen
 

Viewers also liked (10)

PAQUETE MATEMATICO grado 5° primaria
PAQUETE MATEMATICO grado 5° primariaPAQUETE MATEMATICO grado 5° primaria
PAQUETE MATEMATICO grado 5° primaria
 
Práctica ofimática
Práctica ofimáticaPráctica ofimática
Práctica ofimática
 
Unidadesdemedida 140516185146-phpapp02
Unidadesdemedida 140516185146-phpapp02Unidadesdemedida 140516185146-phpapp02
Unidadesdemedida 140516185146-phpapp02
 
Ofimatica i clase
Ofimatica i claseOfimatica i clase
Ofimatica i clase
 
Construcción de las unidades de medida
Construcción de las unidades de medida Construcción de las unidades de medida
Construcción de las unidades de medida
 
Planeacion bloque i - primero
Planeacion   bloque i - primeroPlaneacion   bloque i - primero
Planeacion bloque i - primero
 
Plan de aula tecnologia 2014 2015 primaria 3-5
Plan de aula tecnologia 2014   2015  primaria 3-5 Plan de aula tecnologia 2014   2015  primaria 3-5
Plan de aula tecnologia 2014 2015 primaria 3-5
 
Plan de asignatura tecnologia 2014 completo
Plan de asignatura tecnologia 2014 completoPlan de asignatura tecnologia 2014 completo
Plan de asignatura tecnologia 2014 completo
 
Plan anual ofimatica 2º 2014 2015
Plan anual ofimatica  2º 2014 2015Plan anual ofimatica  2º 2014 2015
Plan anual ofimatica 2º 2014 2015
 
Actividades de matemáticas 2º educación primaria
Actividades de matemáticas 2º educación primariaActividades de matemáticas 2º educación primaria
Actividades de matemáticas 2º educación primaria
 

Similar to Processes

Process Management.pdf
Process Management.pdfProcess Management.pdf
Process Management.pdfYashjangid9
 
OS_Unit II - Process Management_CATI.pptx
OS_Unit II - Process Management_CATI.pptxOS_Unit II - Process Management_CATI.pptx
OS_Unit II - Process Management_CATI.pptxGokhul2
 
opearating system notes mumbai university.pptx
opearating system notes mumbai university.pptxopearating system notes mumbai university.pptx
opearating system notes mumbai university.pptxssuser3dfcef
 
L-5 BCEProcess management.ppt
L-5 BCEProcess management.pptL-5 BCEProcess management.ppt
L-5 BCEProcess management.pptKirti Verma
 
Chapter -2 operating system presentation
Chapter -2 operating system presentationChapter -2 operating system presentation
Chapter -2 operating system presentationchnrketan
 
Lecture 2- Processes.pdf
Lecture 2- Processes.pdfLecture 2- Processes.pdf
Lecture 2- Processes.pdfAmanuelmergia
 
Operating Systems chap 2_updated2 (1).pptx
Operating Systems chap 2_updated2 (1).pptxOperating Systems chap 2_updated2 (1).pptx
Operating Systems chap 2_updated2 (1).pptxAmanuelmergia
 
Process Concepts (voice over ppt)
Process Concepts (voice over ppt)Process Concepts (voice over ppt)
Process Concepts (voice over ppt)Kaushik Ghosh
 
Operating Systems chap 2_updated2.pptx
Operating Systems chap 2_updated2.pptxOperating Systems chap 2_updated2.pptx
Operating Systems chap 2_updated2.pptxAmanuelmergia
 
Module 1 Introduction.ppt
Module 1 Introduction.pptModule 1 Introduction.ppt
Module 1 Introduction.pptshreesha16
 
Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...
Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...
Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...morganjohn3
 
Processes Control Block (Operating System)
Processes Control Block (Operating System)Processes Control Block (Operating System)
Processes Control Block (Operating System)Imdad Ullah
 
Unit 2_OS process management
Unit 2_OS process management Unit 2_OS process management
Unit 2_OS process management JayeshGadhave1
 
CSE3120- Module1 part 1 v1.pptx
CSE3120- Module1 part 1 v1.pptxCSE3120- Module1 part 1 v1.pptx
CSE3120- Module1 part 1 v1.pptxakhilagajjala
 
Lecture- 2_Process Management.pdf
Lecture- 2_Process Management.pdfLecture- 2_Process Management.pdf
Lecture- 2_Process Management.pdfHarika Pudugosula
 
Real Time Kernels and Operating Systems.pptx
Real Time Kernels and Operating Systems.pptxReal Time Kernels and Operating Systems.pptx
Real Time Kernels and Operating Systems.pptxGeethashreeAECE
 
Evolution, Strutcture and Operations.pptx
Evolution, Strutcture and Operations.pptxEvolution, Strutcture and Operations.pptx
Evolution, Strutcture and Operations.pptxssuser000e54
 

Similar to Processes (20)

Process Management.pdf
Process Management.pdfProcess Management.pdf
Process Management.pdf
 
OS_Unit II - Process Management_CATI.pptx
OS_Unit II - Process Management_CATI.pptxOS_Unit II - Process Management_CATI.pptx
OS_Unit II - Process Management_CATI.pptx
 
UNIT I-Processes.pptx
UNIT I-Processes.pptxUNIT I-Processes.pptx
UNIT I-Processes.pptx
 
opearating system notes mumbai university.pptx
opearating system notes mumbai university.pptxopearating system notes mumbai university.pptx
opearating system notes mumbai university.pptx
 
L-5 BCEProcess management.ppt
L-5 BCEProcess management.pptL-5 BCEProcess management.ppt
L-5 BCEProcess management.ppt
 
Chapter -2 operating system presentation
Chapter -2 operating system presentationChapter -2 operating system presentation
Chapter -2 operating system presentation
 
Lecture 2- Processes.pdf
Lecture 2- Processes.pdfLecture 2- Processes.pdf
Lecture 2- Processes.pdf
 
Operating Systems chap 2_updated2 (1).pptx
Operating Systems chap 2_updated2 (1).pptxOperating Systems chap 2_updated2 (1).pptx
Operating Systems chap 2_updated2 (1).pptx
 
Process Concepts (voice over ppt)
Process Concepts (voice over ppt)Process Concepts (voice over ppt)
Process Concepts (voice over ppt)
 
Operating Systems chap 2_updated2.pptx
Operating Systems chap 2_updated2.pptxOperating Systems chap 2_updated2.pptx
Operating Systems chap 2_updated2.pptx
 
Operating System
Operating SystemOperating System
Operating System
 
Process management1
Process management1Process management1
Process management1
 
Module 1 Introduction.ppt
Module 1 Introduction.pptModule 1 Introduction.ppt
Module 1 Introduction.ppt
 
Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...
Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...
Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...
 
Processes Control Block (Operating System)
Processes Control Block (Operating System)Processes Control Block (Operating System)
Processes Control Block (Operating System)
 
Unit 2_OS process management
Unit 2_OS process management Unit 2_OS process management
Unit 2_OS process management
 
CSE3120- Module1 part 1 v1.pptx
CSE3120- Module1 part 1 v1.pptxCSE3120- Module1 part 1 v1.pptx
CSE3120- Module1 part 1 v1.pptx
 
Lecture- 2_Process Management.pdf
Lecture- 2_Process Management.pdfLecture- 2_Process Management.pdf
Lecture- 2_Process Management.pdf
 
Real Time Kernels and Operating Systems.pptx
Real Time Kernels and Operating Systems.pptxReal Time Kernels and Operating Systems.pptx
Real Time Kernels and Operating Systems.pptx
 
Evolution, Strutcture and Operations.pptx
Evolution, Strutcture and Operations.pptxEvolution, Strutcture and Operations.pptx
Evolution, Strutcture and Operations.pptx
 

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