6. In a concurrent computing environment, semaphores are used to control access to shared resources and prevent race conditions. Which of the following statements accurately describes the primary mechanism by which semaphores achieve this?
(A) Semaphores expedite process execution by enabling all waiting processes to access the critical section simultaneously if the semaphore count is positive.
(B) Semaphores use a counter to manage how many processes can simultaneously access a critical section of code, effectively ensuring mutual exclusion and synchronization.
(C) Semaphores eliminate the need for process synchronization by allowing unrestricted access to shared resources, relying on the operating system to manage concurrency.
(D) Semaphores utilize hardware interrupts to pause the execution of processes trying to enter a critical section until it becomes available, ensuring orderly access.
(E) Semaphores automatically resolve deadlocks by preempting resources from processes, thus allowing other processes to proceed without waiting.

答案:登入後查看
統計: A(0), B(5), C(0), D(0), E(0) #3228164

詳解 (共 1 筆)

#6967387
1. 題目解析 本題考察的是信號量(s...
(共 1053 字,隱藏中)
前往觀看
0
0