SlideShare uma empresa 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

Mais conteúdo relacionado

Mais procurados

Live data collection_from_windows_system
Live data collection_from_windows_systemLive data collection_from_windows_system
Live data collection_from_windows_system
Maceni Muse
 
Process management in os
Process management in osProcess management in os
Process management in os
Miong Lazaro
 
Memory forensics
Memory forensicsMemory forensics
Memory forensics
Sunil Kumar
 

Mais procurados (20)

Systems Administration
Systems AdministrationSystems Administration
Systems Administration
 
Process management in linux
Process management in linuxProcess management in linux
Process management in linux
 
scheduling
schedulingscheduling
scheduling
 
Shell and its types in LINUX
Shell and its types in LINUXShell and its types in LINUX
Shell and its types in LINUX
 
Live data collection_from_windows_system
Live data collection_from_windows_systemLive data collection_from_windows_system
Live data collection_from_windows_system
 
Process management in os
Process management in osProcess management in os
Process management in os
 
Scheduling
SchedulingScheduling
Scheduling
 
Description of GRUB 2
Description of GRUB 2Description of GRUB 2
Description of GRUB 2
 
Basic commands of linux
Basic commands of linuxBasic commands of linux
Basic commands of linux
 
Resource Monitoring and management
Resource Monitoring and management  Resource Monitoring and management
Resource Monitoring and management
 
CS9222 Advanced Operating System
CS9222 Advanced Operating SystemCS9222 Advanced Operating System
CS9222 Advanced Operating System
 
File system Os
File system OsFile system Os
File system Os
 
First fit , Best fit, Worst fit
First fit , Best fit, Worst fitFirst fit , Best fit, Worst fit
First fit , Best fit, Worst fit
 
Memory forensics
Memory forensicsMemory forensics
Memory forensics
 
File system
File systemFile system
File system
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
 
CS6401 OPERATING SYSTEMS Unit 2
CS6401 OPERATING SYSTEMS Unit 2CS6401 OPERATING SYSTEMS Unit 2
CS6401 OPERATING SYSTEMS Unit 2
 
Process scheduling linux
Process scheduling linuxProcess scheduling linux
Process scheduling linux
 
contiguous memory allocation.pptx
contiguous memory allocation.pptxcontiguous memory allocation.pptx
contiguous memory allocation.pptx
 
Ipc in linux
Ipc in linuxIpc in linux
Ipc in linux
 

Destaque (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
 

Semelhante 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
 

Semelhante 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
 

Mais de Wave Digitech

Mais 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

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+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@
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
+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...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

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