CS 162, Spring 2007
Section notes for 6 February 2007
Sections 102/103
AGENDA
P(Semaphore s)from Wikipedia
{
await s > 0, then s := s-1; /* must be atomic once s > 0 is detected */
}
V(Semaphore s)
{
s := s+1; /* must be atomic */
}
Init(Semaphore s, Integer v)
{
s := v;
}