[Edit]
+
0
-
0
What is busy waiting?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23From Wikipedia: In computer science and software engineering, busy-waiting, busy-looping or spinning is a technique in which a process repeatedly checks to see if a condition is true, such as whether keyboard input or a lock is available. In simple words: It is when a processor is continuously spending its clock cycles while doing nothing and waiting for some specific state. e.g. while (!isTaskDone(task)) { // do nothing here - it causes 100% load on single core } // Where: isTaskDone(task) just checks current task status do not blocking program. // Motivation: that approach sometimes is used in high performance computing to keep thread working when waiting time is short, do not letting thread to go to sleep when fight for resources is verry high.