How computer memory works - Kanawat Senanan
-
0:07 - 0:10In many ways,
our memories make us who we are, -
0:10 - 0:12helping us remember our past,
-
0:12 - 0:14learn and retain skills,
-
0:14 - 0:16and plan for the future.
-
0:16 - 0:20And for the computers that often act
as extensions of ourselves, -
0:20 - 0:22memory plays much the same role,
-
0:22 - 0:24whether it's a two-hour movie,
-
0:24 - 0:25a two-word text file,
-
0:25 - 0:28or the instructions for opening either,
-
0:28 - 0:33everything in a computer's memory
takes the form of basic units called bits, -
0:33 - 0:36or binary digits.
-
0:36 - 0:38Each of these is stored in a memory cell
-
0:38 - 0:42that can switch between two states
for two possible values, -
0:42 - 0:440 and 1.
-
0:44 - 0:47Files and programs consist of millions
of these bits, -
0:47 - 0:50all processed in
the central processing unit, -
0:50 - 0:52or CPU,
-
0:52 - 0:54that acts as the computer's brain.
-
0:54 - 0:59And as the number of bits needing
to be processed grows exponentially, -
0:59 - 1:02computer designers face
a constant struggle -
1:02 - 1:05between size, cost, and speed.
-
1:05 - 1:10Like us, computers have short-term memory
for immediate tasks, -
1:10 - 1:13and long-term memory
for more permanent storage. -
1:13 - 1:15When you run a program,
-
1:15 - 1:19your operating system allocates area
within the short-term memory -
1:19 - 1:21for performing those instructions.
-
1:21 - 1:24For example, when you press a key
in a word processor, -
1:24 - 1:30the CPU will access one of these locations
to retrieve bits of data. -
1:30 - 1:34It could also modify them,
or create new ones. -
1:34 - 1:38The time this takes is known
as the memory's latency. -
1:38 - 1:44And because program instructions must be
processed quickly and continuously, -
1:44 - 1:49all locations within the short-term memory
can be accessed in any order, -
1:49 - 1:52hence the name random access memory.
-
1:52 - 1:56The most common type of RAM
is dynamic RAM, or DRAM. -
1:56 - 2:01There, each memory cell consists
of a tiny transistor and a capacitor -
2:01 - 2:03that store electrical charges,
-
2:03 - 2:08a 0 when there's no charge,
or a 1 when charged. -
2:08 - 2:09Such memory is called dynamic
-
2:09 - 2:13because it only holds charges briefly
before they leak away, -
2:13 - 2:17requiring periodic recharging
to retain data. -
2:17 - 2:20But even its low latency
of 100 nanoseconds -
2:20 - 2:23is too long for modern CPUs,
-
2:23 - 2:27so there's also a small,
high-speed internal memory cache -
2:27 - 2:29made from static RAM.
-
2:29 - 2:32That's usually made up
of six interlocked transistors -
2:32 - 2:34which don't need refreshing.
-
2:34 - 2:37SRAM is the fastest memory
in a computer system, -
2:37 - 2:39but also the most expensive,
-
2:39 - 2:42and takes up three times
more space than DRAM. -
2:42 - 2:47But RAM and cache can only hold data
as long as they're powered. -
2:47 - 2:50For data to remain
once the device is turned off, -
2:50 - 2:53it must be transferred
into a long-term storage device, -
2:53 - 2:55which comes in three major types.
-
2:55 - 2:58In magnetic storage,
which is the cheapest, -
2:58 - 3:04data is stored as a magnetic pattern on
a spinning disc coded with magnetic film. -
3:04 - 3:07But because the disc must rotate
to where the data is located -
3:07 - 3:09in order to be read,
-
3:09 - 3:15the latency for such drives is 100,000
times slower than that of DRAM. -
3:15 - 3:19On the other hand, optical-based storage
like DVD and Blu-ray -
3:19 - 3:21also uses spinning discs,
-
3:21 - 3:23but with a reflective coating.
-
3:23 - 3:28Bits are encoded as light and dark spots
using a dye that can be read by a laser. -
3:28 - 3:31While optical storage media are cheap
and removable, -
3:31 - 3:35they have even slower latencies
than magnetic storage -
3:35 - 3:37and lower capacity as well.
-
3:37 - 3:43Finally, the newest and fastest types of
long-term storage are solid-state drives, -
3:43 - 3:44like flash sticks.
-
3:44 - 3:46These have no moving parts,
-
3:46 - 3:49instead using floating gate transistors
-
3:49 - 3:53that store bits by trapping
or removing electrical charges -
3:53 - 3:56within their specially designed
internal structures. -
3:56 - 4:00So how reliable
are these billions of bits? -
4:00 - 4:03We tend to think of computer memory
as stable and permanent, -
4:03 - 4:06but it actually degrades fairly quickly.
-
4:06 - 4:09The heat generated from a device
and its environment -
4:09 - 4:12will eventually demagnetize hard drives,
-
4:12 - 4:14degrade the dye in optical media,
-
4:14 - 4:17and cause charge leakage
in floating gates. -
4:17 - 4:20Solid-state drives
also have an additional weakness. -
4:20 - 4:24Repeatedly writing to floating gate
transistors corrodes them, -
4:24 - 4:27eventually rendering them useless.
-
4:27 - 4:29With data on most current storage media
-
4:29 - 4:32having less than
a ten-year life expectancy, -
4:32 - 4:36scientists are working to exploit
the physical properties of materials -
4:36 - 4:39down to the quantum level
-
4:39 - 4:41in the hopes of making
memory devices faster, -
4:41 - 4:42smaller,
-
4:42 - 4:44and more durable.
-
4:44 - 4:49For now, immortality remains out of reach,
for humans and computers alike.
- Title:
- How computer memory works - Kanawat Senanan
- Speaker:
- Kanawat Senanan
- Description:
-
View full lesson: http://ed.ted.com/lessons/how-computer-memory-works-kanawat-senanan
In many ways, our memories make us who we are, helping us remember our past, learn and retain skills, and plan for the future. And for the computers that often act as extensions of ourselves, memory plays much the same role. Kanawat Senanan explains how computer memory works.
Lesson by Kanawat Senanan, animation by TED-Ed.
- Video Language:
- English
- Team:
- closed TED
- Project:
- TED-Ed
- Duration:
- 05:05
Jessica Ruby edited English subtitles for How computer memory works | ||
Jessica Ruby approved English subtitles for How computer memory works | ||
Jessica Ruby edited English subtitles for How computer memory works | ||
Jessica Ruby accepted English subtitles for How computer memory works | ||
Jessica Ruby edited English subtitles for How computer memory works | ||
Jessica Ruby edited English subtitles for How computer memory works | ||
Jennifer Cody edited English subtitles for How computer memory works | ||
Jennifer Cody edited English subtitles for How computer memory works |