文章
86
粉丝
39
获赞
1
访问
8.4k
Semaphore emptyA = M-x;
Semaphore emptyB = N-y;
Semaphore fullA = x;
Semaphore fullB = y;
Semaphore mutexA = 1;
Semaphore mutexB = 1;
A
{
P(fullA);P(mutexA);fetch mail;V(mutexA);V(emptyA);
answer question and bring forward a new issue
P(emptyB): P(mutexB); put mail; V(mutexB); V(fullB);
}
登录后发布评论
暂无评论,来抢沙发