Monitor (synchronization)
In concurrent programming, an object or module intended to be used safely by more than one thread
In concurrent programming, a monitor is a synchronization construct that prevents threads from concurrently accessing a shared object's state and allows them to wait for the state to change. They provide a mechanism for threads to temporarily give up exclusive access in order to wait for some condition to be met, before regaining exclusive access and resuming their task.
Nº Q1062162 ★
Common · Knowledge
Monitor (synchronization)
In concurrent programming, an object or module intended to be used safely by more than one thread
In concurrent programming, a monitor is a synchronization construct that prevents threads from concurrently accessing a shared object's state and allows them to wait for the state to change. They provide a mechanism for threads to temporarily give up exclusive access in order to wait for some condition to be met, before regaining exclusive access and resuming their task.
From Wikipedia
In concurrent programming, a monitor is a synchronization construct that prevents threads from concurrently accessing a shared object's state and allows them to wait for the state to change. They provide a mechanism for threads to temporarily give up exclusive access in order to wait for some condition to be met, before regaining exclusive access and resuming their task. A monitor consists of a mutex (lock) and at least one condition variable. A condition variable is explicitly 'signalled' when the object's state is modified, temporarily passing the mutex to another thread 'waiting' on the condition variable. Another definition of monitor is a thread-safe object, class, or module that contains and uses a mutex to safely allow access to its methods or variables by more than one thread. The defining characteristic of a monitor is that its methods are executed with mutual exclusion: at each point in time, at most one thread may be executing any of the monitor's methods. By using one or more condition variables it can also provide the ability for threads to wait on a certain condition (thus using the first definition of a "monitor"). For the rest of this article, this sense of "monitor" will be referred to as a "thread-safe object/class/module." Monitors were invented by Per Brinch Hansen and C. A. R. Hoare, and were first implemented in Brinch Hansen's Concurrent Pascal language.
Text: Wikipédia, CC BY-SA 4.0. ·
Related cards
-
C
Concurrent computing
Form of computing in which several computations logically execute during overlapping time periods
Nº Q128392 ★★
Not listed
-
Concurrency (computer science)
Ability of different parts or units of a program, algorithm, or problem to be executed out-of-order or in partial order, without affecting the final outcome
Nº Q1414548 ★★
Not listed
-
E
Event (computing)
Computing operation that can be recognized and handled by software
Nº Q3291944 ★
Not listed
-
Controller (computing)
Computing device that interfaces with a more peripheral device
Nº Q1129239 ★
Not listed
-
C
CC (complexity)
Complexity class in computational complexity theory
Nº Q5009755 ★
Not listed
-
Proxy server
Computer server that makes and receives requests on behalf of a user
Nº Q11189 ★★★★
Not listed