Sleep (operating system)

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 maximum 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

* Signal
* System time
* Unix sleep command
* Sleep mode
* Wait (operating system)
* Uninterruptible sleep


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • Operating System Embedded — Enea OSE Company / developer ENEA Programmed in Assembly, C, C++ OS family Real time embedded operating system …   Wikipedia

  • Fork (operating system) — In computing, when a process forks, it creates a copy of itself, which is called a child process. The original process is then called the parent process . More generally, a fork in a multithreading environment means that a thread of execution is… …   Wikipedia

  • Wait (operating system) — In modern computer operating systems, a process (or task) may wait on another process to complete its execution. In most systems, a parent process can create an independently executing child process. The parent process may then issue a wait… …   Wikipedia

  • Sleep (disambiguation) — Sleep is a form of rest.Sleep can also refer to:* The material found in the corner of one s eye upon waking, which is a normal buildup of tears, mucus, and dirt that appears at the edge of the eyelids after sleep, otherwise known as rheum and… …   Wikipedia

  • Sleep (Unix) — sleep is a Unix command line program that suspends program execution for a specified period of time.The sleep instruction suspends the calling process for at least the specified number of seconds (the default), minutes, hours or days. Usage sleep …   Wikipedia

  • Sleep mode — refers to a low power mode for electronic devices such as computers, televisions, and remote controlled devices. These modes save significant electrical consumption compared to leaving a device fully on and idle but allow the user to avoid having …   Wikipedia

  • System Management Controller — The System Management Controller (SMC) is an internal subsystem introduced by Apple Computer with the introduction of their new Intel processor based machines in 2006. It takes over the functions of the SMU [… …   Wikipedia

  • Uninterruptible sleep — In computer operating systems terminology, a sleeping process can either be interruptible (woken via signals) or uninterruptible (woken explicitly). An uninterruptible sleep state is a sleep state that cannot handle a signal (such as waiting for… …   Wikipedia

  • Operating temperature — An operating temperature is the temperature at which an electrical or mechanical device operates. The device will operate effectively within a specified temperature range which varies based on the device function and application context, and… …   Wikipedia

  • Operating Thetan — In Scientology, the state of Operating Thetan (OT) is a spiritual state above Clear. L. Ron Hubbard, the founder of Scientology, defined it as knowing and willing cause over life, thought, matter, energy, space and time (MEST) .[1] According to… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”