Job control (computing): Difference between revisions

Content deleted Content added
Remove fluff
 
(3 intermediate revisions by the same user not shown)
Line 5:
{{More citations needed|date=August 2017}}
In [[computing]], '''job control''' refers to the automated control of [[Job (computing)|job]] execution; ensuring that each job has access to adequate resources to perform correctly, that competition for limited resources does not cause a [[Deadlock (computer science)|deadlock]], resolving such situations where they do occur, and terminating jobs that, for any reason, are not performing as expected. Even with sophisticated automation, most systems, such as [[Job control (Unix)|Unix-like systems]], permit manual operations such as interrupting, pausing and resuming jobs and to execute them in the foreground (interactively) instead of the usual background (batch) mode for fully automated execution.
 
Job control, a.k.a. [[batch processing]] mostly proceeds without human intervention.<ref>{{cite web
|url=http://publib.boulder.ibm.com/infocenter/zos/basics/index.jsp?topic=/com.ibm.zos.zmainframe/zconc_batchproc.htm
|title=Mainframe working after hours: Batch processing}}</ref> Job control is configured by [[programmer]]s who decide details including:
* When to run a job
* underUnder which conditions to skip a step.
* Which files and/or devices to use for input/output
* Whether a file is to be retained or deleted
* The maximum amount of storage that can be used
 
== History ==
Job control has developed from [[History of computing| the early days of computers]] where humanwhen [[Computer operator| operators]] were responsible for setting up, monitoring and controlling every jobjobs, to modern [[operating system]]s,systems which take on the bulk of the work of job control.
 
It became obvious to the earlyEarly computer developers realized that their fast machinescomputers spent most of thetheir time idle because the single program they were executingsoftware had to wait while a relatively slow [[peripheral]] device completed an essential operation such as reading or writing data; in modern terms, programs were [[I/O-bound]], not [[compute-bound]]. [[Data buffer| Buffering]] only provided a partial solution;, but eventually an output buffer would occupy all available memory or an input buffer would be emptied by the programempty, and the system would be forced tothen wait for a relatively slow device to complete anits operationtask.
 
A more general solution is [[Computer multitasking| multitasking]]. MoreA thancomputer oneexecutes runningmultiple programprograms, orconcurrently by loading a program into a [[Process (computing)|process]], isthat presentcan inbe paused when the computerprocessor attime anycan givenbetter time.be Ifused for a process that is unablenot towaiting. continue,The itsprocess's [[context (computing)|context]] canis becached storedin memory and theanother computerprocess's cancontext startis orused resumeto theresume execution of anotherthat process. AtThe firstsoftware quiteresponsible unsophisticatedfor andcontext relyingswapping on special programming techniques, multitasking soon became automated, and was usually performed by a special processis called the [[Scheduling (computing)|scheduler]], havingworks thewith ability to interrupt and resume the execution of other processes. Typically aperipheral [[device driver|driver]]s for a peripheral deviceto suspendssuspend execution of the currentactive process if the device is unable to complete an operation immediately, and the scheduler places the process on its [[job queue |queue]] of sleepinginactive jobs. When the peripheral completedcompletes the operation, the process isavailable re-awakenedto be resumed by the scheduler. Similar suspension and resumption applies to any operation that may alsoinvolve applywaiting; toincluding asynchronous [[inter-process communication]], where processes have to communicate with one another in an asynchronous manner but may sometimes have to wait for a reply.
 
However, this low-level scheduling has its drawbacks. A process that seldom needswaits to(i.e. interactdoes withnot peripheralsuse ora other processesperipheral) would simply hog the processor resource until it completed or was halted by manual interventioninterrupted. TheOther result,processes particularlywould forthen interactivebe systemsstarved runningof tasksprocessor thatresources frequentlyand interactmight withbecome theslow. outsideThis world,can isbe thatresolved thevia system[[Preemption is(computing)|preemptive]] sluggish and slow to react inmultitasking, a timely manner.k.a. Thistime problemslicing, isin resolved by allocating a "timeslice" towhich each process, ais periodswapping ofout uninterruptedafter executionit afterhas whichhad the schedulerprocessor automaticallyfor putsa itperiod onof thetime. sleepFurther, queue.a Processprocess couldcan be given differenta priorities,priority andthat theallows schedulerit couldto thenbe allocategiven varyingmore shares of available execution timeaccess to eachthe process onrelative theto basislower ofpriority the assigned prioritiesprocesses.
 
This system of [[Preemption (computing)|pre-emptive]] multitasking forms the basis of most modern job control systems.
 
=={{anchor}}Batch processing==
{{main article|Batch processing}}
While batch processing can run around the clock, with or without computer operators,<ref>{{cite web
|url=http://publib.boulder.ibm.com/infocenter/zos/basics/index.jsp?topic=/com.ibm.zos.zmainframe/zconc_batchproc.htm
|title=Mainframe working after hours: Batch processing}}</ref> since the computer is much faster than a person, most decision-making occurs before the job even begins to run, and requires planning by the "programmer."
 
==Language==
=== Batch-oriented features ===
Although a computer operator may be present, batch processing is intended to mostly operate without human intervention. Therefore, many details must be included in the submitted instructions:
* which programs to run;
* which files and/or devices to use for input/output;<ref>and many more details, such as whether the file is to be retained or deleted, the maximum of disk space to which it can grow, the name of a tape to be pre-mounted</ref>
* under which conditions to skip a step.
 
==Job control languages==
===Batch===
Early computer [[resident monitor]]s and [[operating system]]s were relatively primitive and were not capable of sophisticated resource allocation. Typically such allocation decisions were made by the computer operator or the user who submitted a job. [[Batch processing]] was common, and interactive computer systems rare and expensive. Job control languages developed as primitive instructions, typically punched on cards at the head of a deck containing input data, requesting resources such as memory allocation, serial numbers or names of magnetic tape spools to be made available during execution, or assignment of filenames or devices to device numbers referenced by the job. A typical example of this kind of language, still in use on mainframes, is [[IBM]]'s [[Job Control Language]] (also known as JCL). Though the format of early JCLs was intended for [[punched card]] use, the format survived the transition to storage in computer files on disk.