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.
詳解 (共 1 筆)
未解鎖
1. 題目解析 本題考察的是信號量(s...