|
|
|
|
|
Monitor (Computer Science)A monitor is a synchronization mechanism that encapsulates the representation of a shared resource and provides operations that are the only way of manipulating it. In other words, a monitor contains variables that represent the state of the resource and procedures that implement operations on the resource; a process or thread can access the monitor's variables only by calling one of its procedures. Mutual exclusion among the procedures of a monitor is guaranteed; execution of different procedures, or two calls to the same procedure, cannot overlap. Conditional synchronization is provided by condition variables. Monitors can be embedded in programming languages, and are easier and safer to use than semaphores because compilers can implicitly issue to lock/unlock instructions, which cannot be forgotten.
|
 |
|
| Copyright 2005-2009 OnPedia.com. All Rights Reserved |
|
|