Question: The correct answer is 1 and 2 . Both statements describe performance issues related to lock implementation that can lead to threads spinning while waiting

The correct answer is 1 and 2.
Both statements describe performance issues related to lock implementation that can lead to threads spinning while waiting for a lock:
The spinning thread wastes its CPU time cycle. This is a direct consequence of spinlocks, where a thread continuously checks for the lock's availability instead of yielding the CPU. This leads to inefficient CPU usage.
The thread holding the lock and making execution in the critical section takes longer to complete its job because it, at timer interrupt, must wait for the waiting threads to spin off the duration of time quantum to regain CPU. This statement highlights how the presence of spinning threads can interfere with the execution of the thread holding the lock, potentially leading to longer critical section execution times.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!