Fixed priority pre-emptive scheduling
Encyclopedia
Fixed-priority pre-emptive scheduling is a scheduling system
Computer multitasking
In computing, multitasking is a method where multiple tasks, also known as processes, share common processing resources such as a CPU. In the case of a computer with a single CPU, only one task is said to be running at any point in time, meaning that the CPU is actively executing instructions for...

 commonly used in real-time systems. With fixed priority pre-emptive scheduling, the scheduler ensures that at any given time, the processor
Central processing unit
The central processing unit is the portion of a computer system that carries out the instructions of a computer program, to perform the basic arithmetical, logical, and input/output operations of the system. The CPU plays a role somewhat analogous to the brain in the computer. The term has been in...

 executes the highest priority task of all those tasks that are currently ready to execute.

The pre-emptive scheduler
Preemption (computing)
In computing, preemption is the act of temporarily interrupting a task being carried out by a computer system, without requiring its cooperation, and with the intention of resuming the task at a later time. Such a change is known as a context switch...

 has a clock interrupt task that can provide the scheduler
Scheduling (computing)
In computer science, a scheduling is the method by which threads, processes or data flows are given access to system resources . This is usually done to load balance a system effectively or achieve a target quality of service...

 with options to switch
Context switch
A context switch is the computing process of storing and restoring the state of a CPU so that execution can be resumed from the same point at a later time. This enables multiple processes to share a single CPU. The context switch is an essential feature of a multitasking operating system...

 after the task has had a given period—the time slice. This scheduler system has the advantage of making sure no task hogs the processor for any time longer than the time slice. However this scheduling scheme also has the downfall of process or thread lockout
Resource starvation
In computer science, starvation is a multitasking-related problem, where a process is perpetually denied necessary resources. Without those resources, the program can never finish its task....

, as priority is given to higher priority tasks the lower priority tasks could wait an indefinite amount of time. One common method of arbitrating this situation is the use of aging. Aging will slowly increment a process/thread(s) priority which is in the wait queue to ensure some degree of fairness. Most Real-time operating system
Real-time operating system
A real-time operating system is an operating system intended to serve real-time application requests.A key characteristic of a RTOS is the level of its consistency concerning the amount of time it takes to accept and complete an application's task; the variability is jitter...

s (RTOSs) have pre-emptive schedulers. Also turning off time slicing effectively gives you the non-pre-emptive RTOS.

Pre-emptive scheduling is often differentiated with cooperative scheduling, in which a task can run continuously from start to end without being preempted by other tasks. To have a task switch, the task must explicitly call the scheduler. Cooperative scheduling is used in a few RTOS such as Salvo or TinyOS
TinyOS
TinyOS is a free and open source component-based operating system and platform targeting wireless sensor networks . TinyOS is an embedded operating system written in the nesC programming language as a set of cooperating tasks and processes. It is intended to be incorporated into smartdust...

.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK