Parallel and Distributed Computing · 并行与分布式计算
| English | 中文 | Pinyin · 拼音 |
|---|---|---|
| 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ǐ |
One step at a time
- Traditionally a computer runs steps one at a time.
- This is sequential computing 顺序计算: each step must finish before the next begins.
- It is simple, but it can be slow for big jobs.
- To go faster, we can do several steps at once.
一次一步
- 传统上计算机一次运行一步。
- 这是顺序计算(sequential computing):每一步必须完成才能开始下一步。
- 它简单,但对大任务可能慢。
- 要更快,我们可以一次做几步。
In sequential computing: · 在顺序计算中:
One step at a time, in order. · 一次一步,按顺序。
Parallel and distributed
- Parallel computing 并行计算 uses several processors 处理器 in one machine to run parts of a task at the same time.
- Distributed computing 分布式计算 spreads a task across many separate computers, often in different places, connected by a network.
- Parallel = many processors, one machine. Distributed = many machines.
- Both aim to finish a large task faster.
并行与分布式
- 并行计算(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. · 把每个词与其含义配对。
Parallel is one machine; distributed is many machines. · 并行是一台机器;分布式是许多机器。
Speedup and its limit
- The benefit of parallel computing is measured by speedup 加速比:
- $\text{speedup} = \dfrac{\text{time using one processor}}{\text{time using several processors}}$.
- But any part that must run sequentially cannot be sped up by adding processors.
- So the sequential portion sets a floor — a hard cap on the total speedup.
加速比及其极限
- 并行计算的好处用加速比(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? · 一个任务在一个处理器上用 100 秒,在几个上用 40 秒。加速比是多少?
speedup = 100 / 40 = 2.5×. · 加速比 = 100 / 40 = 2.5×。
If 20 s of a 100 s task must run sequentially, what is the maximum possible speedup? · 如果一个 100 秒任务的 20 秒必须顺序运行,最大可能的加速比是多少?
Even with infinite processors, 20 s remains: 100 / 20 = 5×. · 即使有无限的处理器,20 秒仍在:100 / 20 = 5×。
Why can adding more processors never remove the speedup cap? · 为什么添加更多处理器永远不能移除加速比上限?
The sequential portion sets a floor on the total time. · 顺序部分给总时间设一个下限。
Distributed computing suits huge jobs too big for one machine, like indexing the whole web. · 分布式计算适合对一台机器太大的巨大任务,像索引整个网络。
The work splits naturally across thousands of computers. · 工作自然地分散到成千上万台计算机。
When distributed shines
- Distributed solutions shine on huge jobs — enormous data sets, or a search engine indexing the whole web.
- The work is too big for one machine and splits naturally across thousands.
Speedup with a cap. A 100-second task has 80 s parallel and 20 s sequential. On 4 processors the parallel part is $80 / 4 = 20$ s, plus 20 s sequential = 40 s. Speedup $= 100 / 40 = 2.5\times$. Even with a million processors, the 20 s sequential remains, so speedup can never beat $100 / 20 = 5$.
分布式何时大放异彩
- 分布式方案在巨大的任务上大放异彩——庞大的数据集,或一个索引整个网络的搜索引擎。
- 工作对一台机器太大,自然地分散到成千上万台。
有上限的加速比。 一个 100 秒的任务有 80 秒并行、20 秒顺序。在 4 个处理器上并行部分是 $80 / 4 = 20$ 秒,加 20 秒顺序 = 40 秒。加速比 $= 100 / 40 = 2.5\times$。即使用一百万个处理器,20 秒顺序仍在,所以加速比永远不能超过 $100 / 20 = 5$。
Sequential computing runs one step at a time. Parallel computing uses several processors in one machine at once; distributed computing spreads work across many machines. Parallel gain is measured as speedup (one-processor time ÷ many-processor time), but the sequential part caps it (here, 5×).
顺序计算一次运行一步。并行计算同时用一台机器里的几个处理器;分布式计算把工作分散到许多机器。并行收益用加速比衡量(单处理器时间 ÷ 多处理器时间),但顺序部分给它设上限(这里是 5×)。