Identify the correct statement(s) from the followings with respect to Spinlock…
2025
Identify the correct statement(s) from the followings with respect to Spinlock Semaphores
A. The name refers to busy waiting semaphores.
B. They are not useful when the locks are to be held for a short duration of time.
C. It may require multiple context switches when a process waits on a lock.
D. They are often employed on Uniprocessor systems.
Choose the correct answer from the options given below:
Answer: A. A Only — Answer: Only the statement "The name refers to busy waiting semaphores" is correct. "The name refers to busy waiting semaphores": True. Spinlocks cause a…
- A.
A Only
- B.
D Only
- C.
B, D Only
- D.
A, C and D Only
Attempted by 116 students.
Show answer & explanation
Correct answer: A
Answer: Only the statement "The name refers to busy waiting semaphores" is correct.
"The name refers to busy waiting semaphores": True. Spinlocks cause a thread to repeatedly test (spin on) a lock variable, which is busy-waiting.
"They are not useful when the locks are to be held for a short duration of time": False. Spinlocks are most appropriate when the lock hold time is very short because spinning can be cheaper than the overhead of a context switch.
"It may require multiple context switches when a process waits on a lock": False. Spinlocks avoid blocking the thread and therefore typically avoid context switches while waiting; blocking synchronization primitives can lead to context switches.
"They are often employed on Uniprocessor systems": False. On a uniprocessor, a spinning thread can prevent the thread holding the lock from running, so spinlocks are generally not used there.
Conclusion: Only the first statement is correct.
A video solution is available for this question — log in and enroll to watch it.