SlideShare a Scribd company logo
1 of 44
REPORT ON MONITORS
 MUHAMMAD RAZA @2079
MUHAMMAD AMMAR @2055
QAMAR SHEERAZ @2076
AHMAD KHAN @2056
ZULQARNAIN ANSARI @2085
ADNAN KHAN @1941
MONITORS
MONITORS
INTERPROCESS COMMUNICATION (IPC) :
Processes frequently need to communicate
with other processes. In short, there is a
need for communication between processes,
preferably in a well-structured way not using
interrupts.
MONITORS
RACE CONDITIONS:
When two or more processes are reading
or writing some data and the final result
depends on who runs precisely when, are
called race conditions.
MONITORS
CRITICAL SECTION:
The part of the program where the shared
memory is accessed is called the critical
section.
If we could arrange matters such that no
two processes were ever in their critical
section at the same time, we could avoid
race conditions.
MONITORS
MUTUAL EXCLUSION:
When two or more processes want to
access the shared memory, shared
files, and shared everything else, is to
find some way to prohibit more than
one process from reading and writing
the shared data at the same time.
MONITORS
SEMAPHORES:
Semaphores are flag variables. It is an
integer type variables to count the number
of wakeups saved for future use.
MONITORS
SEMAPHORES:
Example:
#define N 100
Typedef int semaphore;
Semaphore mutex=1;
Semaphore empty=N;
Semaphore full=O;
MONITORS
SEMAPHORES:
producer()
{
int item;
While (true){
produce_item(&item); //Generate something in buffer
Down(empty); //decrement empty count
Down(mutex); //enter critical region
Enter_item(item); //put new item in buffer
up(mutex); //leave critical region
up(full); //increment count of full slots
}
}
MONITORS
SEMAPHORES:
consumer()
{
int item;
While (true){
Down(full); //decrement full count
Down(mutex); //enter critical region
remove item(&item); //take item from buffer
up(mutex); //leave critical region
up(empty); //increment count of empty slots
consume_item(item); //Do something with item
}
}
(THE PRODUCER CONSUMER PROBLEM USING SEMEPHORES)
MONITORS
MONITORS
Monitor is a collection of procedures,
variables,data structures that are all grouped
together in a special kind of module or
package.
Or
A high-level data abstraction tool that
automatically generates atomic operations on
a given data structure.
MONITORS
A monitor has:
 Shared data.
 A set of atomic operations on that data.
 A set of condition variables
MONITORS
Monitor example
Integer I;
Conditiion c
Procedure producer(x);
.
.
.
End;
Procedure consumer(x);
.
.
.
End;
End monitor
MONITORSMONITORS
Muhammad AmmarMuhammad Ammar #2055#2055
Explanation of MonitorsExplanation of Monitors
MONITORS
Explanation
Monitors are a programming language
construct, so the compiler knows they
are special and can handle calls to
monitor procedures differently from other
procedure calls.
MONITORS
Explanation
when a process calls a monitor
procedure then procedure will
check that either any process is
currently active or not.
MONITORS
Explanation
- If any process is currently active then
the monitor procedure will be suspended
until the process has left monitor.
- If no other process is using the monitor
then the monitor procedure will enter the
calling process.
MONITORS
Explanation
- The person who writing the monitor
procedure does not know, how the
compiler arranges for mutual exclusion.
- But monitor procedure provide an easy
way to overcome mutual exclusion.
MONITORS
Explanation
- It is not enough to achieve mutual exclusion
only. We also need a way for processes to
block when they cannot proceed .
MONITORS
Explanation
The solution for this is that when a
monitor procedure discovers that it
cannot continue ,it does a wait on some
condition.This action causes the calling
process to block.
- It also allows another process that
had been previously prohibited from
entering the monitor to enter now.
MONITORSMONITORS
Qamar SheerazQamar Sheeraz #2076#2076
Explanation of Monitors 2Explanation of Monitors 2
MONITORS
The producer consumer
problems with monitors:
The operations WAIT and
SIGNAL look similar to SLEEP
and WAKEUP, which saw earlier
had fatal race conditions.
SLEEP and WAKEUP failed
because while one process was
trying to go to SLEEP, the other
MONITORS
one was trying to make it up.
With Monitors, that cannot happen.
The automatic mutual exclusion
on monitor procedures guaranties
that if, say, the producer inside a
Monitor Procedure discovers that
the buffer is full, it will be able to
MONITORS
complete the WAIT OPERATION without
having to worry about the possibility that
the scheduler may switch to the consumer
just before the WAIT completes. The
consumer will not even be let into the
Monitor at all until the WAIT is finished
and Producer has been marked as no
longer run able
MONITORS
- Monitors make parallel programming
much less error-prone than with
Semaphores.
- Still they too have some drawbacks.
- Monitors are a programming language
concept.
- Some languages supports Monitors but C,
Pascal and most other languages do not
have Monitors.
MONITORS
- The languages which do not have
monitors, so it is unreasonable to expect
their compilers to enforce any mutual
exclusion rules.
- In fact, how could the compiler even know
which procedures were in monitors and
which were not?
MONITORSMONITORS
Ahmad KhanAhmad Khan #2056#2056
PRODUCER-CONSUMER PROBLEMPRODUCER-CONSUMER PROBLEM
WITH MONITORSWITH MONITORS
MONITORS
Monitor ProducerConsumer
condition full, empty;
integer count;
Procedure enter;
Begin
if count = N then wait(full);
Enter_item;
Count := count + 1;
If count = 1 then signal(empty);
End;
MONITORS
Procedure remove;
Begin
If count = 0 then wait(empty);
remove_item;
Count = count - 1;
If count = N - 1 then signal(full);
end
Count := 0;
End monitor;
MONITORS
Procedure producer;
Begin
While true do
Begin
produce_item;
ProducerConsumer.enter;
End
End;
MONITORS
Procedure consumer;
Begin
While true do
Begin
ProducerConsumer.remove;
Consume_item;
End
End;
( The producer-consumer problem with monitors. The
buffer has N slots. )
MONITORSMONITORS
Zulqarnain AnsariZulqarnain Ansari #2085#2085
USING SEMAPHORES IMPLEMENTINGUSING SEMAPHORES IMPLEMENTING
MONITORSMONITORS
MONITORS
Using Semaphores to Implement
Monitors:
- If the Operating System provides Semaphores
as a basic feature, any Compiler ( which
supports Monitor ) writer can easily implement
Monitors in his Language.
- Associated with each Monitor is a binary
Semaphore.
MONITORS
Using Semaphores to Implement
Monitors :
- Mutex, initially 1, to control entry to the
Monitor, and an additional Semaphore ,
initially 0, per condition variable.
- If Monitor is currently in use, the Process
will block.
MONITORS
Using Semaphores to Implement Monitors:
- On leaving the process does an UP mutex to
permit a waiting process to enter.
- e.g, Consider the Producer-Consumer problem
again. The mutex semaphore guarantees that
each process has exclusive access to the
monitor for its critical section.
MONITORS
Using Semaphores to Implement Monitors:
- Suppose the consumer start 1st
and discovers
that there is no work for it in the buffer .It does a
WAIT EMPTY ,which causes an up on mutex
and DOWN on empty. The consumer goes to
sleep, and the producer is allowed to enter as
soon as it wants to.
MONITORS
Using Semaphores to Implement
Monitors:
- When the producer discovers that count is
1, it will do signal empty to wake up the
Consumer.
- At this point both Producer and Consumer
are active in the Monitor.
- But since one of our rules of programming
MONITORS
Using Semaphores to Implement
Monitors:
with monitors is that after doing SIGNAL a
process must leave the MONITOR
immediately, no harm is done.
MONITORSMONITORS
Adnan KhanAdnan Khan #1941#1941
USING MONITORS TO IMPLEMENTUSING MONITORS TO IMPLEMENT
SEMAPHORESSEMAPHORES ANDAND MESSAGESMESSAGES
MONITORS
-Semaphores are Flag variables .
-Boolean type (True or False).
-MESSAGES
Problem with monitors, and also with semaphores, is
that they were designed for solving the mutual exclusion
problem on one or more CPUs that all have access to
common memory.
But when we talk about the Distributed system
consisting of multiple CPUs,each with its own private
memory ,connected by a LAN.
MONITORS
-CONCLUSION
Semaphores are too low level and monitors are not
usable except few programming languages .
Furthermore none of the primitives provide for
information exchange between machines.
-So some thing there was to be needed and that was
-MESSAGE PASSING.
This method of interprocess communication uses
two primitives SEND and RECEIVE,which are like
semaphores and unlike monitors.And are system calls.
MONITORS
Using Monitors to Implement Semaphores and Messages:
Implementing semaphores and messages using monitors follows
roughly the same pattern.
But ,in simpler,because Monitors r a higher level construct than
Semaphores.
IMPLEMENTATION OF SEMAPHORES
To implement Semaphores,we need a counter and Link List for
each semaphore to be implemented, as well as a condition variable
per process.
-When a DOWN is done,the caller checks (inside the monitor)to see
if the counter for that semaphores is greater than zero,And if it is ,th
e counter is decremented and the caller exits the Monitor.
MONITORS
IMPLEMENTATION OF SEMAPHORES
-If counter is zero,the caller adds its own process no to link list
and does a WAIT on its condition variable.
When
UP is done on a Semaphore,
-The caller incrrements the counter (inside the monitor)and
then checks to see if the link list is having any entries.
If the list has entries,the caller removes one of them and
generates SIGNAL on the conditon variable for that process.
In a more sophisticated implementation,each process puts
its priority on the list along with its process no ,so that the highest
priority process would be awakened 1st
.
MONITORS
IMPLEMENTATION OF MESSAGES:
-Implementing messages using Monitors is
essentially the same as with semaphores,except
that instead of Semaphore per process we have
a conditon variable per process.
-The mailbox structures are the same for
both implementations.

More Related Content

What's hot

Multithreading
MultithreadingMultithreading
MultithreadingA B Shinde
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed systemSunita Sahu
 
SYNCHRONIZATION IN MULTIPROCESSING
SYNCHRONIZATION IN MULTIPROCESSINGSYNCHRONIZATION IN MULTIPROCESSING
SYNCHRONIZATION IN MULTIPROCESSINGAparna Bhadran
 
contiguous memory allocation.pptx
contiguous memory allocation.pptxcontiguous memory allocation.pptx
contiguous memory allocation.pptxRajapriya82
 
message passing vs shared memory
message passing vs shared memorymessage passing vs shared memory
message passing vs shared memoryHamza Zahid
 
Synchronization in distributed computing
Synchronization in distributed computingSynchronization in distributed computing
Synchronization in distributed computingSVijaylakshmi
 
7 distributed and real systems
7 distributed and real systems7 distributed and real systems
7 distributed and real systemsmyrajendra
 
Chapter 12 transactions and concurrency control
Chapter 12 transactions and concurrency controlChapter 12 transactions and concurrency control
Chapter 12 transactions and concurrency controlAbDul ThaYyal
 
14 relationship between processes
14 relationship between processes14 relationship between processes
14 relationship between processesmyrajendra
 
DeadLock in Operating-Systems
DeadLock in Operating-SystemsDeadLock in Operating-Systems
DeadLock in Operating-SystemsVenkata Sreeram
 
Synchronization in distributed systems
Synchronization in distributed systems Synchronization in distributed systems
Synchronization in distributed systems SHATHAN
 
Physical and Logical Clocks
Physical and Logical ClocksPhysical and Logical Clocks
Physical and Logical ClocksDilum Bandara
 
Transactions and Concurrency Control
Transactions and Concurrency ControlTransactions and Concurrency Control
Transactions and Concurrency ControlDilum Bandara
 

What's hot (20)

Network layer tanenbaum
Network layer tanenbaumNetwork layer tanenbaum
Network layer tanenbaum
 
Multithreading
MultithreadingMultithreading
Multithreading
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed system
 
Semaphores
SemaphoresSemaphores
Semaphores
 
Process of operating system
Process of operating systemProcess of operating system
Process of operating system
 
Mutual exclusion and sync
Mutual exclusion and syncMutual exclusion and sync
Mutual exclusion and sync
 
SYNCHRONIZATION IN MULTIPROCESSING
SYNCHRONIZATION IN MULTIPROCESSINGSYNCHRONIZATION IN MULTIPROCESSING
SYNCHRONIZATION IN MULTIPROCESSING
 
contiguous memory allocation.pptx
contiguous memory allocation.pptxcontiguous memory allocation.pptx
contiguous memory allocation.pptx
 
message passing vs shared memory
message passing vs shared memorymessage passing vs shared memory
message passing vs shared memory
 
Synchronization in distributed computing
Synchronization in distributed computingSynchronization in distributed computing
Synchronization in distributed computing
 
Operating System: Deadlock
Operating System: DeadlockOperating System: Deadlock
Operating System: Deadlock
 
7 distributed and real systems
7 distributed and real systems7 distributed and real systems
7 distributed and real systems
 
Chapter 12 transactions and concurrency control
Chapter 12 transactions and concurrency controlChapter 12 transactions and concurrency control
Chapter 12 transactions and concurrency control
 
14 relationship between processes
14 relationship between processes14 relationship between processes
14 relationship between processes
 
DeadLock in Operating-Systems
DeadLock in Operating-SystemsDeadLock in Operating-Systems
DeadLock in Operating-Systems
 
Synchronization in distributed systems
Synchronization in distributed systems Synchronization in distributed systems
Synchronization in distributed systems
 
Physical and Logical Clocks
Physical and Logical ClocksPhysical and Logical Clocks
Physical and Logical Clocks
 
Sequential consistency model
Sequential consistency modelSequential consistency model
Sequential consistency model
 
Memory management
Memory managementMemory management
Memory management
 
Transactions and Concurrency Control
Transactions and Concurrency ControlTransactions and Concurrency Control
Transactions and Concurrency Control
 

Viewers also liked

Geo 9º ano 1ª avaliação 1ª etapa 2017 a gabarito
Geo 9º ano 1ª avaliação 1ª etapa 2017 a gabaritoGeo 9º ano 1ª avaliação 1ª etapa 2017 a gabarito
Geo 9º ano 1ª avaliação 1ª etapa 2017 a gabaritoCBM
 
Bus 475 final exam new 2016 phoenix
Bus 475 final exam new 2016 phoenixBus 475 final exam new 2016 phoenix
Bus 475 final exam new 2016 phoenixpowellabril
 
Bus 475 capstone final examination part 2 new 2016
Bus 475 capstone final examination part 2 new 2016Bus 475 capstone final examination part 2 new 2016
Bus 475 capstone final examination part 2 new 2016powellabril
 
3Com 3CXENPAK92-JTS
3Com 3CXENPAK92-JTS3Com 3CXENPAK92-JTS
3Com 3CXENPAK92-JTSsavomir
 
Bus 475 capstone final exam new 2016 part 1
Bus 475 capstone final exam new 2016 part 1Bus 475 capstone final exam new 2016 part 1
Bus 475 capstone final exam new 2016 part 1powellabril
 
Mkt 421 final exam 2016
Mkt 421 final exam 2016Mkt 421 final exam 2016
Mkt 421 final exam 2016powellabril
 
Ejercicios de comandos
Ejercicios de comandosEjercicios de comandos
Ejercicios de comandosJon Echanove
 
Slideshare#6 pedro gascon_25011404
Slideshare#6 pedro gascon_25011404Slideshare#6 pedro gascon_25011404
Slideshare#6 pedro gascon_25011404Universidad Yacambu
 
Cuadro comparativo de bancos, empresas comerciales e industriales gonzalo
Cuadro comparativo de bancos, empresas comerciales e industriales gonzaloCuadro comparativo de bancos, empresas comerciales e industriales gonzalo
Cuadro comparativo de bancos, empresas comerciales e industriales gonzaloGonzalo Zuluaga
 
3Com 5184-7469
3Com 5184-74693Com 5184-7469
3Com 5184-7469savomir
 
Kobe Bryant MVP
Kobe  Bryant MVPKobe  Bryant MVP
Kobe Bryant MVPQINFENG XU
 
Act 8. tallerpractico10 12023887 RODRIGO RENTERIA TORAL
Act 8. tallerpractico10  12023887 RODRIGO RENTERIA TORALAct 8. tallerpractico10  12023887 RODRIGO RENTERIA TORAL
Act 8. tallerpractico10 12023887 RODRIGO RENTERIA TORALyhosmaira mosquera
 
Act 8. tallerpractico10 12023887
Act 8. tallerpractico10  12023887Act 8. tallerpractico10  12023887
Act 8. tallerpractico10 12023887yhosmaira mosquera
 
3Com 3CSFP93-OEM
3Com 3CSFP93-OEM3Com 3CSFP93-OEM
3Com 3CSFP93-OEMsavomir
 
El enfoque semiótico
El enfoque semióticoEl enfoque semiótico
El enfoque semióticoCarlos Pinzon
 

Viewers also liked (20)

Geo 9º ano 1ª avaliação 1ª etapa 2017 a gabarito
Geo 9º ano 1ª avaliação 1ª etapa 2017 a gabaritoGeo 9º ano 1ª avaliação 1ª etapa 2017 a gabarito
Geo 9º ano 1ª avaliação 1ª etapa 2017 a gabarito
 
Bus 475 final exam new 2016 phoenix
Bus 475 final exam new 2016 phoenixBus 475 final exam new 2016 phoenix
Bus 475 final exam new 2016 phoenix
 
Bus 475 capstone final examination part 2 new 2016
Bus 475 capstone final examination part 2 new 2016Bus 475 capstone final examination part 2 new 2016
Bus 475 capstone final examination part 2 new 2016
 
3Com 3CXENPAK92-JTS
3Com 3CXENPAK92-JTS3Com 3CXENPAK92-JTS
3Com 3CXENPAK92-JTS
 
Bus 475 capstone final exam new 2016 part 1
Bus 475 capstone final exam new 2016 part 1Bus 475 capstone final exam new 2016 part 1
Bus 475 capstone final exam new 2016 part 1
 
Mkt 421 final exam 2016
Mkt 421 final exam 2016Mkt 421 final exam 2016
Mkt 421 final exam 2016
 
Presentación jaqueline
Presentación jaquelinePresentación jaqueline
Presentación jaqueline
 
Ejercicios de comandos
Ejercicios de comandosEjercicios de comandos
Ejercicios de comandos
 
Algebra
AlgebraAlgebra
Algebra
 
Slideshare#6 pedro gascon_25011404
Slideshare#6 pedro gascon_25011404Slideshare#6 pedro gascon_25011404
Slideshare#6 pedro gascon_25011404
 
Fendrarte power point
Fendrarte power point Fendrarte power point
Fendrarte power point
 
Cuadro comparativo de bancos, empresas comerciales e industriales gonzalo
Cuadro comparativo de bancos, empresas comerciales e industriales gonzaloCuadro comparativo de bancos, empresas comerciales e industriales gonzalo
Cuadro comparativo de bancos, empresas comerciales e industriales gonzalo
 
3Com 5184-7469
3Com 5184-74693Com 5184-7469
3Com 5184-7469
 
Kobe Bryant MVP
Kobe  Bryant MVPKobe  Bryant MVP
Kobe Bryant MVP
 
Act 8. tallerpractico10 12023887 RODRIGO RENTERIA TORAL
Act 8. tallerpractico10  12023887 RODRIGO RENTERIA TORALAct 8. tallerpractico10  12023887 RODRIGO RENTERIA TORAL
Act 8. tallerpractico10 12023887 RODRIGO RENTERIA TORAL
 
Act 8. tallerpractico10 12023887
Act 8. tallerpractico10  12023887Act 8. tallerpractico10  12023887
Act 8. tallerpractico10 12023887
 
3Com 3CSFP93-OEM
3Com 3CSFP93-OEM3Com 3CSFP93-OEM
3Com 3CSFP93-OEM
 
Cephalometric analysis
Cephalometric analysisCephalometric analysis
Cephalometric analysis
 
Actividad 2
Actividad 2Actividad 2
Actividad 2
 
El enfoque semiótico
El enfoque semióticoEl enfoque semiótico
El enfoque semiótico
 

Similar to Operating System - Monitors (Presentation)

Monitor(karthika)
Monitor(karthika)Monitor(karthika)
Monitor(karthika)Nagarajan
 
Describe the difference between a monitor and a semaphoreSolutio.pdf
Describe the difference between a monitor and a semaphoreSolutio.pdfDescribe the difference between a monitor and a semaphoreSolutio.pdf
Describe the difference between a monitor and a semaphoreSolutio.pdfhadpadrrajeshh
 
IRJET- FPGA Implementation of an Improved Watchdog Timer for Safety Critical ...
IRJET- FPGA Implementation of an Improved Watchdog Timer for Safety Critical ...IRJET- FPGA Implementation of an Improved Watchdog Timer for Safety Critical ...
IRJET- FPGA Implementation of an Improved Watchdog Timer for Safety Critical ...IRJET Journal
 
Princeton-NJ-Meetup-Troubleshooting-with-AnyPoint-Monitoring
Princeton-NJ-Meetup-Troubleshooting-with-AnyPoint-MonitoringPrinceton-NJ-Meetup-Troubleshooting-with-AnyPoint-Monitoring
Princeton-NJ-Meetup-Troubleshooting-with-AnyPoint-MonitoringSravan Lingam
 
MuleSoft Meetup | Reading Meetup Group | Hosted by Integral Zone
MuleSoft Meetup | Reading Meetup Group | Hosted by Integral ZoneMuleSoft Meetup | Reading Meetup Group | Hosted by Integral Zone
MuleSoft Meetup | Reading Meetup Group | Hosted by Integral ZoneIntegralZone
 
Dynamic debugging in 8085 microprocessor
Dynamic debugging in 8085 microprocessorDynamic debugging in 8085 microprocessor
Dynamic debugging in 8085 microprocessorRamaPrabha24
 
Density based traffic light control
Density based traffic light controlDensity based traffic light control
Density based traffic light controlRohit Nair
 
Annunciator for Hazard Prevention & Temperature Control
Annunciator for Hazard Prevention & Temperature ControlAnnunciator for Hazard Prevention & Temperature Control
Annunciator for Hazard Prevention & Temperature ControlIOSR Journals
 
Mule Meetup Hyderabad - Aug 2020
Mule Meetup Hyderabad - Aug 2020Mule Meetup Hyderabad - Aug 2020
Mule Meetup Hyderabad - Aug 2020Sravan Lingam
 
Process Management in Android
Process Management in AndroidProcess Management in Android
Process Management in AndroidShrey Verma
 
PRESENTATION ON PLC AND SCADA
PRESENTATION ON PLC AND SCADAPRESENTATION ON PLC AND SCADA
PRESENTATION ON PLC AND SCADAAnandKumarJha33
 
OpManager Review
OpManager ReviewOpManager Review
OpManager Reviewguesta265a9
 
IRJET- Real Time Monitoring of Servers with Prometheus and Grafana for High A...
IRJET- Real Time Monitoring of Servers with Prometheus and Grafana for High A...IRJET- Real Time Monitoring of Servers with Prometheus and Grafana for High A...
IRJET- Real Time Monitoring of Servers with Prometheus and Grafana for High A...IRJET Journal
 
Run time Verification using formal methods
Run time Verification using formal methodsRun time Verification using formal methods
Run time Verification using formal methodsSulman Ahmed
 
Operating System
Operating SystemOperating System
Operating Systemguest8b0942
 
Monitoring in Big Data Platform - Albert Lewandowski, GetInData
Monitoring in Big Data Platform - Albert Lewandowski, GetInDataMonitoring in Big Data Platform - Albert Lewandowski, GetInData
Monitoring in Big Data Platform - Albert Lewandowski, GetInDataGetInData
 
[White paper] detecting problems in industrial networks though continuous mon...
[White paper] detecting problems in industrial networks though continuous mon...[White paper] detecting problems in industrial networks though continuous mon...
[White paper] detecting problems in industrial networks though continuous mon...TI Safe
 

Similar to Operating System - Monitors (Presentation) (20)

Monitor(karthika)
Monitor(karthika)Monitor(karthika)
Monitor(karthika)
 
Describe the difference between a monitor and a semaphoreSolutio.pdf
Describe the difference between a monitor and a semaphoreSolutio.pdfDescribe the difference between a monitor and a semaphoreSolutio.pdf
Describe the difference between a monitor and a semaphoreSolutio.pdf
 
IRJET- FPGA Implementation of an Improved Watchdog Timer for Safety Critical ...
IRJET- FPGA Implementation of an Improved Watchdog Timer for Safety Critical ...IRJET- FPGA Implementation of an Improved Watchdog Timer for Safety Critical ...
IRJET- FPGA Implementation of an Improved Watchdog Timer for Safety Critical ...
 
Princeton-NJ-Meetup-Troubleshooting-with-AnyPoint-Monitoring
Princeton-NJ-Meetup-Troubleshooting-with-AnyPoint-MonitoringPrinceton-NJ-Meetup-Troubleshooting-with-AnyPoint-Monitoring
Princeton-NJ-Meetup-Troubleshooting-with-AnyPoint-Monitoring
 
MuleSoft Meetup | Reading Meetup Group | Hosted by Integral Zone
MuleSoft Meetup | Reading Meetup Group | Hosted by Integral ZoneMuleSoft Meetup | Reading Meetup Group | Hosted by Integral Zone
MuleSoft Meetup | Reading Meetup Group | Hosted by Integral Zone
 
Dynamic debugging in 8085 microprocessor
Dynamic debugging in 8085 microprocessorDynamic debugging in 8085 microprocessor
Dynamic debugging in 8085 microprocessor
 
Density based traffic light control
Density based traffic light controlDensity based traffic light control
Density based traffic light control
 
Annunciator for Hazard Prevention & Temperature Control
Annunciator for Hazard Prevention & Temperature ControlAnnunciator for Hazard Prevention & Temperature Control
Annunciator for Hazard Prevention & Temperature Control
 
Mule Meetup Hyderabad - Aug 2020
Mule Meetup Hyderabad - Aug 2020Mule Meetup Hyderabad - Aug 2020
Mule Meetup Hyderabad - Aug 2020
 
finalpaper.doc
finalpaper.docfinalpaper.doc
finalpaper.doc
 
Process Management in Android
Process Management in AndroidProcess Management in Android
Process Management in Android
 
PRESENTATION ON PLC AND SCADA
PRESENTATION ON PLC AND SCADAPRESENTATION ON PLC AND SCADA
PRESENTATION ON PLC AND SCADA
 
Process Synchronization - Monitors
Process Synchronization - MonitorsProcess Synchronization - Monitors
Process Synchronization - Monitors
 
OpManager Review
OpManager ReviewOpManager Review
OpManager Review
 
IRJET- Real Time Monitoring of Servers with Prometheus and Grafana for High A...
IRJET- Real Time Monitoring of Servers with Prometheus and Grafana for High A...IRJET- Real Time Monitoring of Servers with Prometheus and Grafana for High A...
IRJET- Real Time Monitoring of Servers with Prometheus and Grafana for High A...
 
Unit 1
Unit 1Unit 1
Unit 1
 
Run time Verification using formal methods
Run time Verification using formal methodsRun time Verification using formal methods
Run time Verification using formal methods
 
Operating System
Operating SystemOperating System
Operating System
 
Monitoring in Big Data Platform - Albert Lewandowski, GetInData
Monitoring in Big Data Platform - Albert Lewandowski, GetInDataMonitoring in Big Data Platform - Albert Lewandowski, GetInData
Monitoring in Big Data Platform - Albert Lewandowski, GetInData
 
[White paper] detecting problems in industrial networks though continuous mon...
[White paper] detecting problems in industrial networks though continuous mon...[White paper] detecting problems in industrial networks though continuous mon...
[White paper] detecting problems in industrial networks though continuous mon...
 

More from Experts Desk

User persona development (UX Consultancy Series)
User persona development (UX Consultancy Series)User persona development (UX Consultancy Series)
User persona development (UX Consultancy Series)Experts Desk
 
Zulqarnain Ansari Featured website designs
Zulqarnain Ansari Featured website designsZulqarnain Ansari Featured website designs
Zulqarnain Ansari Featured website designsExperts Desk
 
Whistlers best-app
Whistlers best-appWhistlers best-app
Whistlers best-appExperts Desk
 
Yard house-iphoneapp
Yard house-iphoneappYard house-iphoneapp
Yard house-iphoneappExperts Desk
 
Zain ansari-brochures
Zain ansari-brochuresZain ansari-brochures
Zain ansari-brochuresExperts Desk
 
Folio - UI Attendance System
Folio - UI Attendance SystemFolio - UI Attendance System
Folio - UI Attendance SystemExperts Desk
 
Folio - UI File Sharing
Folio - UI File SharingFolio - UI File Sharing
Folio - UI File SharingExperts Desk
 
Folio - Corporate Logos
Folio - Corporate LogosFolio - Corporate Logos
Folio - Corporate LogosExperts Desk
 

More from Experts Desk (12)

User persona development (UX Consultancy Series)
User persona development (UX Consultancy Series)User persona development (UX Consultancy Series)
User persona development (UX Consultancy Series)
 
Zulqarnain Ansari Featured website designs
Zulqarnain Ansari Featured website designsZulqarnain Ansari Featured website designs
Zulqarnain Ansari Featured website designs
 
Whistlers best-app
Whistlers best-appWhistlers best-app
Whistlers best-app
 
Yard house-iphoneapp
Yard house-iphoneappYard house-iphoneapp
Yard house-iphoneapp
 
Platinum roster
Platinum rosterPlatinum roster
Platinum roster
 
Zain ansari-brochures
Zain ansari-brochuresZain ansari-brochures
Zain ansari-brochures
 
SEO
SEOSEO
SEO
 
Webdesigns 2010
Webdesigns 2010Webdesigns 2010
Webdesigns 2010
 
Folio - UI Attendance System
Folio - UI Attendance SystemFolio - UI Attendance System
Folio - UI Attendance System
 
Folio - UI HRM
Folio - UI HRMFolio - UI HRM
Folio - UI HRM
 
Folio - UI File Sharing
Folio - UI File SharingFolio - UI File Sharing
Folio - UI File Sharing
 
Folio - Corporate Logos
Folio - Corporate LogosFolio - Corporate Logos
Folio - Corporate Logos
 

Recently uploaded

Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...Call Girls in Nagpur High Profile
 
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...Call Girls in Nagpur High Profile
 
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...Pooja Nehwal
 
《伯明翰城市大学毕业证成绩单购买》学历证书学位证书区别《复刻原版1:1伯明翰城市大学毕业证书|修改BCU成绩单PDF版》Q微信741003700《BCU学...
《伯明翰城市大学毕业证成绩单购买》学历证书学位证书区别《复刻原版1:1伯明翰城市大学毕业证书|修改BCU成绩单PDF版》Q微信741003700《BCU学...《伯明翰城市大学毕业证成绩单购买》学历证书学位证书区别《复刻原版1:1伯明翰城市大学毕业证书|修改BCU成绩单PDF版》Q微信741003700《BCU学...
《伯明翰城市大学毕业证成绩单购买》学历证书学位证书区别《复刻原版1:1伯明翰城市大学毕业证书|修改BCU成绩单PDF版》Q微信741003700《BCU学...ur8mqw8e
 
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...anilsa9823
 
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | DelhiFULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhisoniya singh
 
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311  Call Girls in Thane , Independent Escort Service ThanePallawi 9167673311  Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service ThanePooja Nehwal
 
Call Girls in Thane 9892124323, Vashi cAll girls Serivces Juhu Escorts, powai...
Call Girls in Thane 9892124323, Vashi cAll girls Serivces Juhu Escorts, powai...Call Girls in Thane 9892124323, Vashi cAll girls Serivces Juhu Escorts, powai...
Call Girls in Thane 9892124323, Vashi cAll girls Serivces Juhu Escorts, powai...Pooja Nehwal
 
Alambagh Call Girl 9548273370 , Call Girls Service Lucknow
Alambagh Call Girl 9548273370 , Call Girls Service LucknowAlambagh Call Girl 9548273370 , Call Girls Service Lucknow
Alambagh Call Girl 9548273370 , Call Girls Service Lucknowmakika9823
 
VIP Call Girls Hitech City ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With R...
VIP Call Girls Hitech City ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With R...VIP Call Girls Hitech City ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With R...
VIP Call Girls Hitech City ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With R...Suhani Kapoor
 
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一zul5vf0pq
 
VIP Call Girl Saharanpur Aashi 8250192130 Independent Escort Service Saharanpur
VIP Call Girl Saharanpur Aashi 8250192130 Independent Escort Service SaharanpurVIP Call Girl Saharanpur Aashi 8250192130 Independent Escort Service Saharanpur
VIP Call Girl Saharanpur Aashi 8250192130 Independent Escort Service SaharanpurSuhani Kapoor
 
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service NashikLow Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Top Rated Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Call Girls in Nagpur High Profile
 
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...Suhani Kapoor
 
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...Pooja Nehwal
 
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一ga6c6bdl
 
Top Rated Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Call Girls in Nagpur High Profile
 
Russian Escorts in lucknow 💗 9719455033 💥 Lovely Lasses: Radiant Beauties Shi...
Russian Escorts in lucknow 💗 9719455033 💥 Lovely Lasses: Radiant Beauties Shi...Russian Escorts in lucknow 💗 9719455033 💥 Lovely Lasses: Radiant Beauties Shi...
Russian Escorts in lucknow 💗 9719455033 💥 Lovely Lasses: Radiant Beauties Shi...nagunakhan
 

Recently uploaded (20)

Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...
 
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...
 
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
 
《伯明翰城市大学毕业证成绩单购买》学历证书学位证书区别《复刻原版1:1伯明翰城市大学毕业证书|修改BCU成绩单PDF版》Q微信741003700《BCU学...
《伯明翰城市大学毕业证成绩单购买》学历证书学位证书区别《复刻原版1:1伯明翰城市大学毕业证书|修改BCU成绩单PDF版》Q微信741003700《BCU学...《伯明翰城市大学毕业证成绩单购买》学历证书学位证书区别《复刻原版1:1伯明翰城市大学毕业证书|修改BCU成绩单PDF版》Q微信741003700《BCU学...
《伯明翰城市大学毕业证成绩单购买》学历证书学位证书区别《复刻原版1:1伯明翰城市大学毕业证书|修改BCU成绩单PDF版》Q微信741003700《BCU学...
 
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...
 
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | DelhiFULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
 
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311  Call Girls in Thane , Independent Escort Service ThanePallawi 9167673311  Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service Thane
 
Call Girls in Thane 9892124323, Vashi cAll girls Serivces Juhu Escorts, powai...
Call Girls in Thane 9892124323, Vashi cAll girls Serivces Juhu Escorts, powai...Call Girls in Thane 9892124323, Vashi cAll girls Serivces Juhu Escorts, powai...
Call Girls in Thane 9892124323, Vashi cAll girls Serivces Juhu Escorts, powai...
 
Alambagh Call Girl 9548273370 , Call Girls Service Lucknow
Alambagh Call Girl 9548273370 , Call Girls Service LucknowAlambagh Call Girl 9548273370 , Call Girls Service Lucknow
Alambagh Call Girl 9548273370 , Call Girls Service Lucknow
 
VIP Call Girls Hitech City ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With R...
VIP Call Girls Hitech City ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With R...VIP Call Girls Hitech City ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With R...
VIP Call Girls Hitech City ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With R...
 
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一
 
VIP Call Girl Saharanpur Aashi 8250192130 Independent Escort Service Saharanpur
VIP Call Girl Saharanpur Aashi 8250192130 Independent Escort Service SaharanpurVIP Call Girl Saharanpur Aashi 8250192130 Independent Escort Service Saharanpur
VIP Call Girl Saharanpur Aashi 8250192130 Independent Escort Service Saharanpur
 
🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate
🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate
🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate
 
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service NashikLow Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
 
Top Rated Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
 
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
 
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
 
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一
 
Top Rated Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
 
Russian Escorts in lucknow 💗 9719455033 💥 Lovely Lasses: Radiant Beauties Shi...
Russian Escorts in lucknow 💗 9719455033 💥 Lovely Lasses: Radiant Beauties Shi...Russian Escorts in lucknow 💗 9719455033 💥 Lovely Lasses: Radiant Beauties Shi...
Russian Escorts in lucknow 💗 9719455033 💥 Lovely Lasses: Radiant Beauties Shi...
 

Operating System - Monitors (Presentation)

  • 1. REPORT ON MONITORS  MUHAMMAD RAZA @2079 MUHAMMAD AMMAR @2055 QAMAR SHEERAZ @2076 AHMAD KHAN @2056 ZULQARNAIN ANSARI @2085 ADNAN KHAN @1941
  • 3. MONITORS INTERPROCESS COMMUNICATION (IPC) : Processes frequently need to communicate with other processes. In short, there is a need for communication between processes, preferably in a well-structured way not using interrupts.
  • 4. MONITORS RACE CONDITIONS: When two or more processes are reading or writing some data and the final result depends on who runs precisely when, are called race conditions.
  • 5. MONITORS CRITICAL SECTION: The part of the program where the shared memory is accessed is called the critical section. If we could arrange matters such that no two processes were ever in their critical section at the same time, we could avoid race conditions.
  • 6. MONITORS MUTUAL EXCLUSION: When two or more processes want to access the shared memory, shared files, and shared everything else, is to find some way to prohibit more than one process from reading and writing the shared data at the same time.
  • 7. MONITORS SEMAPHORES: Semaphores are flag variables. It is an integer type variables to count the number of wakeups saved for future use.
  • 8. MONITORS SEMAPHORES: Example: #define N 100 Typedef int semaphore; Semaphore mutex=1; Semaphore empty=N; Semaphore full=O;
  • 9. MONITORS SEMAPHORES: producer() { int item; While (true){ produce_item(&item); //Generate something in buffer Down(empty); //decrement empty count Down(mutex); //enter critical region Enter_item(item); //put new item in buffer up(mutex); //leave critical region up(full); //increment count of full slots } }
  • 10. MONITORS SEMAPHORES: consumer() { int item; While (true){ Down(full); //decrement full count Down(mutex); //enter critical region remove item(&item); //take item from buffer up(mutex); //leave critical region up(empty); //increment count of empty slots consume_item(item); //Do something with item } } (THE PRODUCER CONSUMER PROBLEM USING SEMEPHORES)
  • 11. MONITORS MONITORS Monitor is a collection of procedures, variables,data structures that are all grouped together in a special kind of module or package. Or A high-level data abstraction tool that automatically generates atomic operations on a given data structure.
  • 12. MONITORS A monitor has:  Shared data.  A set of atomic operations on that data.  A set of condition variables
  • 13. MONITORS Monitor example Integer I; Conditiion c Procedure producer(x); . . . End; Procedure consumer(x); . . . End; End monitor
  • 14. MONITORSMONITORS Muhammad AmmarMuhammad Ammar #2055#2055 Explanation of MonitorsExplanation of Monitors
  • 15. MONITORS Explanation Monitors are a programming language construct, so the compiler knows they are special and can handle calls to monitor procedures differently from other procedure calls.
  • 16. MONITORS Explanation when a process calls a monitor procedure then procedure will check that either any process is currently active or not.
  • 17. MONITORS Explanation - If any process is currently active then the monitor procedure will be suspended until the process has left monitor. - If no other process is using the monitor then the monitor procedure will enter the calling process.
  • 18. MONITORS Explanation - The person who writing the monitor procedure does not know, how the compiler arranges for mutual exclusion. - But monitor procedure provide an easy way to overcome mutual exclusion.
  • 19. MONITORS Explanation - It is not enough to achieve mutual exclusion only. We also need a way for processes to block when they cannot proceed .
  • 20. MONITORS Explanation The solution for this is that when a monitor procedure discovers that it cannot continue ,it does a wait on some condition.This action causes the calling process to block. - It also allows another process that had been previously prohibited from entering the monitor to enter now.
  • 21. MONITORSMONITORS Qamar SheerazQamar Sheeraz #2076#2076 Explanation of Monitors 2Explanation of Monitors 2
  • 22. MONITORS The producer consumer problems with monitors: The operations WAIT and SIGNAL look similar to SLEEP and WAKEUP, which saw earlier had fatal race conditions. SLEEP and WAKEUP failed because while one process was trying to go to SLEEP, the other
  • 23. MONITORS one was trying to make it up. With Monitors, that cannot happen. The automatic mutual exclusion on monitor procedures guaranties that if, say, the producer inside a Monitor Procedure discovers that the buffer is full, it will be able to
  • 24. MONITORS complete the WAIT OPERATION without having to worry about the possibility that the scheduler may switch to the consumer just before the WAIT completes. The consumer will not even be let into the Monitor at all until the WAIT is finished and Producer has been marked as no longer run able
  • 25. MONITORS - Monitors make parallel programming much less error-prone than with Semaphores. - Still they too have some drawbacks. - Monitors are a programming language concept. - Some languages supports Monitors but C, Pascal and most other languages do not have Monitors.
  • 26. MONITORS - The languages which do not have monitors, so it is unreasonable to expect their compilers to enforce any mutual exclusion rules. - In fact, how could the compiler even know which procedures were in monitors and which were not?
  • 27. MONITORSMONITORS Ahmad KhanAhmad Khan #2056#2056 PRODUCER-CONSUMER PROBLEMPRODUCER-CONSUMER PROBLEM WITH MONITORSWITH MONITORS
  • 28. MONITORS Monitor ProducerConsumer condition full, empty; integer count; Procedure enter; Begin if count = N then wait(full); Enter_item; Count := count + 1; If count = 1 then signal(empty); End;
  • 29. MONITORS Procedure remove; Begin If count = 0 then wait(empty); remove_item; Count = count - 1; If count = N - 1 then signal(full); end Count := 0; End monitor;
  • 30. MONITORS Procedure producer; Begin While true do Begin produce_item; ProducerConsumer.enter; End End;
  • 31. MONITORS Procedure consumer; Begin While true do Begin ProducerConsumer.remove; Consume_item; End End; ( The producer-consumer problem with monitors. The buffer has N slots. )
  • 32. MONITORSMONITORS Zulqarnain AnsariZulqarnain Ansari #2085#2085 USING SEMAPHORES IMPLEMENTINGUSING SEMAPHORES IMPLEMENTING MONITORSMONITORS
  • 33. MONITORS Using Semaphores to Implement Monitors: - If the Operating System provides Semaphores as a basic feature, any Compiler ( which supports Monitor ) writer can easily implement Monitors in his Language. - Associated with each Monitor is a binary Semaphore.
  • 34. MONITORS Using Semaphores to Implement Monitors : - Mutex, initially 1, to control entry to the Monitor, and an additional Semaphore , initially 0, per condition variable. - If Monitor is currently in use, the Process will block.
  • 35. MONITORS Using Semaphores to Implement Monitors: - On leaving the process does an UP mutex to permit a waiting process to enter. - e.g, Consider the Producer-Consumer problem again. The mutex semaphore guarantees that each process has exclusive access to the monitor for its critical section.
  • 36. MONITORS Using Semaphores to Implement Monitors: - Suppose the consumer start 1st and discovers that there is no work for it in the buffer .It does a WAIT EMPTY ,which causes an up on mutex and DOWN on empty. The consumer goes to sleep, and the producer is allowed to enter as soon as it wants to.
  • 37. MONITORS Using Semaphores to Implement Monitors: - When the producer discovers that count is 1, it will do signal empty to wake up the Consumer. - At this point both Producer and Consumer are active in the Monitor. - But since one of our rules of programming
  • 38. MONITORS Using Semaphores to Implement Monitors: with monitors is that after doing SIGNAL a process must leave the MONITOR immediately, no harm is done.
  • 39. MONITORSMONITORS Adnan KhanAdnan Khan #1941#1941 USING MONITORS TO IMPLEMENTUSING MONITORS TO IMPLEMENT SEMAPHORESSEMAPHORES ANDAND MESSAGESMESSAGES
  • 40. MONITORS -Semaphores are Flag variables . -Boolean type (True or False). -MESSAGES Problem with monitors, and also with semaphores, is that they were designed for solving the mutual exclusion problem on one or more CPUs that all have access to common memory. But when we talk about the Distributed system consisting of multiple CPUs,each with its own private memory ,connected by a LAN.
  • 41. MONITORS -CONCLUSION Semaphores are too low level and monitors are not usable except few programming languages . Furthermore none of the primitives provide for information exchange between machines. -So some thing there was to be needed and that was -MESSAGE PASSING. This method of interprocess communication uses two primitives SEND and RECEIVE,which are like semaphores and unlike monitors.And are system calls.
  • 42. MONITORS Using Monitors to Implement Semaphores and Messages: Implementing semaphores and messages using monitors follows roughly the same pattern. But ,in simpler,because Monitors r a higher level construct than Semaphores. IMPLEMENTATION OF SEMAPHORES To implement Semaphores,we need a counter and Link List for each semaphore to be implemented, as well as a condition variable per process. -When a DOWN is done,the caller checks (inside the monitor)to see if the counter for that semaphores is greater than zero,And if it is ,th e counter is decremented and the caller exits the Monitor.
  • 43. MONITORS IMPLEMENTATION OF SEMAPHORES -If counter is zero,the caller adds its own process no to link list and does a WAIT on its condition variable. When UP is done on a Semaphore, -The caller incrrements the counter (inside the monitor)and then checks to see if the link list is having any entries. If the list has entries,the caller removes one of them and generates SIGNAL on the conditon variable for that process. In a more sophisticated implementation,each process puts its priority on the list along with its process no ,so that the highest priority process would be awakened 1st .
  • 44. MONITORS IMPLEMENTATION OF MESSAGES: -Implementing messages using Monitors is essentially the same as with semaphores,except that instead of Semaphore per process we have a conditon variable per process. -The mailbox structures are the same for both implementations.