-->
当前位置:首页 > 题库

单选题:Three processes are synchronizing on a shared code segment which

Luz5年前 (2021-05-10)题库832
Three processes are synchronizing on a shared code segment which is protected by a semaphore. If at most two processes are allowed to enter the code segment simultaneously, which of the following results shows the possible values that the semaphore may have?@[A](1)
A. 2, 1, 0, -1
B. 3, 2, 1, 0
C. 2, 1, 0, -1, -2
D. 1, 0, -1, -2




A.2, 1, 0, -1
B.3, 2, 1, 0
C.2, 1, 0, -1, -2
D.1, 0, -1, -2


答案:A