SlideShare a Scribd company logo
1 of 1
Download to read offline
Describe the difference between a monitor and a semaphore
Solution
Monitor: Monitor is a highly structured programming language construct.It consists of Private
variables and private procedures that can only be used within a monitor. Constructors that
initialize the monitor.A number of public monitor procedures that can be invoked by users.
These monitors have no public data.A monitor is a mini OS with monitor procedures as system
calls.
Semaphore: Semaphore is a data structure that is used to provide mutual exclusion to critical
sections. Semaphores mainly support two operations called wait and Signal . The wait operation
blocks a process until the semaphore is open and the signal operation allows another process to
enter.MonitorSemaphoreCondition variables only uses these MonitorsThese can be used in
anywhere but not in Monitorswait() always blocks it's callerwait() does not always blocks it's
callersignal() either releases a process or the signal is lost as if it never occurssignal() either
releases a process or increases Semaphore counterif signal() releases a process,either the caller
or the released continues,but not bothif signal() releases a process,the caller and the released
both continued

More Related Content

Similar to Describe the difference between a monitor and a semaphoreSolutio.pdf

Sa No Scan Paper
Sa No Scan PaperSa No Scan Paper
Sa No Scan Paper
tafinley
 
Legacy Lowdown - Options When Migrating Solaris Applications
Legacy Lowdown - Options When Migrating Solaris ApplicationsLegacy Lowdown - Options When Migrating Solaris Applications
Legacy Lowdown - Options When Migrating Solaris Applications
AppZero
 
OORPT Dynamic Analysis
OORPT Dynamic AnalysisOORPT Dynamic Analysis
OORPT Dynamic Analysis
lienhard
 
04 intel v_tune_session_05
04 intel v_tune_session_0504 intel v_tune_session_05
04 intel v_tune_session_05
Vivek chan
 
4-Taxonomy of virtualization.docx
4-Taxonomy of virtualization.docx4-Taxonomy of virtualization.docx
4-Taxonomy of virtualization.docx
shruti533256
 
OpManager Review
OpManager ReviewOpManager Review
OpManager Review
guesta265a9
 
24 33 -_metasploit
24 33 -_metasploit24 33 -_metasploit
24 33 -_metasploit
wozgeass
 

Similar to Describe the difference between a monitor and a semaphoreSolutio.pdf (20)

[null]Metapwn - Pwn at a puff by Prajwal Panchmahalkar
[null]Metapwn - Pwn at a puff by Prajwal Panchmahalkar[null]Metapwn - Pwn at a puff by Prajwal Panchmahalkar
[null]Metapwn - Pwn at a puff by Prajwal Panchmahalkar
 
Sa No Scan Paper
Sa No Scan PaperSa No Scan Paper
Sa No Scan Paper
 
Introduction to trace viewer
Introduction to trace viewerIntroduction to trace viewer
Introduction to trace viewer
 
Legacy Lowdown - Options When Migrating Solaris Applications
Legacy Lowdown - Options When Migrating Solaris ApplicationsLegacy Lowdown - Options When Migrating Solaris Applications
Legacy Lowdown - Options When Migrating Solaris Applications
 
OORPT Dynamic Analysis
OORPT Dynamic AnalysisOORPT Dynamic Analysis
OORPT Dynamic Analysis
 
04 intel v_tune_session_05
04 intel v_tune_session_0504 intel v_tune_session_05
04 intel v_tune_session_05
 
ANET SureLog SIEM IntelligentResponse
ANET SureLog  SIEM IntelligentResponseANET SureLog  SIEM IntelligentResponse
ANET SureLog SIEM IntelligentResponse
 
4-Taxonomy of virtualization.docx
4-Taxonomy of virtualization.docx4-Taxonomy of virtualization.docx
4-Taxonomy of virtualization.docx
 
C0931115
C0931115C0931115
C0931115
 
OpManager Review
OpManager ReviewOpManager Review
OpManager Review
 
abc
abcabc
abc
 
Advanced malwareanalysis training session2 botnet analysis part1
Advanced malwareanalysis training session2 botnet analysis part1Advanced malwareanalysis training session2 botnet analysis part1
Advanced malwareanalysis training session2 botnet analysis part1
 
AWS Loft Talk: Behind the Scenes with SignalFx
AWS Loft Talk: Behind the Scenes with SignalFxAWS Loft Talk: Behind the Scenes with SignalFx
AWS Loft Talk: Behind the Scenes with SignalFx
 
Intelligent dashboard overview
Intelligent dashboard overviewIntelligent dashboard overview
Intelligent dashboard overview
 
Metasploit
MetasploitMetasploit
Metasploit
 
Metasploit Computer security testing tool
Metasploit  Computer security testing toolMetasploit  Computer security testing tool
Metasploit Computer security testing tool
 
Terryb Opsmanager
Terryb OpsmanagerTerryb Opsmanager
Terryb Opsmanager
 
Chapter05 new
Chapter05 newChapter05 new
Chapter05 new
 
Introduction To Exploitation & Metasploit
Introduction To Exploitation & MetasploitIntroduction To Exploitation & Metasploit
Introduction To Exploitation & Metasploit
 
24 33 -_metasploit
24 33 -_metasploit24 33 -_metasploit
24 33 -_metasploit
 

More from hadpadrrajeshh

Given a newly created Binary Search Tree with the following numerica.pdf
Given a newly created Binary Search Tree with the following numerica.pdfGiven a newly created Binary Search Tree with the following numerica.pdf
Given a newly created Binary Search Tree with the following numerica.pdf
hadpadrrajeshh
 
Gather information on the following two disasters Space shuttle Ch.pdf
Gather information on the following two disasters Space shuttle Ch.pdfGather information on the following two disasters Space shuttle Ch.pdf
Gather information on the following two disasters Space shuttle Ch.pdf
hadpadrrajeshh
 
Create a link list. Add some nodes to it, search and delete nodes fro.pdf
Create a link list. Add some nodes to it, search and delete nodes fro.pdfCreate a link list. Add some nodes to it, search and delete nodes fro.pdf
Create a link list. Add some nodes to it, search and delete nodes fro.pdf
hadpadrrajeshh
 
What is glass-transition temperature Give a material example. How ma.pdf
What is glass-transition temperature Give a material example. How ma.pdfWhat is glass-transition temperature Give a material example. How ma.pdf
What is glass-transition temperature Give a material example. How ma.pdf
hadpadrrajeshh
 
What are some contributions to the development of industrializat.pdf
What are some contributions to the development of industrializat.pdfWhat are some contributions to the development of industrializat.pdf
What are some contributions to the development of industrializat.pdf
hadpadrrajeshh
 
The project will study the coordination of multiple threads using se.pdf
The project will study the coordination of multiple threads using se.pdfThe project will study the coordination of multiple threads using se.pdf
The project will study the coordination of multiple threads using se.pdf
hadpadrrajeshh
 

More from hadpadrrajeshh (20)

Given a newly created Binary Search Tree with the following numerica.pdf
Given a newly created Binary Search Tree with the following numerica.pdfGiven a newly created Binary Search Tree with the following numerica.pdf
Given a newly created Binary Search Tree with the following numerica.pdf
 
Gather information on the following two disasters Space shuttle Ch.pdf
Gather information on the following two disasters Space shuttle Ch.pdfGather information on the following two disasters Space shuttle Ch.pdf
Gather information on the following two disasters Space shuttle Ch.pdf
 
Determine the Laplace transform, F(s), of the following time signal..pdf
Determine the Laplace transform, F(s), of the following time signal..pdfDetermine the Laplace transform, F(s), of the following time signal..pdf
Determine the Laplace transform, F(s), of the following time signal..pdf
 
Create a link list. Add some nodes to it, search and delete nodes fro.pdf
Create a link list. Add some nodes to it, search and delete nodes fro.pdfCreate a link list. Add some nodes to it, search and delete nodes fro.pdf
Create a link list. Add some nodes to it, search and delete nodes fro.pdf
 
A speedometer is a measuring instrument. What are the independent and.pdf
A speedometer is a measuring instrument. What are the independent and.pdfA speedometer is a measuring instrument. What are the independent and.pdf
A speedometer is a measuring instrument. What are the independent and.pdf
 
A recent study by the EPA has determined that the amount of contamin.pdf
A recent study by the EPA has determined that the amount of contamin.pdfA recent study by the EPA has determined that the amount of contamin.pdf
A recent study by the EPA has determined that the amount of contamin.pdf
 
choice one correct answerRocks containing iron, calcium, magnesium.pdf
choice one correct answerRocks containing iron, calcium, magnesium.pdfchoice one correct answerRocks containing iron, calcium, magnesium.pdf
choice one correct answerRocks containing iron, calcium, magnesium.pdf
 
1.write down the RTL for the SUBT instructions. 2.Draw a flowchart.pdf
1.write down the RTL for the SUBT instructions. 2.Draw a flowchart.pdf1.write down the RTL for the SUBT instructions. 2.Draw a flowchart.pdf
1.write down the RTL for the SUBT instructions. 2.Draw a flowchart.pdf
 
Write a Java application that asks for an integer and returns its fac.pdf
Write a Java application that asks for an integer and returns its fac.pdfWrite a Java application that asks for an integer and returns its fac.pdf
Write a Java application that asks for an integer and returns its fac.pdf
 
Where should seaweeds and kelps be classified Give characteristics .pdf
Where should seaweeds and kelps be classified Give characteristics .pdfWhere should seaweeds and kelps be classified Give characteristics .pdf
Where should seaweeds and kelps be classified Give characteristics .pdf
 
What is the name of the connective tissue that divides the se.pdf
What is the name of the connective tissue that divides the se.pdfWhat is the name of the connective tissue that divides the se.pdf
What is the name of the connective tissue that divides the se.pdf
 
What is the current ratio of Chester Use the results of the Balance.pdf
What is the current ratio of Chester Use the results of the Balance.pdfWhat is the current ratio of Chester Use the results of the Balance.pdf
What is the current ratio of Chester Use the results of the Balance.pdf
 
What is glass-transition temperature Give a material example. How ma.pdf
What is glass-transition temperature Give a material example. How ma.pdfWhat is glass-transition temperature Give a material example. How ma.pdf
What is glass-transition temperature Give a material example. How ma.pdf
 
What are some contributions to the development of industrializat.pdf
What are some contributions to the development of industrializat.pdfWhat are some contributions to the development of industrializat.pdf
What are some contributions to the development of industrializat.pdf
 
The “creative revolution” that handed more authority to agency art d.pdf
The “creative revolution” that handed more authority to agency art d.pdfThe “creative revolution” that handed more authority to agency art d.pdf
The “creative revolution” that handed more authority to agency art d.pdf
 
The three main coefficients (not properties or dimensionless numbers).pdf
The three main coefficients (not properties or dimensionless numbers).pdfThe three main coefficients (not properties or dimensionless numbers).pdf
The three main coefficients (not properties or dimensionless numbers).pdf
 
The project will study the coordination of multiple threads using se.pdf
The project will study the coordination of multiple threads using se.pdfThe project will study the coordination of multiple threads using se.pdf
The project will study the coordination of multiple threads using se.pdf
 
The positive selection process for T lymphocytes that occurs In the t.pdf
The positive selection process for T lymphocytes that occurs In the t.pdfThe positive selection process for T lymphocytes that occurs In the t.pdf
The positive selection process for T lymphocytes that occurs In the t.pdf
 
The local public health agency has received reports of an outbreak o.pdf
The local public health agency has received reports of an outbreak o.pdfThe local public health agency has received reports of an outbreak o.pdf
The local public health agency has received reports of an outbreak o.pdf
 
how are musical sounds produced Explain your reasoning.Solution.pdf
how are musical sounds produced Explain your reasoning.Solution.pdfhow are musical sounds produced Explain your reasoning.Solution.pdf
how are musical sounds produced Explain your reasoning.Solution.pdf
 

Recently uploaded

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
ssuserdda66b
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Recently uploaded (20)

How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 

Describe the difference between a monitor and a semaphoreSolutio.pdf

  • 1. Describe the difference between a monitor and a semaphore Solution Monitor: Monitor is a highly structured programming language construct.It consists of Private variables and private procedures that can only be used within a monitor. Constructors that initialize the monitor.A number of public monitor procedures that can be invoked by users. These monitors have no public data.A monitor is a mini OS with monitor procedures as system calls. Semaphore: Semaphore is a data structure that is used to provide mutual exclusion to critical sections. Semaphores mainly support two operations called wait and Signal . The wait operation blocks a process until the semaphore is open and the signal operation allows another process to enter.MonitorSemaphoreCondition variables only uses these MonitorsThese can be used in anywhere but not in Monitorswait() always blocks it's callerwait() does not always blocks it's callersignal() either releases a process or the signal is lost as if it never occurssignal() either releases a process or increases Semaphore counterif signal() releases a process,either the caller or the released continues,but not bothif signal() releases a process,the caller and the released both continued