Sunday 11 March 2012

Semaphore Implementation


  • Define a semaphore as a record
  typedef struct {
     int value;
    
struct process *L;
  } semaphore;
  • Assume two simple operations:
  1. block suspends the process that invokes it.
  2. wakeup(P) resumes the execution of a blocked process P.

No comments:

Post a Comment