Tuesday, 13 March 2012

Implementation region x when B do S


  • Associate with the shared variable x, the following variables:
  semaphore mutex, first-delay, second-delay;
    
int first-count, second-count;
  • Mutually exclusive access to the critical section is provided by mutex.
  • If a process cannot enter the critical section because the Boolean expression B is false, it initially waits on the first-delay semaphore; moved to the second-delay semaphore before it is allowed to reevaluate B.

No comments:

Post a Comment