0% found this document useful (0 votes)
34 views6 pages

Monitors

Monitors are a higher-level language construct than semaphores that are used to solve concurrency problems. A monitor essentially restricts access to shared data within a class so that only one method can access it at a time. Monitors introduce condition variables that allow processes to wait and signal each other to control access to shared resources.

Uploaded by

sarishashibu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views6 pages

Monitors

Monitors are a higher-level language construct than semaphores that are used to solve concurrency problems. A monitor essentially restricts access to shared data within a class so that only one method can access it at a time. Monitors introduce condition variables that allow processes to wait and signal each other to control access to shared resources.

Uploaded by

sarishashibu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Process Synchronization

Background The Critical-Section Problem Synchronization Hardware Semaphores Classical Problems of Synchronization Critical Regions Monitors Synchronization in Solaris 2 Atomic Transactions

Operating System Concepts

Monitors
Semaphores can be very useful for solving concurrency problems, but only if programmers use them properly For this reason a higher-level language construct has been developed, called monitors.

Monitors- Usage
A monitor is essentially a class, in which all data is private, and with the special restriction that only one method within any given monitor object may be active at the same time. An additional restriction is that monitor methods may only access the shared data within the monitor and any data passed to them as parameters. they cannot access any data external to the monitor.

we need to introduce one additional new data type, known as a condition. A variable of type condition has only two legal operations, wait and signal. If X was defined as type condition, then legal operations would be X.wait( ) and X.signal( ) The wait operation blocks a process until some other process calls signal The signal process it wakes up exactly one waiting process

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy