Content deleted Content added
Tony Sidaway (talk | contribs) mNo edit summary |
Tony Sidaway (talk | contribs) Expand somewhat. |
||
Line 2:
Job control has developed from the early days of computers where human [[Computer operator|operators]] were responsible for setting up, monitoring and controlling every job, to modern [[operating system]]s which take on the bulk of the work of job control.
Even with a highly sophisticated scheduling system, some human intervention is desirable. Modern systems permit jobs to be stopped and resumed, to be executed in the foreground (with the ability to interact with the user) or in the background. See for instance [[Job control (Unix)]].
==History==
It became obvious to the early computer developers that their fast machines spent most of the time idle because the single program they were executing had to wait while a slow [[peripheral]] device completed an essential operation such as reading or writing data. [[Data buffer|Buffering]] only provided a partial solution; eventually an output buffer would occupy all available memory or an input buffer would be emptied by the program, and the system would be forced to halt.
A more general solution is [[Computer multitasking|multitasking]]. More than one running program, or [[Process (computing)|process]], is present in the computer at any given time. If a process is unable to continue, its [[context (computing)|context]] can be stored and the computer can start or resume the execution of another process. At first quite unsophisticated and relying on special programming techniques, multitasking soon became automated, and was usually performed by a special process called the [[Scheduling (computing)|scheduler]], having the ability to interrupt and resume the execution of other processes. Typically a [[device driver|driver]] for a peripheral device suspends execution of the current process if the device is unable to complete an operation immediately, and the scheduler places the process on its queue of sleeping jobs. When the peripheral completed the operation the process is re-awakened. Similar suspension and resumption may also apply to [[inter-process communication]], where processes have to communicate with one another in a synchronous manner.
However this low-level scheduling has its drawbacks. A process that seldom needs to interact with peripherals or other processes would simply hog processor resource until it completed or was halted by manual intervention. This problem is resolved by allocating a "timeslice" to each process, a period of uninterrupted execution after which the scheduler automatically puts it on the sleep queue. Process could be given different priorities, and the scheduler could then allocate varying shares of available execution time to each process on the basis of the assigned priorities.
{{computer-stub}}
|