How computer memory works - Kanawat Senanan

3,491,851 views ・ 2016-05-10

TED-Ed


请双击下面的英文字幕来播放视频。

翻译人员: Sophie Anderson 校对人员: Wu Di
00:06
In many ways, our memories make us who we are,
0
6879
3151
在许多方面来说,记忆决定了我们是什么样的人
00:10
helping us remember our past,
1
10030
2029
让我们不忘往事
00:12
learn and retain skills,
2
12059
1930
学习并记住新本领
00:13
and plan for the future.
3
13989
2284
以及为未来做规划
00:16
And for the computers that often act as extensions of ourselves,
4
16273
3643
像计算机常常扮演人的延伸这一角色
00:19
memory plays much the same role,
5
19916
2210
内存也起着同样的作用
00:22
whether it's a two-hour movie,
6
22126
1585
不论是一部两个小时的电影
00:23
a two-word text file,
7
23711
1572
写着两个单词的文本
00:25
or the instructions for opening either,
8
25283
2550
或是执行把两者都打开的指令
00:27
everything in a computer's memory takes the form of basic units called bits,
9
27833
5539
所有在计算机内存里的东西 都采以基本单位“比特”的这一形式出现
00:33
or binary digits.
10
33372
2474
我们也称之为二进制数字
00:35
Each of these is stored in a memory cell
11
35846
2541
每个二进制数被存放于存储元件中
00:38
that can switch between two states for two possible values,
12
38387
3798
在两种可能值间自如转换
00:42
0 and 1.
13
42185
1872
0和1
00:44
Files and programs consist of millions of these bits,
14
44057
3120
由数百万计的二进制数组成的程序和文件
00:47
all processed in the central processing unit,
15
47177
3251
在中央处理器中统一处理
00:50
or CPU,
16
50428
1318
也就是CPU
00:51
that acts as the computer's brain.
17
51746
2350
它担任计算机大脑一职
并且,随着要处理的二进制数成倍增长
00:54
And as the number of bits needing to be processed grows exponentially,
18
54096
4575
00:58
computer designers face a constant struggle
19
58671
2861
电脑设计师不断面临着
01:01
between size, cost, and speed.
20
61532
3763
有关数据大小、成本费用和处理速度三方面的难题
01:05
Like us, computers have short-term memory for immediate tasks,
21
65295
4831
和我们一样,电脑对于即时任务 有着短期记忆
01:10
and long-term memory for more permanent storage.
22
70126
3281
也有更为长久的固定储存器来保留长期记忆
01:13
When you run a program,
23
73407
1870
当你运行某个程序时
01:15
your operating system allocates area within the short-term memory
24
75277
3673
操作系统位于短期记忆的区域内
01:18
for performing those instructions.
25
78950
1895
以便践行指令
01:20
For example, when you press a key in a word processor,
26
80845
3547
打比方说,当你在文字处理软件中 按下一个键
01:24
the CPU will access one of these locations to retrieve bits of data.
27
84392
5144
中央处理器会访问其中一个位置 来检索这些数据
01:29
It could also modify them, or create new ones.
28
89536
4325
它也可以进行修改 或是产生新的数据
01:33
The time this takes is known as the memory's latency.
29
93861
4397
这个过程所花费的时间被称为延时
01:38
And because program instructions must be processed quickly and continuously,
30
98258
5543
由于程序指令必须处理迅速并且不断进行
01:43
all locations within the short-term memory can be accessed in any order,
31
103801
4762
短期记忆区的所有定位点以任意顺序被访问
01:48
hence the name random access memory.
32
108563
3151
因此又名随机访问存储器
01:51
The most common type of RAM is dynamic RAM, or DRAM.
33
111714
4186
最常见的随机储存器是动态随机存储器 或者说DRAM
01:55
There, each memory cell consists of a tiny transistor and a capacitor
34
115900
5089
在动态储存器中 每个储存单元由微小的晶体管和电容器组成
02:00
that store electrical charges,
35
120989
1998
用以贮存电荷
02:02
a 0 when there's no charge, or a 1 when charged.
36
122987
4568
0代表没有电 有电则是1
02:07
Such memory is called dynamic
37
127555
1612
我们称之为动态记忆的原因是
02:09
because it only holds charges briefly before they leak away,
38
129167
4213
它仅是在电荷耗散前 短暂保留它们
02:13
requiring periodic recharging to retain data.
39
133380
3379
需要定期充电来保留这些数据
02:16
But even its low latency of 100 nanoseconds
40
136759
3247
但即使是100纳秒的低延迟
02:20
is too long for modern CPUs,
41
140006
2645
对于现代CPU来说都算是高延迟了
02:22
so there's also a small, high-speed internal memory cache
42
142651
3912
因此“内部快取记忆体”应运而生
02:26
made from static RAM.
43
146563
1950
也就是静态随机存取存储器
02:28
That's usually made up of six interlocked transistors
44
148513
3209
它通常以六个联结晶状体所构成
02:31
which don't need refreshing.
45
151722
1902
不需要去更新
02:33
SRAM is the fastest memory in a computer system,
46
153624
3155
静态随机存取储存器是计算机系统中最快的存储器
02:36
but also the most expensive,
47
156779
1901
但也是最贵的
02:38
and takes up three times more space than DRAM.
48
158680
3734
也占用了比动态随机存取储存器多三倍的空间
02:42
But RAM and cache can only hold data as long as they're powered.
49
162414
4183
但是RAM和高速缓冲存储器只有充电后才能保存数据
02:46
For data to remain once the device is turned off,
50
166597
3028
为了保留数据 设备一旦关机后
02:49
it must be transferred into a long-term storage device,
51
169625
3380
必须将之转移到长期储存设备中
02:53
which comes in three major types.
52
173005
2286
这样的储存设备主要有三种类型
02:55
In magnetic storage, which is the cheapest,
53
175291
2448
在磁存储器,也就是三者中最便宜的储存设备中
02:57
data is stored as a magnetic pattern on a spinning disc coated with magnetic film.
54
177739
5821
数据以磁性模式 储存于磁膜编码的旋转盘上
03:03
But because the disc must rotate to where the data is located
55
183560
3643
但正因圆盘必须转到数据所位于的地方
03:07
in order to be read,
56
187203
1418
才能让它们被读取
03:08
the latency for such drives is 100,000 times slower than that of DRAM.
57
188621
5889
所以磁储存器的延时比DRAM慢上100,000倍
03:14
On the other hand, optical-based storage like DVD and Blu-ray
58
194510
4116
另一方面,像DVD和蓝牙这样的光储存设备
03:18
also uses spinning discs,
59
198626
1995
同样也使用旋转盘
03:20
but with a reflective coating.
60
200621
2192
只不过多了一层反射涂层
03:22
Bits are encoded as light and dark spots using a dye that can be read by a laser.
61
202813
5216
二进制数字被编译成空白点和黑点 加以涂料方便被激光识别读取
03:28
While optical storage media are cheap and removable,
62
208029
3122
尽管光储存媒体价钱便宜并可摘除
03:31
they have even slower latencies than magnetic storage
63
211151
3727
它们甚至比磁存储器有着更低的延时
03:34
and lower capacity as well.
64
214878
2358
同样也有着更小的容量
03:37
Finally, the newest and fastest types of long-term storage are solid-state drives,
65
217236
5635
末了,固态硬盘 是最新也是最快捷的长期存储器
03:42
like flash sticks.
66
222871
1154
比如闪存存储器
03:44
These have no moving parts,
67
224025
1932
它没有可运转的部件
03:45
instead using floating gate transistors
68
225957
2670
而是使用浮栅晶体管
03:48
that store bits by trapping or removing electrical charges
69
228627
4507
在他人专门设计的内部构件中
03:53
within their specially designed internal structures.
70
233134
3319
以捕获和排除电荷存储二进制数字
03:56
So how reliable are these billions of bits?
71
236453
3286
那么,这数十亿的二进制数字可靠性到底如何
03:59
We tend to think of computer memory as stable and permanent,
72
239739
3724
我们总认为 计算机存储器具有稳定性和永久性
04:03
but it actually degrades fairly quickly.
73
243463
2900
但实际上它降解得相当快
04:06
The heat generated from a device and its environment
74
246363
2637
由装置和周身环境所产生的热
04:09
will eventually demagnetize hard drives,
75
249000
2739
会使硬盘去磁
04:11
degrade the dye in optical media,
76
251739
2252
降解光学媒体内的染料
04:13
and cause charge leakage in floating gates.
77
253991
3124
并造成浮置栅极里的电荷流失
04:17
Solid-state drives also have an additional weakness.
78
257115
2966
固态硬盘也有额外的缺陷
04:20
Repeatedly writing to floating gate transistors corrodes them,
79
260081
4014
在不断重复存盘到浮栅中的过程中 晶体管会腐蚀固态硬盘
04:24
eventually rendering them useless.
80
264095
2610
使之毫无用处
04:26
With data on most current storage media
81
266705
2510
当今大多存储媒体内的数据
04:29
having less than a ten-year life expectancy,
82
269215
2743
寿命预测也不超过10年
04:31
scientists are working to exploit the physical properties of materials
83
271958
4375
科学家们正在尝试开拓材料的物理性能
04:36
down to the quantum level
84
276333
2316
将它们下至量子水平
04:38
in the hopes of making memory devices faster,
85
278649
2349
希望能因此制造出更快
04:40
smaller,
86
280998
1065
更小
以及更耐久的设备
04:42
and more durable.
87
282063
1546
04:43
For now, immortality remains out of reach, for humans and computers alike.
88
283609
5436
眼下,不朽仍无法实现 不论对于人类还是电脑而言
关于本网站

这个网站将向你介绍对学习英语有用的YouTube视频。你将看到来自世界各地的一流教师教授的英语课程。双击每个视频页面上显示的英文字幕,即可从那里播放视频。字幕会随着视频的播放而同步滚动。如果你有任何意见或要求,请使用此联系表与我们联系。

https://forms.gle/WvT1wiN1qDtmnspy7