![]() |
||
![]() ![]() |
![]() |
|
|
The need for scheduling processes can be traced back to the first time-sharing systems, where multiple users would generally be waiting for service from a central system. On such a system, CPU time was a scarce resource, and scheduling algorithms were necessary to provide a responsive system to the multiple users. Almost all modern operating systems are capable of multi-tasking. If you've ever checked your e-mail while typing a word document, or listened to music (via your PC) while surfing the world-wide web, you've undoubtedly experienced the multi-tasking features of your operating system. While it may appear that the computer was performing all these tasks all at once, the reality is that each CPU core is only capable of processing one task at any given time. The operating system has to handle the multitude of processes that are competing for CPU time. It is the operating system's job to schedule and prioritise tasks, switching the CPU among processes, in order to make the computer more productive. Thus the development of good scheduling algorithms is imperative in the efficient use of resources to optimize the performance of a system. |
||
|
The essential idea behind operating system scheduling is simple: Maximise CPU utilisation. The CPU will run a process until the process has to wait (for whatever reason), after which the CPU would become idle. To fully utilise the CPU, the operating system would give the CPU to another process that is ready to run (runnable). This pattern continues, allowing the CPU to be efficiently shared between processes. |
||
|
Processes can be in three states, switching between which is CPU intensive. These states are as follows:
Scheduling decisions, that decide which process to run next, can occur in the following circumstances:
Process scheduling needs to be efficient not only in the selection of the next process to run, but also in the number of switches made per unit time. Each switch is resource intensive and involves multiple steps, consuming already-scarce CPU time. As such, overzealous switching is counterproductive. |
||
References Modern Operating Systems (2nd Edition), Andrew S. Tanenbaum Operating System Principles (7th Edition), A. SilverSchatz, P. B. Galvin, G. Gagne Process Scheduling, Course Notes, T. Billard Ring (computer security), Wikipedia Scheduling (computing), Wikipedia First-Come-First-Served, Dr. Sridhar R. Iyer, IIT Bombay,Mumbai |
||
| This set of web pages was created by BRYAN CHEN & LASYA ARUNDHATI | ||