SlideShare a Scribd company logo
1 of 9
Dr.M.Karthika,
AP/Information Technology
MTNC,Madurai.
29.8.21
 One of the ways to achieve Process
synchronization. The monitor is supported by
programming languages to achieve mutual
exclusion between processes.
 It is the collection of condition variables and
procedures combined together in a special kind of
module or a package.
 The processes running outside the monitor can’t
access the internal variable of the monitor but can
call procedures of the monitor.
 Only one process at a time can execute code
inside monitors.
9/29/2021
2
Dr.M.Karthika/AP/MTNC
1. Inside the monitors, we can only execute one
process at a time.
2. Monitors are the group of procedures, and condition
variables that are merged together in a special type
of module.
3. If the process is running outside the monitor, then it
cannot access the monitor’s internal variable. But a
process can call the procedures of the monitor.
4. Monitors offer high-level of synchronization
5. Monitors were derived to simplify the complexity of
synchronization problems.
6. There is only one process that can be active at a
time inside the monitor.
9/29/2021
Dr.M.Karthika/AP/MTNC
3
9/29/2021
4
Dr.M.Karthika/AP/MTNC
Two different operations are performed on
the condition variables of the monitor.
Wait. signal. let say we have 2 condition
variables
condition x, y; // Declaring variable
9/29/2021
5
Dr.M.Karthika/AP/MTNC
x.wait() :
Process performing wait operation on any
condition variable are suspended. The
suspended processes are placed in block
queue of that condition variable.
Note: Each condition variable has its
unique block queue.
9/29/2021
6
Dr.M.Karthika/AP/MTNC
x.signal():
When a process performs signal operation
on condition variable, one of the blocked
processes is given chance.
If (x block queue empty)
// Ignore signal else
// Resume a process from block queue.
9/29/2021
7
Dr.M.Karthika/AP/MTNC
 Advantages of Monitor:
Monitors have the advantage of making parallel
programming easier and less error prone than
using techniques such as semaphore.
 Disadvantages of Monitor:
Monitors have to be implemented as part of the
programming language . The compiler must
generate code for them. This gives the compiler
the additional burden of having to know what
operating system facilities are available to control
access to critical sections in concurrent
processes.
9/29/2021
8
Dr.M.Karthika/AP/MTNC
THANK YOU
9/29/2021
9
Dr.M.Karthika/AP/MTNC

More Related Content

Similar to Process Synchronization - Monitors

Annunciator for Hazard Prevention & Temperature Control
Annunciator for Hazard Prevention & Temperature ControlAnnunciator for Hazard Prevention & Temperature Control
Annunciator for Hazard Prevention & Temperature ControlIOSR Journals
 
FAULT DETECTION AND DIAGNOSIS OF INDUCTION MACHINE WITH ON-LINE PARAMETER PR...
FAULT DETECTION AND DIAGNOSIS OF INDUCTION MACHINE  WITH ON-LINE PARAMETER PR...FAULT DETECTION AND DIAGNOSIS OF INDUCTION MACHINE  WITH ON-LINE PARAMETER PR...
FAULT DETECTION AND DIAGNOSIS OF INDUCTION MACHINE WITH ON-LINE PARAMETER PR...Sheikh R Manihar Ahmed
 
Yokogawa UGS Solution for System Integration with Third Party
Yokogawa UGS Solution for System Integration with Third PartyYokogawa UGS Solution for System Integration with Third Party
Yokogawa UGS Solution for System Integration with Third PartyAmit Sharma
 
A fault tolerant tokenbased atomic broadcast algorithm relying on responsive ...
A fault tolerant tokenbased atomic broadcast algorithm relying on responsive ...A fault tolerant tokenbased atomic broadcast algorithm relying on responsive ...
A fault tolerant tokenbased atomic broadcast algorithm relying on responsive ...Neelamani Samal
 
(Modifid)condition m0nitoring of longwall face supportd
(Modifid)condition m0nitoring of longwall face supportd(Modifid)condition m0nitoring of longwall face supportd
(Modifid)condition m0nitoring of longwall face supportdrockyraj19
 
TRAFFIC LIGHT PRIORITY FOR EMERGENCY VEHICLE
TRAFFIC LIGHT PRIORITY FOR EMERGENCY VEHICLETRAFFIC LIGHT PRIORITY FOR EMERGENCY VEHICLE
TRAFFIC LIGHT PRIORITY FOR EMERGENCY VEHICLEIRJET Journal
 
Mule soft meetup__adelaide_october_2020_final (2)
Mule soft meetup__adelaide_october_2020_final (2)Mule soft meetup__adelaide_october_2020_final (2)
Mule soft meetup__adelaide_october_2020_final (2)Nicholas Bowman
 
Checkpointing and Rollback Recovery Algorithms for Fault Tolerance in MANETs:...
Checkpointing and Rollback Recovery Algorithms for Fault Tolerance in MANETs:...Checkpointing and Rollback Recovery Algorithms for Fault Tolerance in MANETs:...
Checkpointing and Rollback Recovery Algorithms for Fault Tolerance in MANETs:...Eswar Publications
 
UVM_Full_Print_n.pptx
UVM_Full_Print_n.pptxUVM_Full_Print_n.pptx
UVM_Full_Print_n.pptxnikitha992646
 
Monitor(karthika)
Monitor(karthika)Monitor(karthika)
Monitor(karthika)Nagarajan
 
UVM ARCHITECTURE FOR VERIFICATION
UVM ARCHITECTURE FOR VERIFICATIONUVM ARCHITECTURE FOR VERIFICATION
UVM ARCHITECTURE FOR VERIFICATIONIAEME Publication
 
Android Implementation using MQTT Protocol
Android Implementation using MQTT ProtocolAndroid Implementation using MQTT Protocol
Android Implementation using MQTT ProtocolFatih Özlü
 
Vigilance control system using mcf5235 processor
Vigilance control system using mcf5235 processorVigilance control system using mcf5235 processor
Vigilance control system using mcf5235 processoreSAT Publishing House
 
Fault Tolerant and Distributed System
Fault Tolerant and Distributed SystemFault Tolerant and Distributed System
Fault Tolerant and Distributed Systemsreenivas1591
 
IRJET- Design and Implementation of High Speed FPGA Configuration using SBI
IRJET- Design and Implementation of High Speed FPGA Configuration using SBIIRJET- Design and Implementation of High Speed FPGA Configuration using SBI
IRJET- Design and Implementation of High Speed FPGA Configuration using SBIIRJET Journal
 
Design of Mechatronics System
Design of Mechatronics SystemDesign of Mechatronics System
Design of Mechatronics SystemVeerakumar S
 

Similar to Process Synchronization - Monitors (20)

Annunciator for Hazard Prevention & Temperature Control
Annunciator for Hazard Prevention & Temperature ControlAnnunciator for Hazard Prevention & Temperature Control
Annunciator for Hazard Prevention & Temperature Control
 
FAULT DETECTION AND DIAGNOSIS OF INDUCTION MACHINE WITH ON-LINE PARAMETER PR...
FAULT DETECTION AND DIAGNOSIS OF INDUCTION MACHINE  WITH ON-LINE PARAMETER PR...FAULT DETECTION AND DIAGNOSIS OF INDUCTION MACHINE  WITH ON-LINE PARAMETER PR...
FAULT DETECTION AND DIAGNOSIS OF INDUCTION MACHINE WITH ON-LINE PARAMETER PR...
 
Yokogawa UGS Solution for System Integration with Third Party
Yokogawa UGS Solution for System Integration with Third PartyYokogawa UGS Solution for System Integration with Third Party
Yokogawa UGS Solution for System Integration with Third Party
 
A fault tolerant tokenbased atomic broadcast algorithm relying on responsive ...
A fault tolerant tokenbased atomic broadcast algorithm relying on responsive ...A fault tolerant tokenbased atomic broadcast algorithm relying on responsive ...
A fault tolerant tokenbased atomic broadcast algorithm relying on responsive ...
 
Monitors
MonitorsMonitors
Monitors
 
(Modifid)condition m0nitoring of longwall face supportd
(Modifid)condition m0nitoring of longwall face supportd(Modifid)condition m0nitoring of longwall face supportd
(Modifid)condition m0nitoring of longwall face supportd
 
TRAFFIC LIGHT PRIORITY FOR EMERGENCY VEHICLE
TRAFFIC LIGHT PRIORITY FOR EMERGENCY VEHICLETRAFFIC LIGHT PRIORITY FOR EMERGENCY VEHICLE
TRAFFIC LIGHT PRIORITY FOR EMERGENCY VEHICLE
 
Mule soft meetup__adelaide_october_2020_final (2)
Mule soft meetup__adelaide_october_2020_final (2)Mule soft meetup__adelaide_october_2020_final (2)
Mule soft meetup__adelaide_october_2020_final (2)
 
Automated Process control.ppt
Automated Process control.pptAutomated Process control.ppt
Automated Process control.ppt
 
Checkpointing and Rollback Recovery Algorithms for Fault Tolerance in MANETs:...
Checkpointing and Rollback Recovery Algorithms for Fault Tolerance in MANETs:...Checkpointing and Rollback Recovery Algorithms for Fault Tolerance in MANETs:...
Checkpointing and Rollback Recovery Algorithms for Fault Tolerance in MANETs:...
 
A Practical Fault Tolerance Approach in Cloud Computing Using Support Vector ...
A Practical Fault Tolerance Approach in Cloud Computing Using Support Vector ...A Practical Fault Tolerance Approach in Cloud Computing Using Support Vector ...
A Practical Fault Tolerance Approach in Cloud Computing Using Support Vector ...
 
UVM_Full_Print_n.pptx
UVM_Full_Print_n.pptxUVM_Full_Print_n.pptx
UVM_Full_Print_n.pptx
 
Monitor(karthika)
Monitor(karthika)Monitor(karthika)
Monitor(karthika)
 
UVM ARCHITECTURE FOR VERIFICATION
UVM ARCHITECTURE FOR VERIFICATIONUVM ARCHITECTURE FOR VERIFICATION
UVM ARCHITECTURE FOR VERIFICATION
 
Android Implementation using MQTT Protocol
Android Implementation using MQTT ProtocolAndroid Implementation using MQTT Protocol
Android Implementation using MQTT Protocol
 
Mutual exclusion and sync
Mutual exclusion and syncMutual exclusion and sync
Mutual exclusion and sync
 
Vigilance control system using mcf5235 processor
Vigilance control system using mcf5235 processorVigilance control system using mcf5235 processor
Vigilance control system using mcf5235 processor
 
Fault Tolerant and Distributed System
Fault Tolerant and Distributed SystemFault Tolerant and Distributed System
Fault Tolerant and Distributed System
 
IRJET- Design and Implementation of High Speed FPGA Configuration using SBI
IRJET- Design and Implementation of High Speed FPGA Configuration using SBIIRJET- Design and Implementation of High Speed FPGA Configuration using SBI
IRJET- Design and Implementation of High Speed FPGA Configuration using SBI
 
Design of Mechatronics System
Design of Mechatronics SystemDesign of Mechatronics System
Design of Mechatronics System
 

More from Dr.M.Karthika parthasarathy

IoT Enabled Wireless Technology Based Monitoring and Speed Control of Motor U...
IoT Enabled Wireless Technology Based Monitoring and Speed Control of Motor U...IoT Enabled Wireless Technology Based Monitoring and Speed Control of Motor U...
IoT Enabled Wireless Technology Based Monitoring and Speed Control of Motor U...Dr.M.Karthika parthasarathy
 
Unit 1 Introduction to Artificial Intelligence.pptx
Unit 1 Introduction to Artificial Intelligence.pptxUnit 1 Introduction to Artificial Intelligence.pptx
Unit 1 Introduction to Artificial Intelligence.pptxDr.M.Karthika parthasarathy
 

More from Dr.M.Karthika parthasarathy (20)

IoT Enabled Wireless Technology Based Monitoring and Speed Control of Motor U...
IoT Enabled Wireless Technology Based Monitoring and Speed Control of Motor U...IoT Enabled Wireless Technology Based Monitoring and Speed Control of Motor U...
IoT Enabled Wireless Technology Based Monitoring and Speed Control of Motor U...
 
Linux Lab Manual.doc
Linux Lab Manual.docLinux Lab Manual.doc
Linux Lab Manual.doc
 
Unit 2 IoT.pdf
Unit 2 IoT.pdfUnit 2 IoT.pdf
Unit 2 IoT.pdf
 
Unit 3 IOT.docx
Unit 3 IOT.docxUnit 3 IOT.docx
Unit 3 IOT.docx
 
Unit 1 Introduction to Artificial Intelligence.pptx
Unit 1 Introduction to Artificial Intelligence.pptxUnit 1 Introduction to Artificial Intelligence.pptx
Unit 1 Introduction to Artificial Intelligence.pptx
 
Unit I What is Artificial Intelligence.docx
Unit I What is Artificial Intelligence.docxUnit I What is Artificial Intelligence.docx
Unit I What is Artificial Intelligence.docx
 
Introduction to IoT - Unit II.pptx
Introduction to IoT - Unit II.pptxIntroduction to IoT - Unit II.pptx
Introduction to IoT - Unit II.pptx
 
IoT Unit 2.pdf
IoT Unit 2.pdfIoT Unit 2.pdf
IoT Unit 2.pdf
 
Chapter 3 heuristic search techniques
Chapter 3 heuristic search techniquesChapter 3 heuristic search techniques
Chapter 3 heuristic search techniques
 
Ai mcq chapter 2
Ai mcq chapter 2Ai mcq chapter 2
Ai mcq chapter 2
 
Introduction to IoT unit II
Introduction to IoT  unit IIIntroduction to IoT  unit II
Introduction to IoT unit II
 
Introduction to IoT - Unit I
Introduction to IoT - Unit IIntroduction to IoT - Unit I
Introduction to IoT - Unit I
 
Internet of things Unit 1 one word
Internet of things Unit 1 one wordInternet of things Unit 1 one word
Internet of things Unit 1 one word
 
Unit 1 q&a
Unit  1 q&aUnit  1 q&a
Unit 1 q&a
 
.net progrmming part4
.net progrmming part4.net progrmming part4
.net progrmming part4
 
.net progrmming part3
.net progrmming part3.net progrmming part3
.net progrmming part3
 
.net progrmming part1
.net progrmming part1.net progrmming part1
.net progrmming part1
 
.net progrmming part2
.net progrmming part2.net progrmming part2
.net progrmming part2
 
Java programs
Java programsJava programs
Java programs
 
What is a shell script
What is a shell scriptWhat is a shell script
What is a shell script
 

Recently uploaded

Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 

Recently uploaded (20)

Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 

Process Synchronization - Monitors

  • 2.  One of the ways to achieve Process synchronization. The monitor is supported by programming languages to achieve mutual exclusion between processes.  It is the collection of condition variables and procedures combined together in a special kind of module or a package.  The processes running outside the monitor can’t access the internal variable of the monitor but can call procedures of the monitor.  Only one process at a time can execute code inside monitors. 9/29/2021 2 Dr.M.Karthika/AP/MTNC
  • 3. 1. Inside the monitors, we can only execute one process at a time. 2. Monitors are the group of procedures, and condition variables that are merged together in a special type of module. 3. If the process is running outside the monitor, then it cannot access the monitor’s internal variable. But a process can call the procedures of the monitor. 4. Monitors offer high-level of synchronization 5. Monitors were derived to simplify the complexity of synchronization problems. 6. There is only one process that can be active at a time inside the monitor. 9/29/2021 Dr.M.Karthika/AP/MTNC 3
  • 5. Two different operations are performed on the condition variables of the monitor. Wait. signal. let say we have 2 condition variables condition x, y; // Declaring variable 9/29/2021 5 Dr.M.Karthika/AP/MTNC
  • 6. x.wait() : Process performing wait operation on any condition variable are suspended. The suspended processes are placed in block queue of that condition variable. Note: Each condition variable has its unique block queue. 9/29/2021 6 Dr.M.Karthika/AP/MTNC
  • 7. x.signal(): When a process performs signal operation on condition variable, one of the blocked processes is given chance. If (x block queue empty) // Ignore signal else // Resume a process from block queue. 9/29/2021 7 Dr.M.Karthika/AP/MTNC
  • 8.  Advantages of Monitor: Monitors have the advantage of making parallel programming easier and less error prone than using techniques such as semaphore.  Disadvantages of Monitor: Monitors have to be implemented as part of the programming language . The compiler must generate code for them. This gives the compiler the additional burden of having to know what operating system facilities are available to control access to critical sections in concurrent processes. 9/29/2021 8 Dr.M.Karthika/AP/MTNC