Os-Processor Management

The assignment of physical processors to processes allows processes to accomplish work. The problems of determining when processors should be assigned, and to which processes. This is called processor scheduling.


Three important levels of scheduling are considered.
  • High-Level Scheduling:Sometimes called job scheduling, this determines which jobs shall be allowed to compete actively for the resources of the system. This is sometimes called admission scheduling because it determines which jobs gain admission to the system.
  • Intermediate-Level Scheduling: This determines which processes shall be allowed to compete for the CPU. The intermediate-level scheduler responds to short-term fluctuations in system load by temporarily suspending and activating (or resuming) processes to achieve smooth system operation and to help realize certain system wide performance goals.
  • Low-Level Scheduling:This determines which ready process will be assigned the CPU when it next becomes available, and actually assigns the CPU to this process.


A scheduling discipline is nonpreemptive if, once a process has been given the CPU, the CPU cannot be taken away from that process. A scheduling discipline is preemptive if the CPU can be taken away.

Preemptive scheduling is useful in systems in which high-priority require rapid attention. In real-time systems and interactive timesharing systems, preemptive scheduling is important in guaranteeing acceptable response times.

To make preemption effective, many processes must be kept in main storage so that the next process is normally ready for the CPU when it becomes available. Keeping nonrunning program in main storage also involves overhead.  In nonpreemptive systems, short jobs are made to wait by longer jobs, but the treatment of all processes is fairer. Response time are more predictable because incoming high-priority jobs cannot displace waiting jobs.

In designing a preemptive scheduling mechanism, one must carefully consider the arbitrariness of virtually any priority scheme.


The processes to which the CPU is currently assigned is said to be running. To prevent users from monopolizing the system the operating system has mechanisms for taking the CPU away from the user. The operating system sets an interrupting clock or interval timer to generate an interrupt at some specific future time. The CPU is then dispatched to the process. The process retains control of the CPU until it voluntarily releases the CPU, or the clock interrupts or some other interrupt diverts the attention of the CPU. If the user is running and the clock interrupts, the interrupt causes the operating system to run. The operating system then decides which process should get the CPU next. The interrupting clock helps guarantee reasonable response times to interactive users, to prevent the system from getting hung up on a user in an infinite loop, and allows processes to respond to time-dependent events. Processes that need to run periodically depend on the interrupting events.
Share this article :
Copyright © 2012. Best Online Tutorials | Source codes | Programming Languages - All Rights Reserved