[Narrator] I want to give you a better idea what these actually look like,
and my wife was kind enough to let me take some parts out of her computer.
Actually, she took them out of the computer so I could show you what they look like.
This is DRAM; this is 2 GB of DRAM,
and what a gigabyte means is approximately a billion bytes.
What it actually means I'll show you in the Python interpreter.
In Python we can do exponentiation by using a star star.
This is what we would write mathematically as 2 to the power 10.
So 2 to the power 10 is 1024.
This is called the kilobyte; we use the prefixes like the thousand prefixes,
but the actual values in computing are usually powers of 2 instead.
They're a little bit different than 1000.
It's actually 1024 when we talk about a kilobyte,
and a megabyte is 1024 KB.
That's equivalent to 2 to the power 20.
A megabyte is just over a million bytes.
A gigabyte is 2 to the power of 30,
which is just over a billion bytes,
and a terabyte is 2 to the power of 40,
which is just over a trillion bytes.
These are the main units we're going to talk about when we think about memory.
Here we have 2 GB of memory, so that means we have
2 to the 30 that would be 1 GB.
We have 2 to the 30 times 2, which is 2 GB times 8,
which is the number of bits in a byte, and 1 bit is the equivalent to a light switch.
It can be in 1 of 2 states, so with 1 byte we have the equivalent of 8 light switches.
This is comparable to having 17 billion light switches.
The kind of memory that we have here is actually DRAM,
so it's really more like having 17 billion buckets,
and that means when you turn your computer off
everything that's stored in the DRAM is lost.
To keep the memory here, it's like a bucket,
but instead of storing water it's storing electrons.
It's a capacitor and when the power goes off that memory is lost.
There are many different types of memory inside your computer.
I mentioned registers briefly, that's the fastest memory
that is built right into the processor.
The main things that matter that distinguish the memory that you have
is the latency which is the time it takes to get a response.
So the latency you can think of as the time to retrieve a value from memory.
We'll talk about latency more next class in terms of what that means in networks,
which is really the same thing.
For this DRAM the latency is about 12 nanoseconds,
and as a reminder, a nanosecond is 1 billionth of a second.
The other thing that really distinguishes memory,
and the reason we have so many different types of it,
is the cost.
The cost varies depending on mostly the latency and the amount of memory you can store.
The cost for this memory, if you bought it today, is about $10 for 2 GB.
That's 10 US dollars, about 7 Euros.
Voglio darvi un'idea più precisa di come questo avviene,
mia moglie è stata così gentile da farmi togliere alcune parti del suo computer.
Veramente è stata le i a toglierle così da farmi avere la possibilità di farvele vedere.
Questa è una DRMA; questi sono 2 GB di DRAM,
un gigabyte sono approssimativamente un miliardo di byte.
Quello che significa ve lo mostrerò nell'interprete Python.
In Python possiamo calcolare espressioni esponenziali usando la doppia stella (**).
Questo è quello che usiamo se volgiamo scrivere 2 elevato alla 10.
Quindi 2 alla 10 è 1024.
Questo è chiamato kilobyte; usiamo i prefissi come questo per indicare mille,
ma i valori reali nella computazione sono di solito potenze del 2.
E' un po' di diverso da 1000.
E' 1024, un kilobyte,
un megabyte è 1024 KB.
Equivalente a 2 elevato alla 20.
Un megabyte è più di un milione di bytes.
Un gigabyte è 2 elevato alla 30,
più di un miliardo di byte,
ed un terabyte è 2 elevato alla 40,
un milione di milioni di milioni di byte.
Queste sono le principali unità di misura di cui parleremo trattando la memoria di un computer.
Questi sono 2 GB, quindi significa che abbiamo:
2 alla 30 sarebbe 1 GB.
Abbiamo 2 alla 30 per 2 per 8,
che è il numero di bit in un byte, ed un bit è l'equivalente di una lampadina.
Può trovarsi in uno di due stati, quindi con 1 byte abbiamo otto lampadine.
Quindi questo è come avere 17 miliardi di lampadine con interruttore.
Il tipo di memoria che abbiamo qui è una DRAM,
quindi è più come avere 17 miliardi di secchi,
questo significa che quando spegneremo il computer
tutto ciò che c'era qua dentro la DRAM andrà perso.
La memoria si trova qui, come in un secchio,
sotto forma di elettroni, invece che di acqua.
E' un condensatore, e quando non c'è più corrente la memoria va persa.
Ci sono molti tipi diversi di memoria nel computer.
Ho fatto menzione dei registri, che sono la memoria più veloce,
costruiti dentro al processore.
La differenza principale che distingue le memorie presenti nel computer
è la LATENZA, che è il tempo che impieghiamo per ricevere una risposta.
Quindi potete pensare la latenza come il tempo per trovare un valore nella memoria.
Parleremo della latenza nella prossima lezione, e di ciò che implica nelle reti di computer,
che è lo stesso concetto.
Per questa DRAM la latenza è all'incirca 12 nanosecondi,
e per ricordarvelo, un nanosecondo è 1 miliardesimo di secondo.
Un'altra differenza tra memorie,
e la ragione per cui ce ne sono diverse,
è il COSTO.
I costi variano in funzione della latenza e della quantità di memoria immagazzinabile.
Il costo di questa memoria, a comprarla ora, è circa 10$ per 2 GB.
Sarebbe 10 dollari US, circa 7 euro.
実際にどのような感じなのか説明したいと思います
私が妻のコンピュータのパーツを取り出すことを
許可してくれました
実際は妻がコンピュータのパーツを取り出したので
こうしてお見せできます
これがDRAMで2GBです
ギガバイトは約10億バイトのことです
実際にどういうことなのか
Pythonインタプリタでお見せします
Pythonで**を使用して累乗を行います
2の10乗を数学的に書くとこのようになります
つまり2の10乗は1,024です
これはキロバイトで考えると
1,000のプレフィックスを使用します
ですが計算の実際の値では一般的に2乗を使用します
1,000とは少し異なるものです
キロバイトであれば実際は1,024になります
メガバイトは1,024KBです
これは2の20乗と等しくなります
メガバイトは単に100万バイト以上ということです
ギガバイトは2の30乗です
これは10億バイト以上ということです
テラバイトは2の40乗で
これは1兆バイト以上になります
これらがメモリの主要な構成単位になります
ここに2GBのメモリがあります
つまり2の30乗のメモリで
これは1GBになるということです
2の30乗の2倍あります これは2GBの8倍です
またビット数をバイトにしたものです
1ビットは電気のスイッチに相当します
2つの状態のどちらか1つになり
1バイトで8つの電気スイッチに相当します
これは170億の電気スイッチを持っているのと同じです
ここにあるメモリのようなものはDRAMです
むしろ170億のバケツを持っているようなものです
コンピュータの電源を切ったらDRAMに保存されている
すべてのものを失うことになります
ここにメモリを保持するために
DRAMはバケツのようになっています
水を保存する代わりに電子を保存します
それがコンデンサです
電源がなくなるとメモリは失われます
コンピュータ内には様々な種類のメモリがあります
レジスタを簡単に説明しました これは最速メモリで
プロセッサに組み込まれています
メモリを識別する主要なものがレイテンシです
これは反応が返ってくるまでの時間を意味します
レイテンシをメモリから値を読み出す時間と
考えることができます
ネットワークにおけるレイテンシの意味について
次のコースでさらに詳しく解説します
ネットワークにおいても
レイテンシの意味はほとんど同じです
このDRAMのレイテンシは約12ナノ秒です
ちなみにナノ秒は10億分の1秒になります
メモリを識別するものが
様々なタイプに分かれている理由がコストです
保存できるメモリ量とレイテンシによって
コストは変わってきます
このメモリのコストは今日購入したとしたら
2GBに対して約10ドルです
10米ドルで約7ユーロになります
Eu quero dar a você uma idéia mais clara de como isso funciona,
e minha esposa foi gentil em me deixar pegar algumas partes do computador dela para explicar isso.
De fato, ela as tirou do computador, para que eu pudesse mostrar como elas são.
Isto é uma DRAM -- uma DRAM de 2 GB,
e o que significa um gigabyte é aproximadamente 1 bilhão de bytes.
O que isso realmente significa eu vou mostrar a você no interpretador Python.
Em Python, podemos fazer exponenciação usando o operador **.
É assim que escrevemos 2 elevado à potência 10.
Então, 2**10 é 1024.
Isso é chamdo de kilobyte (KB) -- usamos prefixos, como o prefixo para 1000,
mas os valores usados em computação são usualmente potências de 2.
Eles podem ser ligeiramente diferente de 1000 --
de fato, o valor de 1 kilobyte é 1024 bytes,
e 1 megabyte é 1024 KB --
isso é equivalente a 2**20.
Um mega byte é mais do que 1 milhão de bytes.
Um gigabyte é 2**30,
que é mais do que 1 bilhão de bytes,
e 1 terabyte é 2**40,
que é mais do que 1 trilhão de bytes.
Estas são as principais unidades que vamos usar quando pensamos sobre memória.
Aqui, temos 2 GB de memória -- isso significa que temos
2 * (230) -- 230 é 1 GB.
Temos que 2*30 2 é 2 GB, o que multiplicamos por 8,
que é o número de bits em um byte, sendo 1 bit equivalente a um interruptor de luz --
que pode estar em 1 de 2 estados -- de modo que com 1 byte temos o equivalente a 8 interruptores de luz.
Isso é comparável a 17 bilhões de interruptores de luz.
O tipo de memória que temos aqui é, de fato, uma DRAM,
o que é, de fato, como ter 17 milhões de reservatórios,
e isso significa que, quando você desliga o seu computador,
tudo o que está armazenado na DRAM é perdido.
Para manter a memória aqui -- que é como um reservatório,
mas ao invés de armazenar água, ele armazena elétrons --
usamos um capacitor; e quando a energia é desligada, os dados são perdidos.
Existem muitos diferentes tipode de memória dentro do seu computador.
Eu mencionei registradores brevemente -- este é o tipo de memória mais rápida,
que é mantida dentro do processador.
São duas as principais coisas que importam e que distinguem os tipo de memória que você tem.
Uma é a latência -- que é o tempo que se gasta para acesso uma resposta, ou seja,
a latência pode ser pensada como o tempo gasto para obter um valor na memória.
Vamos falar mais sobre latência na próxima aula, em termos do que isso significa em redes de computadores,
o que é, de fato, a mesma coisa.
Para esta DRAM, a latência é em torno de 12 nanosegundos --
lembre-se que 1 nanosegundo é 1 bilhonésimo de segundo.
A outra coisa que distingue as memórias,
e a razão pela qual temos tantos tipos de memórias diferentes,
é o custo.
O custo varia dependendo, principalmente, da latência de da quantidade de dados que podem ser armazenados.
O custo desta memória, se você comprá-la hoje, é de mais ou menos 10 dólares por 2 GB --
10 dólares, ou mais ou menos 7 euros.
我想给大家看看DRAM(动态随机存取存储器)是什么样子
我太太很好心 让我拆开了她的电脑
实际上 她自己拆开了电脑 让我给大家看DRAM长得什么样子
这就是DRAM,这是2GB的DRAM
千兆字节(GB)大约是十亿字节
我会在Python解释器中解释其含义
在Python中我们可以使用两个星号来取幂
这就是2的10次方的数学写法
2的10次方是1024
称之为千字节(KB) 我们使用kilo(千)作为前缀
但在计算机使用中 实际值通常都是2的幂
和1000有所区别
说到千字节 实际指得是1024字节
兆字节(MB)是1024个千字节
也就是2的20次幂
兆字节比一百万字节略多
千兆字节(GB)是2的30次幂
比十亿字节略多
兆兆字节(TB)是2的40次幂
比一万亿字节略多
这是我们主要使用的存储单位
如果有2GB的内存
2的30次幂便是1GB(千兆字节)
乘以2 就是2GB 再乘以8
8指的是1个字节当中含有8个比特 1个比特则相当于一个电灯开关
可以是两种状态的任意一种 1个字节就相当于8个电灯开关
所以2GB就相当于170亿个电灯开关
而我们现有的内存其实是DRAM
所以比喻成170亿个水桶更加恰当
意味着一旦关机
所有存在DRAM的数据都会丢失
在这里存储数据 就像在一个水桶里存水
只不过保存的不是水 是电子
这就是个电容器 没电了记忆就丢失了
计算机里有许多不同种类的存储器
我之前提过的Register(寄存器)是最快的存储器
就在处理器内
区分不同内存主要可以看延迟时间
也就是存储器做出反应要多久
比如从存储器当中获取一个值 需要延迟时间
下一节课我们将会详细讨论网络中延迟时间的作用
其实就是一回事
对于这块DRAM来说 延迟时间是12毫微秒
提醒一下 1毫微秒是一秒的十亿分之一
区分不同存储器的另一点
也是内存种类繁多的原因
是成本
成本根据延迟时间和内存大小的不同而有所不同
这块内存现在的价格是2GB10美元
10美元 相当于7欧元
我要讓大家看看 DRAM 長什麼樣子
我太太很好心,讓我從她的電腦拿走了一部分
實際上,她從電腦裡拿出這些,
所以我能讓大家看看 DRAM 長什麼樣子
這就是 DRAM,這是 2 GB 的 DRAM
gigabite(GB)大約是十億個位元組 (bytes)
它的實際意義,我會在 Python 解譯器中解釋
在 Python,我們可以使用兩個星號來取冪 (exponentiation)
這就是 2 的 10 次方的數學寫法
2 的 10 次方是 1024
這稱為 kilobyte (KB),我們使用 kilo 作為 "千" 的字首
但在計算時,實際值通常是 2 的次方
和 1000 有一點不同
當我們說到 kilobyte,實際上指的是 1024
megabyte (MB) 是 1024 個 KB
也就是 2 的 20 次方
megabyte 比一百萬位元組略多
gigabyte(GB)是 2 的 30 次方
比十億位元組略多
terabyte(TB)是 2 的 40 次方
比一萬億位元組略多
這是我們談到記憶體時,所使用的主要單位
這裡有 2GB 的記憶體,也就是說
我們有 2 的 30 次方, 1GB
2 的 30 次方再乘以 2 就是 2 GB,再乘以 8
8 指的是 1 個位元組 (byte) 含有 8 個位元 (bits),
1 個位元則相當於一個電燈開關
可以是兩種狀態的任意一種,
1 個位元組就相當於 8 個電燈開關
所以 2GB 就相當於 170 億個電燈開關
我們這裡的記憶體種類是 DRAM
所以就像是 170 億個水桶
也就是說,一旦你關掉電腦
所有存在 DRAM 的資料都會失去
在這裡儲存資料,就像在水桶儲水
只不過儲存的不是水,而是電子
這就是個電容器,當電力消失,就失去了記憶
電腦裡有許多不同種類的記憶體
我之前提過的暫存器 (register) 是最快的記憶體
它內建於處理器
區分不同的記憶體,主要是延遲時間 (latency)
也就是記憶體需要多久時間才能做出反應
所以你可以想像 latency 就是從記憶體取值的時間
下一堂課我們將會介紹,更多關於 latency 在網路的涵義
實際上是同一件事
DRAM 的 latency 大約為 12 奈秒 (nanoseconds)
提醒一下,1 奈秒 (nanoseconds) 是一秒的十億分之一
另一種可以區分不同的記憶體
以及為何有這麼多種記憶體的原因
就是成本
成本取決於 latency 和能儲存的記憶體數量
這個記憶體,今天去買的話,大概是 2GB 10 美元
10 美元,大概是 7 歐元