71.9k views
3 votes
The main disadvantage of spinlocks is that :

a) they are not sufficient for many process
b) they require busy waiting
c) they are unreliable sometimes
d) they are too complex for programmers

User Napolean
by
7.7k points

1 Answer

1 vote

Final answer:

The primary drawback of spinlocks is that they necessitate busy waiting, consuming CPU resources without doing useful work. This can lead to inefficiencies in multi-threaded or multi-processor systems.

Step-by-step explanation:

The main disadvantage of spinlocks is that they require busy waiting. This occurs when a process repeatedly checks a condition without performing any other operation until something changes, usually taking up CPU resources while doing nothing productive. Unlike other synchronization mechanisms that may put a thread to sleep while it waits for a resource to become available, spinlocks keep the thread active, which consumes processor time and can lead to inefficiencies, especially in a system with multiple processors or threads.

User Marcus Harrison
by
8.1k points