- Semaphore operations now defined as
wait(S):
S.value--;
S.value--;
if (S.value <
0) {
add this process to S.L;
block;
block;
}
signal(S):
S.value++;
S.value++;
if (S.value <=
0) {
remove a process P from S.L;
wakeup(P);
wakeup(P);
}
No comments:
Post a Comment