Job management in the operating system

From the user's perspective, a job is the total work done by the system to complete a user's computing task (or a transaction). For example, for a source program compiled by a user, the source program needs to be compiled, linked, edited, or linked, loaded, and run to generate calculation results. Each of these steps is often called a job step, and the sequential execution of the job steps completes a job.
From a system perspective, homework is a broader concept than a program. It consists of procedures, data and work instructions. The system controls the execution and operation of programs and data in the form of files through job instructions. Moreover, in a batch processing system, a job is the basic unit that occupies memory.
The user's job can be done directly by the user himself in accordance with the order of the job steps; it can also be done indirectly by the user writing the instructions for executing the job steps in sequence and handing it over to the operator at once. The system will process it in sequence according to the instructions. The former is called the online mode, and the latter is called the offline mode.
1. Job status and its transition
A job generally goes through four states: submission, backup, execution and completion from being handed over to the computer system to exiting the system after execution. Its state transition is shown in Figure 2-11.
(1) Submission status. The process of a job entering external storage (also known as the input well) from the input device is called the submission state. Jobs in submission status have information entering the system.
(2) Backup state. When all the information of the job is entered into the external memory, the system creates a Job Control Block (JCB) for the job. The system senses the existence of jobs through JCB. The main contents of JCB include job name, job status, resource requirements, job control method, job type and job priority, etc.
(3) Execution status. A backup job is selected by the job scheduler and the necessary resources are allocated and entered into the memory. After the job scheduler also establishes a corresponding process for it, the job changes from the backup state to the execution state.
(4) Completion status. When the job ends normally and all the resources it occupies have not been reclaimed by the system, the status is completed.
Insert image description here
2. User interface
User interface is also called user interface, which has two meanings. One refers to the way and channel for users to interact with the operating system, that is, the interface of the operating system; the other refers to The control method of this interactive environment is the operating environment.
(1) Operating system interface. The interface of the operating system can be divided into command interface and program interface. The command interface includes keyboard commands and job control commands; the program interface is also called a programming interface or system call. The program requests system services through the programming interface, that is, it communicates with the operating system through the system call program. System calls are the only interface provided by the operating system to programmers. System calls shield users from specific actions of the operating system and only provide relevant functions. System calls are roughly divided into device management, file management, process control, process communication and storage management.
(2) Operating environment. The operating environment supports command interface and program interface, providing a friendly and easy-to-use operating platform. The interactive interface of the operating system has developed from the early command-driven mode to the menu-driven mode, icon-driven mode and window operating environment.

Guess you like

Origin blog.csdn.net/miachen520/article/details/134904087