SlideShare una empresa de Scribd logo
1 de 25
E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
Presentation on Unix
Process Management
© Copyright 2013, wavedigitech.com.
Latest update: June 15, 2013,
http://www.wavedigitech.com/
Call us on : : 91-963289173
E-Mail : info@wavedigitech.com
E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
Presentation on
Process Management
By: Arshad Ruman
Email Id:
arshadruman@gmail.com
E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
Contents
1.Process Concept:
2.Process Scheduling:
3.Operations On Process:
4.Cooperating Process:
5.Inter Process Communication:
E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
Process Concept
Classes:
Batch Processing(60’s)
Multiprogramming(70’s)
Time Sharing(70’s)
Real Time(80’s)
Distributed(90’s)
E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
OS Performs following Actions While
creating Process:
 Assign Process Id and Priority
Allocating Memory and other resources
Set up the Process environment
Creating PCB
Return Process Id
E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
Process States
E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
Process Control Block(PCB)
Process ID
Priority
Process State
PSW
CPU register
Event Information
Memory Allocation
Resource Held
PCB Pointer
Process
Scheduling
Information
PSW & CPU reg
information
Info for which
process is waiting
Pointer to another
PCB
E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
Interaction Of Processes
E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
Process Scheduling Queues
 Job queue – set of all processes in the
system.
 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.
 Process migration between the various
queues
E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
Scheduling
Activity of SELECTING the next request to be
handled by SERVER.
 Two fundamental Techniques:
1: Pre-emption Of Request
2:Reordering Of Request
Linux Process:
1: Normal or Real Time
2: Priority
E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
Representation of Process
Scheduling
E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
Four Events Of Scheduler
1: Arrival:
A request is arrived to system.
2:Scheduling:
Scheduler selects one request for servicing.
3:Pre-emption:
Request is Preempted to service other request.
4:Completion:
Process request gets completed.
E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
Schedulers
Long-term scheduler (or job scheduler) –
selects which processes should be brought
into the ready queue.
 Short-term scheduler (or CPU scheduler) –
selects which process should be executed
next and allocates CPU.
E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
Addition of Medium Term
Scheduling
E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
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.
E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
Process Creation
Parent process create children processes, which, in turn create
other processes, forming a tree of processes.
 Resource sharing
Parent and children share all resources.
Children share subset of parent’s resources.
Child will not exceed resource limits on that process.
 Execution
Parent and children execute concurrently.
Parent waits until children terminate.
E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
Process Creation (Cont.)
 Address space
Child duplicate of parent.
Child has a program loaded into it.
 UNIX examples
fork system call creates new process
exec system call used after a fork to
replace the process’ memory space with a
new program.
E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
Processes Tree on a UNIX System
E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
Process Termination
Process executes last statement and asks the operating
system to decide 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).
Child has exceeded allocated resources.
Task assigned to child is no longer required.
Parent is exiting.
Operating system does not allow child to continue if its parent
terminates.
 Cascading termination.
E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
Cooperating Processes
Independent process cannot affect or be affected by the
execution of another process.
 Cooperating process can affect or be affected by the
execution of another process.
 Advantages of process cooperation
Information sharing
Computation speed-up
Modularity
Convenience
E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
Producer-Consumer Problem
Paradigm for cooperating processes, producer
process produces information that is consumed
by a consumer process.
unbounded-buffer places no practical
limit on the size of the buffer.
bounded-buffer assumes that there is a
fixed buffer size.
E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
Interprocess Communication
(IPC)
Mechanism for processes to communicate and to
synchronize their actions.
 Message system – processes communicate with each
other without resorting to shared variables.
 IPC facility provides two operations:
send(message) – message size fixed or variable
receive(message)
 If P and Q wish to communicate, they need to:
establish a communication link between them
exchange messages via send/receive
 Implementation of communication link
physical (e.g., shared memory, hardware bus)
logical (e.g., logical properties)
E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
Shared data
#define BUFFER_SIZE 10
Typedef struct {
. . .
} item;
item buffer[BUFFER_SIZE];
int in = 0;
int out = 0;
Solution is correct, but can only use BUFFER_SIZE-1
elements
Bounded-Buffer – Shared-Memory Solution
E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
© Copyright 2013, wavedigitech.com.
Latest update: June 27, 2013,
http://www.wavedigitech.com/
Call us on : : 91-963289173
E-Mail : info@wavedigitech.com
Thank You
E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173

Más contenido relacionado

La actualidad más candente

Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]
Ravindra Raju Kolahalam
 
Multivector and multiprocessor
Multivector and multiprocessorMultivector and multiprocessor
Multivector and multiprocessor
Kishan Panara
 
Multithreading computer architecture
 Multithreading computer architecture  Multithreading computer architecture
Multithreading computer architecture
Haris456
 

La actualidad más candente (20)

Linux kernel
Linux kernelLinux kernel
Linux kernel
 
Issues in the design of Code Generator
Issues in the design of Code GeneratorIssues in the design of Code Generator
Issues in the design of Code Generator
 
Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
 
Multivector and multiprocessor
Multivector and multiprocessorMultivector and multiprocessor
Multivector and multiprocessor
 
Unix case-study
Unix case-studyUnix case-study
Unix case-study
 
Kernels and its types
Kernels and its typesKernels and its types
Kernels and its types
 
Issues in design_of_code_generator
Issues in design_of_code_generatorIssues in design_of_code_generator
Issues in design_of_code_generator
 
Fixed partitioning of memory
Fixed partitioning of memoryFixed partitioning of memory
Fixed partitioning of memory
 
Memory management
Memory managementMemory management
Memory management
 
Shell Scripting
Shell ScriptingShell Scripting
Shell Scripting
 
Multithreading computer architecture
 Multithreading computer architecture  Multithreading computer architecture
Multithreading computer architecture
 
PRESCRIPTIVE PROCESS MODEL(SOFTWARE ENGINEERING)
PRESCRIPTIVE PROCESS MODEL(SOFTWARE ENGINEERING)PRESCRIPTIVE PROCESS MODEL(SOFTWARE ENGINEERING)
PRESCRIPTIVE PROCESS MODEL(SOFTWARE ENGINEERING)
 
Compilers
CompilersCompilers
Compilers
 
Process and Threads in Linux - PPT
Process and Threads in Linux - PPTProcess and Threads in Linux - PPT
Process and Threads in Linux - PPT
 
operating system structure
operating system structureoperating system structure
operating system structure
 
Datagrams
DatagramsDatagrams
Datagrams
 
Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)
 
Linux file system
Linux file systemLinux file system
Linux file system
 
Linux Environment- Linux vs Unix
Linux Environment- Linux vs UnixLinux Environment- Linux vs Unix
Linux Environment- Linux vs Unix
 

Destacado (9)

Processes in unix
Processes in unixProcesses in unix
Processes in unix
 
Linux Introduction
Linux IntroductionLinux Introduction
Linux Introduction
 
comparing windows and linux ppt
comparing windows and linux pptcomparing windows and linux ppt
comparing windows and linux ppt
 
Unix memory management
Unix memory managementUnix memory management
Unix memory management
 
Case study linux
Case study linuxCase study linux
Case study linux
 
Linux v/s Windows
Linux v/s WindowsLinux v/s Windows
Linux v/s Windows
 
Unix Operating System
Unix Operating SystemUnix Operating System
Unix Operating System
 
Unix operating system
Unix operating systemUnix operating system
Unix operating system
 
UNIX Operating System
UNIX Operating SystemUNIX Operating System
UNIX Operating System
 

Similar a Unix Process management

Ch4 OS
Ch4 OSCh4 OS
Ch4 OS
C.U
 
Module-6 process managedf;jsovj;ksdv;sdkvnksdnvldknvlkdfsment.ppt
Module-6 process managedf;jsovj;ksdv;sdkvnksdnvldknvlkdfsment.pptModule-6 process managedf;jsovj;ksdv;sdkvnksdnvldknvlkdfsment.ppt
Module-6 process managedf;jsovj;ksdv;sdkvnksdnvldknvlkdfsment.ppt
KAnurag2
 
KP Controls CV 1.4
KP Controls CV 1.4KP Controls CV 1.4
KP Controls CV 1.4
kevin pratt
 

Similar a Unix Process management (20)

Ch4: Processes (OS)
Ch4: Processes (OS)Ch4: Processes (OS)
Ch4: Processes (OS)
 
Process concept
Process conceptProcess concept
Process concept
 
Week03-Ch3-Process Concept.pptx.gfhgvjhg
Week03-Ch3-Process Concept.pptx.gfhgvjhgWeek03-Ch3-Process Concept.pptx.gfhgvjhg
Week03-Ch3-Process Concept.pptx.gfhgvjhg
 
111 118
111 118111 118
111 118
 
111 118
111 118111 118
111 118
 
OS_Process_Management_Chap4.pptx
OS_Process_Management_Chap4.pptxOS_Process_Management_Chap4.pptx
OS_Process_Management_Chap4.pptx
 
Ch4 OS
Ch4 OSCh4 OS
Ch4 OS
 
OS_Ch4
OS_Ch4OS_Ch4
OS_Ch4
 
Process
ProcessProcess
Process
 
OSCh4
OSCh4OSCh4
OSCh4
 
Module-6 process managedf;jsovj;ksdv;sdkvnksdnvldknvlkdfsment.ppt
Module-6 process managedf;jsovj;ksdv;sdkvnksdnvldknvlkdfsment.pptModule-6 process managedf;jsovj;ksdv;sdkvnksdnvldknvlkdfsment.ppt
Module-6 process managedf;jsovj;ksdv;sdkvnksdnvldknvlkdfsment.ppt
 
3.Process Management
3.Process Management3.Process Management
3.Process Management
 
Cs8493 unit 2
Cs8493 unit 2Cs8493 unit 2
Cs8493 unit 2
 
OS UNIT2.ppt
OS UNIT2.pptOS UNIT2.ppt
OS UNIT2.ppt
 
NCMS UberCloud Experiment Webinar .
NCMS UberCloud Experiment Webinar .NCMS UberCloud Experiment Webinar .
NCMS UberCloud Experiment Webinar .
 
KP Controls CV 1.4
KP Controls CV 1.4KP Controls CV 1.4
KP Controls CV 1.4
 
Ten questions to ask before choosing SCADA software
Ten questions to ask before choosing SCADA softwareTen questions to ask before choosing SCADA software
Ten questions to ask before choosing SCADA software
 
A Survey on Heuristic Based Techniques in Cloud Computing
A Survey on Heuristic Based Techniques in Cloud ComputingA Survey on Heuristic Based Techniques in Cloud Computing
A Survey on Heuristic Based Techniques in Cloud Computing
 
PLC AND SCADA SYSTEM By Briight Industrial Solution
PLC AND SCADA SYSTEM By Briight Industrial SolutionPLC AND SCADA SYSTEM By Briight Industrial Solution
PLC AND SCADA SYSTEM By Briight Industrial Solution
 
ch3_smu.ppt
ch3_smu.pptch3_smu.ppt
ch3_smu.ppt
 

Más de Wave Digitech

Más de Wave Digitech (17)

54 sms based irrigation system
54 sms based irrigation system54 sms based irrigation system
54 sms based irrigation system
 
54 a automatic irrigation system
54 a automatic irrigation system54 a automatic irrigation system
54 a automatic irrigation system
 
Implementation of solar illumination system with three-stage charging and dim...
Implementation of solar illumination system with three-stage charging and dim...Implementation of solar illumination system with three-stage charging and dim...
Implementation of solar illumination system with three-stage charging and dim...
 
Zl embd045 wireless telemedia system based on arm and web server
Zl embd045 wireless telemedia system based on arm and web serverZl embd045 wireless telemedia system based on arm and web server
Zl embd045 wireless telemedia system based on arm and web server
 
Zl embd029 arm and rfid based event management monitoring system
Zl embd029 arm and rfid based event management monitoring systemZl embd029 arm and rfid based event management monitoring system
Zl embd029 arm and rfid based event management monitoring system
 
Arm
ArmArm
Arm
 
8051
80518051
8051
 
Projects wavedigitech-2013
Projects wavedigitech-2013Projects wavedigitech-2013
Projects wavedigitech-2013
 
Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013
 
Difference bw android4.2 to android 4.3
Difference bw android4.2 to android 4.3Difference bw android4.2 to android 4.3
Difference bw android4.2 to android 4.3
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013
 
Android debug bridge
Android debug bridgeAndroid debug bridge
Android debug bridge
 
Useful Linux and Unix commands handbook
Useful Linux and Unix commands handbookUseful Linux and Unix commands handbook
Useful Linux and Unix commands handbook
 
Wavedigitech training-broucher-june2013
Wavedigitech training-broucher-june2013Wavedigitech training-broucher-june2013
Wavedigitech training-broucher-june2013
 
Wavedigitech presentation-2013-v1
Wavedigitech presentation-2013-v1Wavedigitech presentation-2013-v1
Wavedigitech presentation-2013-v1
 
Wavedigitech presentation-2013
Wavedigitech presentation-2013Wavedigitech presentation-2013
Wavedigitech presentation-2013
 
Wavedigitech gdb
Wavedigitech gdbWavedigitech gdb
Wavedigitech gdb
 

Último

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Unix Process management

  • 1. E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173 Presentation on Unix Process Management
  • 2. © Copyright 2013, wavedigitech.com. Latest update: June 15, 2013, http://www.wavedigitech.com/ Call us on : : 91-963289173 E-Mail : info@wavedigitech.com E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
  • 3. Presentation on Process Management By: Arshad Ruman Email Id: arshadruman@gmail.com E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
  • 4. Contents 1.Process Concept: 2.Process Scheduling: 3.Operations On Process: 4.Cooperating Process: 5.Inter Process Communication: E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
  • 5. Process Concept Classes: Batch Processing(60’s) Multiprogramming(70’s) Time Sharing(70’s) Real Time(80’s) Distributed(90’s) E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
  • 6. OS Performs following Actions While creating Process:  Assign Process Id and Priority Allocating Memory and other resources Set up the Process environment Creating PCB Return Process Id E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
  • 7. Process States E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
  • 8. Process Control Block(PCB) Process ID Priority Process State PSW CPU register Event Information Memory Allocation Resource Held PCB Pointer Process Scheduling Information PSW & CPU reg information Info for which process is waiting Pointer to another PCB E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
  • 9. Interaction Of Processes E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
  • 10. Process Scheduling Queues  Job queue – set of all processes in the system.  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.  Process migration between the various queues E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
  • 11. Scheduling Activity of SELECTING the next request to be handled by SERVER.  Two fundamental Techniques: 1: Pre-emption Of Request 2:Reordering Of Request Linux Process: 1: Normal or Real Time 2: Priority E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
  • 12. Representation of Process Scheduling E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
  • 13. Four Events Of Scheduler 1: Arrival: A request is arrived to system. 2:Scheduling: Scheduler selects one request for servicing. 3:Pre-emption: Request is Preempted to service other request. 4:Completion: Process request gets completed. E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
  • 14. Schedulers Long-term scheduler (or job scheduler) – selects which processes should be brought into the ready queue.  Short-term scheduler (or CPU scheduler) – selects which process should be executed next and allocates CPU. E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
  • 15. Addition of Medium Term Scheduling E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
  • 16. 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. E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
  • 17. Process Creation Parent process create children processes, which, in turn create other processes, forming a tree of processes.  Resource sharing Parent and children share all resources. Children share subset of parent’s resources. Child will not exceed resource limits on that process.  Execution Parent and children execute concurrently. Parent waits until children terminate. E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
  • 18. Process Creation (Cont.)  Address space Child duplicate of parent. Child has a program loaded into it.  UNIX examples fork system call creates new process exec system call used after a fork to replace the process’ memory space with a new program. E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
  • 19. Processes Tree on a UNIX System E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
  • 20. Process Termination Process executes last statement and asks the operating system to decide 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). Child has exceeded allocated resources. Task assigned to child is no longer required. Parent is exiting. Operating system does not allow child to continue if its parent terminates.  Cascading termination. E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
  • 21. Cooperating Processes Independent process cannot affect or be affected by the execution of another process.  Cooperating process can affect or be affected by the execution of another process.  Advantages of process cooperation Information sharing Computation speed-up Modularity Convenience E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
  • 22. Producer-Consumer Problem Paradigm for cooperating processes, producer process produces information that is consumed by a consumer process. unbounded-buffer places no practical limit on the size of the buffer. bounded-buffer assumes that there is a fixed buffer size. E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
  • 23. Interprocess Communication (IPC) Mechanism for processes to communicate and to synchronize their actions.  Message system – processes communicate with each other without resorting to shared variables.  IPC facility provides two operations: send(message) – message size fixed or variable receive(message)  If P and Q wish to communicate, they need to: establish a communication link between them exchange messages via send/receive  Implementation of communication link physical (e.g., shared memory, hardware bus) logical (e.g., logical properties) E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
  • 24. Shared data #define BUFFER_SIZE 10 Typedef struct { . . . } item; item buffer[BUFFER_SIZE]; int in = 0; int out = 0; Solution is correct, but can only use BUFFER_SIZE-1 elements Bounded-Buffer – Shared-Memory Solution E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173
  • 25. © Copyright 2013, wavedigitech.com. Latest update: June 27, 2013, http://www.wavedigitech.com/ Call us on : : 91-963289173 E-Mail : info@wavedigitech.com Thank You E-mail: info@wavedigitech.com; http://www.wavedigitech.com Phone : 91-963289173