top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

What is busy waiting in context of operating system?

+4 votes
71 views
What is busy waiting in context of operating system?
posted Dec 2, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

+1 vote

Busy waiting is where a process checks repeatedly for a condition- it is "waiting" for the condition, but it is "busy" checking for it. This will make the process eat CPU (usually).

For example:

function stay_running_until_there_is_internet() {    
    while(check_internet() == 0) {    
        \\ wait    
    }    
}
answer Jan 22, 2014 by Amit Kumar Pandey
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...