正在加载图片...
Last Class: Semaphores A semaphore S supports two atomic operations SPO: get a semaphore, wait if busy semaphore s is available SVO: release the semaphore, wake up a process if one is waiting for s Types of semaphore Binary or Mutex Semaphore: grants mutual exclusive access to a resource Counting Semaphore: useful for granting mutually exclusive access for a set of resources Semaphores are difficult to use: orders are importantLast Class: Semaphores • A semaphore S supports two atomic operations • S→P(): get a semaphore, wait if busy semaphore S is available. • S→V(): release the semaphore, wake up a process if one is waiting for S. • Types of semaphore • Binary or Mutex Semaphore: grants mutual exclusive access to a resource • Counting Semaphore: useful for granting mutually exclusive access for a set of resources • Semaphores are difficult to use: orders are important 3
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有