Java / Java Multithreading part II
What is busy spinning in Java?
Busy spinning is a waiting strategy in which a thread just wait in a loop, without releasing the CPU just by going to sleep. By not releasing the CPU or suspending the thread, your thread retains all the cached data and instruction, which may be lost if the thread was suspended and resumed back in a different core of CPU.
This is popular in high-frequency low latency programming domain, where programmers are trying for extremely low latency in the range of micro to milliseconds.
More Related questions...
orWhat is JVM tiered compilation? Types of thread in Java. Is JVM a process or thread? Can you clone a Thread? What is effectively immutable in Java? What is busy spinning in Java? Explain cache coherence protocol.