Operating System Principle 7-Job Management

Source: Internet
Author: User
Knowledge points in this chapter: 1. Job and job step 2. Job Control Mode 3. Scheduling and scheduling of Batch jobs Algorithm 4. Batch Job control 5. Interactive Job Management

Self-study requirements in this chapter: understand a job in the computer system that users require to process. jobs can be divided into batch jobs and interactive jobs; master how the Operating System Schedules and controls job execution; understand the relationship between job height and process scheduling and their respective responsibilities.

This chapter focuses on two control methods: Scheduling Algorithms for Batch jobs.

I. Assignment and operation steps (recognition)

1. Job: we call a problem that users require the computer system to handle as a "job"

2. Operation step: each processing step of a job is called a "operation step ".

Ii. Operation Control Mode (understanding)

1. Job control mode: the user describes the processing steps based on the methods provided by the operating system ". The options include batch processing and interaction. The boss pointed to the guy and said: you should buy a batch of goods first, then clean the meeting room, and then go to the nursery to pick up my son. Don't be lazy. I will check your work later.

In interactive processing, the instructor gave the following command to the students: upright! Students must be upright immediately. Instructor again command: Lie down! Students can't help but follow suit. If they do not do well, the instructors may ask him to redo it.

2. batch control mode: Also known as Offline Control Mode or automatic control mode. The user uses the "Job control language" provided by the operating system to write a "Job Control Manual" for the control intent of job execution, together with the job SourceProgramSubmit the initial data to the system, and the operating system automatically controls the execution of the job according to the control intent specified by the user. This control method is called "batch processing", and "batch processing" refers to jobs that adopt batch processing control mode ".

3. Interactive Control Mode: Also known as online control mode. The user uses the "Operation Control Command" provided by the operating system to express the intention to control job execution. By entering commands one by one, the operating system notifies the user of command execution and asks the user to enter the next command to control the execution of the job until the end. This method is also suitable for end users. An interactive job is called an interactive job ". For jobs from terminals, also known as "terminal jobs"

Iii. Scheduling and Scheduling Algorithms for Batch jobs (Comprehensive Application)

1. batch processing jobs: jobs that adopt batch processing control are called "batch processing jobs"

2. When a batch processing job enters the system, it must submit: source program, runtime data, and job control manual written in the job control language.

3. Batch Job input: the operator only needs to use the "pre-input command" to start the "pre-Input Program" in the spool system to store the job information in the job flow in the "input well. Wait for the system to schedule.

4. Batch Job Scheduling: the operating system selects jobs that can be loaded into the primary memory from the "input well" based on the number of concurrent jobs and certain algorithms. This job is "Job Scheduling ". The program that implements this task is the "Job Scheduling program ".

5. The job scheduler selects the necessary conditions for the job from the "input well": that is, the existing unallocated resources of the system can meet the resource requirements of the selected job. When the existing resources can meet the requirements of multiple jobs in the "input well", the job to be selected depends on the scheduling algorithm.

6. Common Job Scheduling Algorithms (which can be used to solve application problems: combined with the necessary conditions of Job Scheduling, various job scheduling algorithms are used, determine the order in which jobs are selected, and calculate the actual completion time and turnaround time of jobs .)

Service algorithms first: the simplest algorithm, which selects jobs according to the order in which jobs enter the "input well". First jobs are prioritized. Note that the selected job must meet the resource requirements first.

Short job priority algorithm: requires you to estimate the time required for computing your job in advance and describe it in the Job Control Manual. During job scheduling, jobs with short computing time and sufficient resources are prioritized based on the calculation time proposed by the jobs in the input well.

Highest response Priority Algorithm: jobs with a response ratio of = Waiting Time/short computing time are easy to get a higher response ratio. After a long period of time, a high response ratio will be obtained, which can solve the problem that jobs with long computing time are always pushed back.

Priority number scheduling algorithm: determines a priority number for each job. Jobs with sufficient resources and high priority are selected first. When several jobs have the same number of names, jobs with the same priority are then scheduled based on the first-come service algorithm.

Balanced scheduling algorithm: Job Scheduling is classified based on the requirements of jobs for resources. Job Scheduling is selected from all types of jobs, so that jobs with different resources can be executed at the same time.

7. responsibilities and relationships between job scheduling and Process Scheduling.

Job Scheduling is to load the jobs in the input well into the primary storage. At this time, the system creates a process for the job. If multiple jobs are loaded into the primary storage, multiple processes exist at the same time. They are in the ready state (everything is ready, only the handler is not available ).

The role of process scheduling is to select a process that currently occupies a processor. The status of the process changes for some reason. When the process gets out of the processor, the process scheduling selects another job process to run.

Only when they work together can parallel execution of multiple jobs be realized.

Iv. batch processing operation control (understanding)

1. Control the execution of jobs according to the job control manual submitted by the user.

2. The work of one operation step is often completed by the cooperation of multiple processes.

3. After a job step is completed, continue the job in the next job step until the job execution is complete.

5. Interactive Job Management (comprehension)

1. Features of interactive jobs: Interactive jobs are mainly characterized by interactions. They work in man-machine conversation mode.

2. Interactive job control: one is the operation interface, and the other is the command interpretation execution.

Operation interfaces include

Operation Control commands

Menu Technology

Window Technology

Command interpretation and execution

One is to directly explain and execute the corresponding processing module in the operating system;

Another type must be explained and executed by creating user processes.

3. Register and cancel terminal jobs.

Terminal user control terminal jobs are generally executed in four stages: terminal connection, user registration, job execution control, and user exit.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.