Scheduling Discipline Article Index for
Scheduling
Website Links For
Scheduling
 

Information About

Scheduling Discipline




Scheduling is a key concept in Computer Multitasking and Multiprocessing Operating System design, and in Real-time Operating System design. It refers to the way Processes are assigned priorities in a Priority Queue . This assignment is carried out by software known as a scheduler.

In Real-time environments, such as Mobile Device s for Automatic Control in industry (for example Robotics ), the scheduler also must ensure that processes can meet Deadline s; this is crucial for keeping the system stable. Scheduled tasks are sent to mobile devices and Managed through an administrative back end.


TYPES OF OPERATING SYSTEM SCHEDULERS

Operating systems may feature up to 3 distinct types of schedulers: a ''long-term scheduler'' (also known as an admission scheduler), a ''mid-term or medium-term scheduler'' and a ''short-term scheduler'' (also known as a dispatcher).

The long-term, or admission, scheduler decides which jobs or processes are to be admitted to the and CPU Intensive processes is to be handled. Typically for a Desktop Computer , there is no long-term scheduler as such, and processes are admitted to the system automatically. However this type of scheduling is very important for a Real Time system, as the system's ability to meet process deadlines may be compromised by the slowdowns and contention resulting from the admission of more processes than the system can safely handle. 399

The mid-term scheduler, present in all systems with Virtual Memory , temporarily removes processes from main memory and places them on secondary memory (such as a disk drive) or vice versa. This is commonly referred to as "swapping out" or "swapping in" (also incorrectly as " Paging out" or "paging in"). The mid-term scheduler may decide to swap out a process which has not been active for some time, or a process which has a low priority, or a process which is Page Fault ing frequently, or a process which is taking up a large amount of memory in order to free up main memory for other processes, swapping the process back in later when more memory is available, or when the process has been unblocked and is no longer waiting for a resource. 396 370

In many systems today (those that support mapping virtual address space to secondary storage other than the swap file), the mid-term scheduler may actually perform the role of the long-term scheduler, by treating binaries as "swapped out processes" upon their execution. In this way, when a segment of the binary is required it can be swapped in on demand, or "lazy loaded". 394

The short-term scheduler (also known as the dispatcher) decides which of the ready, in memory processes are to be executed (allocated a CPU) next, following a clock interrupt, an IO interrupt, an operating System Call or another form of Signal . Thus the short-term scheduler makes scheduling decisions much more frequently than the long-term or mid-term schedulers - a scheduling decision will at a minimum have to be made after every time slice, and these are very short. This scheduler can be Preemptive , implying that it is capable of forcibly removing processes from a CPU when it decides to allocate that CPU to another process, or non-preemptive, in which case the scheduler is unable to "force" processes off the CPU. 396 .


SCHEDULING DISCIPLINES

See Also: Scheduling algorithm



Scheduling disciplines are algorithms used for distributing resources among parties which simultaneously and asynchronously request them. Scheduling disciplines are used in Router s (to handle packet traffic) as well as in Operating System s (to share CPU Time among Threads and Processes ).

The main purposes of scheduling algorithms are to minimize Resource Starvation and to ensure fairness amongst the parties utilizing the resources.


Common scheduling disciplines

The following is a list of common scheduling practices and disciplines:



OPERATING SYSTEM SCHEDULER IMPLEMENTATIONS


Different computer operating systems implement different scheduling schemes. Very early MS-DOS and Microsoft Windows systems were non-multitasking, and as such did not feature a scheduler. Windows 3.1 -based operating systems use a simple non-preemptive scheduler which requires programmers to instruct their processes to "yield" (give up the CPU) in order for other processes to gain some CPU time. This provided primitive support for multitasking, but did not provide more advanced scheduling options.

Windows NT 4.0 -based operating systems use a Multilevel Feedback Queue . Priorities in Windows NT 4.0 based systems range from 1 through to 31, with priorities 1 through 15 being "normal" priorities and priorities 16 through 31 being Soft Realtime priorities, requiring privileges to assign. Users can select 5 of these priorities to assign to a running application from the Task Manager application, or through thread management APIs. Information on the Windows NT scheduler

Early Unix implementations use a scheduler with multilevel feedback queues with round robin selections within each Feedback Queue. In this system, processes begin in a high priority queue (giving a quick response time to new processes, such as those involved in a single mouse movement or keystroke), and as they spend more time within the system, they are preempted multiple times and placed in lower priority queues. Unfortunately under this system older processes may be starved of CPU time by a continual influx of new processes, although if a system is unable to deal with new processes faster than they arrive, starvation is inevitable anyway. Process priorities could be explicitly set under Unix to one of 40 values, although most modern Unix systems have a higher range of priorities available (Solaris has 160). Instead of the Windows NT 4.0 solution to low priority process starvation (bumping a process to the front of the round robin queue should it be starving), early Unix systems used a more subtle aging system, to slowly increase the priority of a starving process until it was executed, whereupon its priority would be reset to whatever it was before it started starving.

The Linux Kernel had been using an O(1) Scheduler until 2.6.23, at which point it is switching over to the Completely Fair Scheduler .


REFERENCES



SEE ALSO



FURTHER READING