what is a problem with using a spin lock instead of a mutex ?
b. if the critical section is large, CPU time can be wasted when two threads try to execute the critical section at the same time
when two threads try to execute the critical section at the same time ,then one thread holds the locks and other thread goes for sleep, immediately allowing another thread to run Putting threads to sleep and waking them up again are time consuming operations, taking more CPU time.
what is a problem with using a spin lock instead of a mutex? a. small critical...
what is a problem with using a spin lock instead of a mutex? a. small critical sections that are executed repeatedly by the same thread, can cause problems in the CPU itself due to centrifugal force b. if the critical section is large, CPU time can be wasted when two threads try to execute the critical section at the same time c. spin locks are always better than mutexes if you don’t need condition variables d. spin locks are not...
TRUE-FALSE Basic synchronization principles and multithreading 1. Java user threads can implement both busy-waiting and no-busy-waiting policy. 2. Priority inversion avoids deadlocks. 3. Spinlock mutex can be used as an adaptive mutex. 4. Java RTE can be blocked for Input/Output operation. 5. Interrupted user thread, which executes a method in a monitor, must be rolled back to undo any changes it performed. 6. The synchronization primitive by disabling interrupts can be used by an application program. 7. Bounded-waiting requirement is...