P382 Long-term TIme-out scheduling Batch Ready oueue Short-term Release 工 scheduling Processor Medlum-term Interactive Readv suspend oueu Medllum-term Blocked, Suspend Queue Blocked Queue Event Event walt Queuing diaproces ses and schedulInG
PROCESSES AND SCHEDULING P382
Long-term scheduling(P380) ☆ Determines(确定) which program are admitted to the system for processing. Controls the degree of multiprogramming(多道程度). Once admitted(提 3), a job becomes a process and is added to the queue for short-term scheduler or for medium-term scheduler o In a batch system the long-term scheduler chooses the jobs held in(保持在) disk queue and creates processes from the queue when it can 座空會 PROCESSES AND SCHEDULING
PROCESSES AND SCHEDULING Long-term scheduling(P380) ❖ Determines(确定) which program are admitted to the system for processing. Controls the degree of multiprogramming(多道程度). Once admitted(提 交), a job becomes a process and is added to the queue for short-term scheduler or for medium-term scheduler. ❖ In a batch system, the long-term scheduler chooses the jobs held in(保持在) disk queue and creates processes from the queue when it can
Two problems for long-term scheduling(p381) s Decide the number of processes that Os can take on which is decided by the degree of multiprogramming Which job or jobs to accept and turn into(转化为) processes. Decided by scheduling algorithm, e.g. FCFS\ SJF hrR etc When to invoke the long-term scheduler? States of Job: admit, execution finish PROCESSES AND SCHEDULING
PROCESSES AND SCHEDULING Two problems for long-term scheduling(p381) ❖ Decide the number of processes that OS can take on, which is decided by the degree of multiprogramming. ❖ Which job or jobs to accept and turn into(转化为) processes. ٭ Decided by scheduling algorithm,e.g. FCFS、SJF、 HRRN etc… ❖ When to invoke the long-term scheduler? ❖ States of Job: admit, execution, finish
Medium-term scheduling (p383) ☆ Part of the swapping function(交换功能). Choose processes in disk to swap in for execution. PROCESSES AND SCHEDULING
PROCESSES AND SCHEDULING Medium-term scheduling(p383) ❖ Part of the swapping function(交换功能). Choose processes in disk to swap in for execution
Short-term scheduling(p383) ☆ Known as the dispatcher(分派器), executes most frequently and makes the fine-grained( EE)decision of which process to execute next. ☆ The event to invoked(引起) the short-term scheduling Clock interrupt s yO interrupts perating system calls gnals(信号) PROCESSES AND SCHEDULING
PROCESSES AND SCHEDULING Short-term scheduling(p383) ❖ Known as the dispatcher(分派器), executes most frequently and makes the fine-grained(细粒度) decision of which process to execute next. ❖ The event to invoked(引起) the short-term scheduling ٭ Clock interrupts ٭ I/O interrupts ٭ Operating system calls ٭ Signals (信号)