术语"CPU绑定"是什么意思?以及"I/O绑定"和"I/O绑定".意思是? [英] What do the terms "CPU bound" and "I/O bound" mean?

查看:215
本文介绍了术语"CPU绑定"是什么意思?以及"I/O绑定"和"I/O绑定".意思是?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

"CPU绑定"和"I/O绑定"是什么意思?

What do the terms "CPU bound" and "I/O bound" mean?

推荐答案

这很直观:

如果CPU速度更快,程序运行速度会更快,即受CPU限制,即,程序大部分时间仅用于CPU(进行计算).一个计算π的新数字的程序.通常是受CPU限制的,只是计算数字而已.

A program is CPU bound if it would go faster if the CPU were faster, i.e. it spends the majority of its time simply using the CPU (doing calculations). A program that computes new digits of π will typically be CPU-bound, it's just crunching numbers.

如果I/O子系统更快,则程序运行得更快,则该程序受I/O约束.确切的I/O系统意味着什么,可能会有所不同.我通常将其与磁盘相关联,但是当然,一般而言,联网或通信也很常见.通过大文件查找某些数据的程序可能会成为I/O绑定,因为瓶颈是然后从磁盘读取数据(实际上,该示例如今可能已经过时,具有数百MB/s的速度).来自SSD).

A program is I/O bound if it would go faster if the I/O subsystem was faster. Which exact I/O system is meant can vary; I typically associate it with disk, but of course networking or communication in general is common too. A program that looks through a huge file for some data might become I/O bound, since the bottleneck is then the reading of the data from disk (actually, this example is perhaps kind of old-fashioned these days with hundreds of MB/s coming in from SSDs).

这篇关于术语"CPU绑定"是什么意思?以及"I/O绑定"和"I/O绑定".意思是?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆