| English | 释义 | 拼音 |
|---|---|---|
| sequential computing/siːˈkwenʃl kəmˈpjuːtɪŋ/ | 顺序计算 | shùn xù jì suàn |
| Parallel computing/ˈpærəlel kəmˈpjuːtɪŋ/ | 并行计算 | bìng xíng jì suàn |
| processors/ˈprəʊsesəz/ | 处理器 | chǔ lǐ qì |
| Distributed computing/ˈdɪstrɪbjuːtɪd kəmˈpjuːtɪŋ/ | 分布式计算 | fēn bù shì jì suàn |
| speedup/ˈspiːdʌp/ | 加速比 | jiā sù bǐ |
一次一步
- 传统上计算机一次运行一步。
- 这是顺序计算(sequential computing):每一步必须完成才能开始下一步。
- 它简单,但对大任务可能慢。
- 要更快,我们可以一次做几步。
In sequential computing:
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
One step at a time, in order.
并行与分布式
- 并行计算(parallel computing)用一台机器里的几个处理器(processors)同时运行一个任务的各部分。
- 分布式计算(distributed computing)把一个任务分散到许多分开的计算机,常在不同的地方,由网络连接。
- 并行 = 许多处理器,一台机器。分布式 = 许多机器。
- 两者都旨在更快地完成一个大任务。

并行计算:多个处理器同时工作
Sequential, parallel, or distributed?
Sequential runs one step at a time; parallel uses several processors in one machine at once; distributed spreads a task across many separate computers.
Match each term to its meaning.
难度 2/5 · 今日首次完成可获 140 金币及少量额外奖励
Parallel is one machine; distributed is many machines.
加速比及其极限
- 并行计算的好处用加速比(speedup)衡量:
- $\text{speedup} = \dfrac{\text{time using one processor}}{\text{time using several processors}}$.
- 但任何必须顺序运行的部分都不能通过添加处理器加速。
- 所以顺序的部分设定一个下限——总加速比的一个硬上限。
A task takes 100 s on one processor and 40 s on several. What is the speedup?
难度 2/5 · 今日首次完成可获 140 金币及少量额外奖励
speedup = 100 / 40 = 2.5×.
If 20 s of a 100 s task must run sequentially, what is the maximum possible speedup?
难度 2/5 · 今日首次完成可获 140 金币及少量额外奖励
Even with infinite processors, 20 s remains: 100 / 20 = 5×.
Why can adding more processors never remove the speedup cap?
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
The sequential portion sets a floor on the total time.
Distributed computing is only useful for small jobs that fit on one machine.
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
False. Distributed computing suits huge jobs too big for one machine, such as indexing the web, by splitting the work across many computers.
分布式何时大放异彩
- 分布式方案在巨大的任务上大放异彩——庞大的数据集,或一个索引整个网络的搜索引擎。
- 工作对一台机器太大,自然地分散到成千上万台。
有上限的加速比。 一个 100 秒的任务有 80 秒并行、20 秒顺序。在 4 个处理器上并行部分是 $80 / 4 = 20$ 秒,加 20 秒顺序 = 40 秒。加速比 $= 100 / 40 = 2.5\times$。即使用一百万个处理器,20 秒顺序仍在,所以加速比永远不能超过 $100 / 20 = 5$。
顺序计算一次运行一步。并行计算同时用一台机器里的几个处理器;分布式计算把工作分散到许多机器。并行收益用加速比衡量(单处理器时间 ÷ 多处理器时间),但顺序部分给它设上限(这里是 5×)。