FACTOID # 29: 73.3% of America's gross operating surplus in motion picture and sound recording industries comes from California.
 
 Home   Encyclopedia   Statistics   States A-Z   Flags   Maps   FAQ   About 
   
 
WHAT'S NEW
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > Preemptive multitasking

Pre-emptive multitasking is a form of multitasking in which processes are not allowed to take an indefinitely long time to complete execution in the CPU. Each process, in turn, is granted a portion of CPU time (usually called a time slice, on the order of milliseconds). A process which does not relinquish the CPU voluntarily within its time slice is forcibly context-switched with the next process in scheduling queue.


Context-switching can usually happen for many different reasons. Some common reasons are:

  • the process has consumed its time slice, and the system clock interrupt pre-empts the process
  • the process goes to wait state (often due to planned sleeping, waiting for an I/O event to happen, or just Mutual exclusion)
  • a higher priority process becomes ready for execution, which causes a pre-emption
  • the process gives away its time slice voluntarily
  • the process terminates itself

Some OSes permit processes to deny pre-emption for a period of time. e.g. AmigaOS would permit a process to refuse to context-switch in order to read system data structures that might be altered by other processes.


Some OSes always forbid lower priority processes to pre-empt higher priority processes. Some OSes allow it occasionally. See scheduling.


Because this all happens at extreme high speed, the computer appears to be doing many things at the same time.


  Results from FactBites:
 
Computer multitasking - Wikipedia, the free encyclopedia (1478 words)
Multitasking solves the problem by scheduling which task may be the one running at any given time, and when another waiting task gets a turn.
Another reason for multitasking was in the design of real-time computing systems, where a number of possibly unrelated external activities needed to be controlled by a single processor system.
Typically, a multitasking system allows another process to run when the running process hits a point where it has to wait for some portion of memory to be reloaded from secondary storage.
Multitasking definition by The Linux Information Project (LINFO) (1290 words)
In a multitasking system, however, multiple processes are retained in the main memory, which physically consists of RAM (i.e., random access memory) chips, so that whenever one process has to wait, the operating system can immediately allocate the CPU to other processes.
Preemptive multitasking increases overall system efficiency by freeing up the CPU and other system resources when ordered to by the operating system on a time slice basis or a priority basis so that one application cannot monopolize system resources when they are needed by another program.
Multitasking is particularly crucial for real time operating systems (such as are used in embedded systems), for which it is necessary to monitor and control multiple external activities with a single processor virtually instantaneously.
  More results at FactBites »

 
 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments

Want to know more?
Search encyclopedia, statistics and forums:

 


Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms, 1022, m