正在加载图片...
5.4.1 Concept of Monitors(2/10) .a Formal definition A monitor defines a lock and zero or more condition variables for managing concurrent access to shared data The monitor uses the lock to insure that only a single thread is active in the monitor at any instance The lock also provides mutual exclusion for shared data Condition variables enable threads to go to sleep inside of critical sections, by releasing their lock at the same time it puts the thread to sleep5.4.1 Concept of Monitors(2/10) • A Formal Definition • A Monitor defines a lock and zero or more condition variables for managing concurrent access to shared data. • The monitor uses the lock to insure that only a single thread is active in the monitor at any instance. • The lock also provides mutual exclusion for shared data. • Condition variables enable threads to go to sleep inside of critical sections, by releasing their lock at the same time it puts the thread to sleep. 7
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有