单选题:Three processes are synchronizing on a shared code segment which
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
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