Question: Below, which statement is correct about the performance issue of a thread yielding itself when the intended lock is unavailable? 1 . Yield generates a

Below, which statement is correct about the performance issue of a thread yielding itself when the intended lock is unavailable?
1. "Yield" generates a context switch, which can worsen when more threads contend for shared resources.
2. "Yield" leads to CPU time cycle waste because the thread does nothing but wait in the CPU.
1
2
1 and 2
neither 1 nor 2

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!