Long-term scheduling

from Wikipedia, the free encyclopedia
LTS scheme

Long-term scheduling (LTS) is a scheduling algorithm used by operating systems.

Long-term scheduling considers which programs should be included in the processing by the system. A process is generated from the corresponding user program, which is included in the short-term scheduling or is initially outsourced and included in the medium-term scheduling . The decision to generate a new process also depends on the degree of multiprogramming: the more processes there are, the lower the proportion of execution time in processor time, because the processes compete for processor time.

Long-term scheduling is a scheduling method in operating systems which roughly (like most other scheduling methods) pursues the following goals:

  • Coordination between individual processes
  • Allocation of system resources
  • Do not expect the user and / or other processes to wait too long

LTS itself works in conjunction with medium-term scheduling (MTS) and short-term scheduling (STS).

In short, the task of the LTS can be reduced to controlling the MTS and STS. LTS does nothing more than assign priorities to the processes (hereinafter called jobs) and feed them accordingly to the further processing process.

Viewed in detail, this looks like the following example explains:

  • A new job wants to be processed.
  • This job is now transferred to the LTS, where it is examined more closely according to the following criteria:
    • What is the priority of the job? (This is not the priority that LTS assigns to the job, but an external priority)
    • Which system resources (drives, printer, ...) does this job require?
    • What kind of job is it? ( Input / Output Job ⇒ The user sits in front of the PC and waits for something to happen / Compute-Bound Job ⇒ There is a lot of work to do for the CPU , but the user can still work smoothly in the meantime; ...)
  • If the job has been classified according to these criteria, the LTS gives it a priority. If the priority is high (and there are enough free system resources), the job is passed directly to the MTS (and processed there). If the priority is low, the job is "temporarily stored" in a queue in order to be processed further in the MTS later.
  • The job is now so first of MTS further processed and finally the STS processed .
  • If STS has now completed the job, STS sends a corresponding message back to LTS.
  • LTS now terminates the process (forwards the corresponding message, e.g .: an output on the screen)