Share on Facebook Share on Twitter Email
Answers.com

Sleep

 
Wikipedia: Sleep (operating system)

A computer program (process or task) may sleep, which places it into an inactive state for a period of time. Eventually the expiration of an interval timer, or the receipt of a signal or interrupt causes the program to resume execution.

A typical sleep system call takes a time value as a parameter, specifying the minimum amount of time that the process is to sleep before resuming execution. The parameter typically specifies seconds, although some operating systems provide finer resolution, such as milliseconds or microseconds.

Some system programs that never terminate execute an event loop, going to sleep at the start of each cycle and waiting for some event to awaken them. Once an event is received, the program services the event, then returns to the beginning of the next wait cycle.

Other programs periodically poll for events by going to sleep and resuming execution after a specific interval of time. Once execution is resumed, the program polls for events or status changes, and then services any that occurred while it was asleep. After servicing the events, the program then goes to sleep again for the next time interval. Certain kinds of heartbeat events or keep-alive signals can be generated by these kinds of programs.

See also



Search unanswered questions...
Enter a question here...
Search: All sources Community Q&A Reference topics
Shopping: Sleep
Top
 
 
Learn More
insomnia
sleep-charged
awake

Do you have to sleep? Read answer...
Why do you have to sleep? Read answer...
What does it sleep in? Read answer...

Help us answer these
When you Sleep?
When does it sleep?
You do not sleep?

Post a question - any question - to the WikiAnswers community:

 

Copyrights:

Wikipedia. This article is licensed under the Creative Commons Attribution/Share-Alike License. It uses material from the Wikipedia article "Sleep (operating system)" Read more