Monitor (synchronization)

Monitor (synchronization)

In concurrent programming, a monitor is an object or module intended to be used safely by more than one thread. The defining characteristic of a monitor is that its methods are executed with mutual exclusion. That is, at each point in time, at most one thread may be executing any of its methods. This mutual exclusion greatly simplifies reasoning about the implementation of monitors compared to reasoning about parallel code that updates a data structure.

Monitors also 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. Monitors also have a mechanism for signaling other threads that such conditions have been met.

Monitors were invented by C. A. R. Hoare and Per Brinch Hansen, and were first implemented in Brinch Hansen's Concurrent Pascal language.

Read more about Monitor (synchronization):  Mutual Exclusion, Waiting and Signaling, History

Famous quotes containing the word monitor:

    It is indeed typical that you Earth people refuse to believe in the superiority of any world but your own. Children looking into a magnifying glass, imagining the image you see is the image of your true size.
    —Franklin Coen. Joseph Newman. The Monitor (Douglas Spencer)