为什么I/O绑定进程更快?

Cha*_*hak 2 operating-system process

通常,CPU运行一段时间而不停止,然后进行系统调用以从文件读取或写入文件.系统调用完成后,CPU会再次计算,直到需要更多数据或必须写入更多数据,依此类推.

Some processes spend most of their time computing, while others spend most of their time waiting for I/O. The former are called compute-bound; the latter are called I/O-bound. Compute-bound processes typically have long CPU bursts and thus infrequent I/O waits, whereas I/O-bound processes have short CPU bursts and thus frequent I/O waits.

As CPU gets faster, processes tend to get more I/O-bound.

Why and how?


Edited:

It's not a homework question. I was studying the book (Modern Operating Systems by Tanenbaum) and found this matter there. I didn't get the concept that's why I am asking here. Don't tag this question as a homework please.

Thi*_*ilo 12

使用更快的CPU,使用CPU所花费的时间将减少(给定相同的代码),但执行I/O所花费的时间将保持不变(给定相同的I/O性能),因此百分比花在I/O上的时间会增加,I/O将成为瓶颈.

这并不意味着"I/O绑定进程更快".

  • 有了更快的CPU,人们就会给CPU更多的工作要做,承担他们以前认为不可能或不切实际的事情。 (2认同)

sle*_*man 5

随着CPU变得越来越快,进程往往会受到更多的I/O限制.

它试图说的是:

随着CPU变得越来越快,进程往往不会与CPU速度成比例地增加速度,因为它们会受到更多的I/O限制.

这意味着I/O绑定进程比非I/O绑定进程慢,而不是更快.

为什么会这样?好吧,当只有CPU速度增加时,系统的所有其余部分的速度都没有增加.你的硬盘仍然是相同的速度,你的网卡速度仍然是相同的,即使你的RAM仍然是相同的速度*.因此,随着CPU速度的增加,程序的限制因素变得越来越低,但更多的是I/O的速度.换句话说,程序自然会转向越来越多的I/O限制.换句话说:..as CPU gets faster, processes tend to get more I/O-bound.

*注意:从历史上看,其他所有东西的速度都会随着CPU而提高,但不会那么多.例如,CPU从4MHz到2GHz,速度提高了500倍,而硬盘速度从大约1MB/s增加到70MB/s,增加了70倍.

  • +1."进程往往不会与CPU速度(增加)成比例地增加速度".我在答案中错过了那个方面. (2认同)