操作系统双语阅读 - 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 frequencyof 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.

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值