Aspire's Library

A Place for Latest Exam wise Questions, Videos, Previous Year Papers,
Study Stuff for MCA Examinations - NIMCET

Previous Year Question (PYQs)



Identify the correct statement(s) from the following 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.





Solution

Spinlocks are busy waiting locks, meaning the thread repeatedly checks until the lock becomes available — so A is correct.
They are actually useful for short duration locks, since blocking (context switch) is costlier — so B is incorrect.
They do not cause context switches, as the waiting is done actively in CPU — so C is incorrect.
Spinlocks are inefficient on uniprocessor systems, because while one thread spins, the other cannot release the lock — so D is incorrect.


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

Ask Your Question or Put Your Review.

loading...