操作系统双语阅读 - Schedulers调度器

These processes are spooled to a mass-storage device (typically a disk), where they are kept for later execution.

这些进程存储在进程池中,进程池存放在大容量存储器中,如磁盘,以便后续的载入运行。

The long-term scheduler, or job scheduler, selects processes from this pool and loads them into memory for execution.

长调度,也叫作业调度,从进程池中选择进程并载入主存中执行。

The short-term scheduler, or CPU scheduler, selects from among the processes that are ready to execute and allocates the CPU to one of them.

短调度,也叫CPU调度,在准备序列中选择进程,并分配CPU给其中一个被选择的进程。

 

 

The primary distinction between these two schedulers lies in frequency of execution. The short-term scheduler must select a new process for the CPU frequently.

两个调度的主要区别是其执行频率。短调度必须频繁地为CPU选择一个新进程。

A process may execute for only a few milliseconds before waiting for an I/O request.

一个进程需要需要再等待一个IO请求前用仅仅几微妙执行。

Often, the short-term scheduler executes at least once every 100 milliseconds.

短调度经常需要再每隔100微妙执行一次。

Because of the short time between executions, the short-term scheduler must be fast.

执行间隔时间如此短,所以段调度必须速度高。

If it takes 10 milliseconds to decide to execute a process for 100 milliseconds, then 10/(100 + 10) = 9 percent of the CPU is being used (wasted) simply for scheduling the work.

如果需要花费10微妙去决定执行哪个进程,而这个进程本身花费100微妙,那么10./(100+10) = 百分之九的CPU时间要用来执行调度工作,而这部分的CPU时间相当于“浪费掉了”。

 

 

The long-term scheduler executes much less frequently; minutes may separate the creation of one new process and the next.

长调度执行频率相对低很多;两个进程创建的时间间隔也许以分钟计算。

The long-term scheduler controls the degree of multiprogramming (the number of processes in memory).

长调度控制多道程序设计的度(就是内存中进程的数量)。

If the degree of multiprogramming is stable, then the average rate of process creation must be equal to the average departure rate of processes leaving the system.

如果多道程序设计是稳定的,那么平均进程创建频率和平均进程离开系统的频率是一致的。

Thus, the long-term scheduler may need to be invoked only when a process leaves the system.

因此长调度也许只在一个进程离开系统的时候才会被执行。

 Because of the longer interval between executions, the long-term scheduler can afford to take more time to decide which process should be selected for execution.

因为长调度执行时间间隔更长,那么可以用更多时间去决定哪个进程应该调入内存执行。

你可能感兴趣的:(操作系统,进程,调度,process,schedulers)