Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Lecture 2: CSCI E-1 Spring 2013
Search
Tommy MacWilliam
February 05, 2013
Education
930
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Lecture 2: CSCI E-1 Spring 2013
Caching. CPUs. Hard disk drives. Parallelism. Pipelining. RAM. Registers. Solid-state drives
Tommy MacWilliam
February 05, 2013
More Decks by Tommy MacWilliam
See All by Tommy MacWilliam
Lecture 9: CSCI E-1 Spring 2013
tmacwill
0
370
Lecture 8: CSCI E-1 Spring 2013
tmacwill
0
590
Lecture 6: CSCI E-1 Spring 2013
tmacwill
1
520
Lecture 7: CSCI E-1 Spring 2013
tmacwill
0
720
Lecture 5: CSCI E-1 Spring 2013
tmacwill
1
810
Incorporating Version Control into Programming Courses
tmacwill
1
140
Lecture 4: CSCI E-1 Spring 2013
tmacwill
0
480
Lecture 3: CSCI E-1 Spring 2013
tmacwill
0
580
Lecture 1: CSCI E-1 Spring 2013
tmacwill
0
340
Other Decks in Education
See All in Education
AIってなぁに?
kenichiota0711
0
350
【デザイナー就活講座】 デザイナー就活市場・企業探し・ポートフォリオのポイント
koheihasebe
0
380
子どものためのプログラミング道場『CoderDojo』〜法人提携例〜 / Partnership with CoderDojo Japan
coderdojojapan
PRO
4
19k
Course Review - Lecture 13 - Information Visualisation (4019538FNR)
signer
PRO
1
2.7k
Visionary Initiative: Future Intelligence 「未来の知性と社会の礎を築く」|Science Tokyo(東京科学大学)
sciencetokyo
PRO
0
1.1k
From Days to Minutes: How We Taught an AI to Onboard 50+ Tenants on our AI Features
mfcabrera
0
220
第2部-高校生とAI活用/high-school2026-2
okana2ki
0
110
Visionary Initiative: Future Intelligence — Laying the foundations for the future of science, intelligence, and society | Science Tokyo
sciencetokyo
PRO
0
180
2026年度春学期 統計学 第13回 不確かな測定の不確かさを測る ― 不偏分散とt分布 (2026. 6. 25)
akiraasano
PRO
1
140
焦燥を平穏に変えるエンジニアのための哲学
ichimichi
7
6.3k
Soluciones al examen de Geografía 2026. JULIO (Convocatoria Extraordinaria)
juanmartin2026
1
16k
遊ぶかね欲しさの犯行(ルビ:労働)です
shirayanagiryuji
0
210
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
135
10k
エンジニアに許された特別な時間の終わり
watany
108
250k
Evolving SEO for Evolving Search Engines
ryanjones
0
250
Speed Design
sergeychernyshev
33
2k
Embracing the Ebb and Flow
colly
88
5.1k
Why Our Code Smells
bkeepers
PRO
340
58k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.1k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
We Are The Robots
honzajavorek
0
290
Transcript
Computer Science E-1 Lecture 2: Hardware
From last time...
Pre-requisites
Pre-requisites
Math
Math
None
CPU RAM Hard Drive
CPU
None
None
None
None
Instruction Set
Instruction Set • data: read/write data from RAM
Instruction Set • data: read/write data from RAM • arithmetic:
add two numbers
Instruction Set • data: read/write data from RAM • arithmetic:
add two numbers • control flow: where do we go next?
Pipeline
None
Pipeline • fetch: get the next instruction
Pipeline • fetch: get the next instruction • decode: determine
which instruction was fetched
Pipeline • fetch: get the next instruction • decode: determine
which instruction was fetched • execute: run the instruction
Pipeline • fetch: get the next instruction • decode: determine
which instruction was fetched • execute: run the instruction • writeback: store the result (if necessary)
Fetch 0000001001010011
Decode 0000001001010011 Add 5 3
Decode Add 5 + 3
Execute 5 + 3 = 8
Writeback
None
Parallelism
None
None
Superscalar
Multi-core
Counting Candy
1. Start with a total of 0 2. For each
piece in the pile, add 1 to total 3. Remember that piece was counted
1. Find 4 friends 2. Divide candy among friends 3.
Friends count at same time
Four times as fast!
Four times as fast!
1. Find 4 friends 2. Divide candy among friends 3.
Friends count at same time 4. Add up friends’ totals
More friends!
Not faster :(
1. Pair up, add totals together 2. One friend goes
home, other remembers total 3. Repeat until counted
Much faster!
CPU Performance
None
“Megahertz Myth”
http://www.youtube.com/watch? v=PKF9GOE2q38
CPU RAM Hard Drive
Memory
Byte B 8 bits Kilobyte KB 1000 bytes Megabyte MB
1000000 bytes (1000 KB) Gigabyte GB 1000000000 bytes (1000 MB) Terabyte TB 1000000000000 bytes (1000 GB)
Byte B Kilobyte KB Megabyte MB Gigabyte GB Terabyte TB
Byte B Character of text Kilobyte KB Megabyte MB Gigabyte
GB Terabyte TB
Byte B Character of text Kilobyte KB Word document Megabyte
MB Gigabyte GB Terabyte TB
Byte B Character of text Kilobyte KB Word document Megabyte
MB MP3 song Gigabyte GB Terabyte TB
Byte B Character of text Kilobyte KB Word document Megabyte
MB MP3 song Gigabyte GB Movie Terabyte TB
Byte B Character of text Kilobyte KB Word document Megabyte
MB MP3 song Gigabyte GB Movie Terabyte TB 250,000 songs
Registers
RAM
None
None
None
None
00000000000000000000010100111001 101 102 103 104
Big-Endian
00111001000001010000000000000000 104 103 102 101
Little-Endian
Cache
None
CPU RAM Hard Drive
Hard Disk Drive
None
None
None
http://www.youtube.com/watch? v=kdmLvl1n82U
Filesystems
HDD Performance • seek time: position platters and read-write head
• data rate: transfer data to motherboard
None
Solid State Drive
None
http://www.youtube.com/watch? v=j84eEjP-RL4
Flash Memory
Virtual Memory
None
None
Capacity
L1 cache 64 kilobytes L2 cache 8 megabytes 1 MB
from RAM 4 gigabytes 1 MB from SSD 256 gigabytes 1 MB from HDD 1 terabyte
Performance
L1 cache 0.5 nanoseconds L2 cache 7 nanoseconds 1 MB
from RAM 0.25 milliseconds 1 MB from SSD 1 millisecond 1 MB from HDD 20 milliseconds
L1 cache 0.5 nanoseconds blink of an eye L2 cache
7 nanoseconds 1 MB from RAM 0.25 milliseconds 1 MB from SSD 1 millisecond 1 MB from HDD 20 milliseconds
L1 cache 0.5 nanoseconds blink of an eye L2 cache
7 nanoseconds 4 seconds 1 MB from RAM 0.25 milliseconds 1 MB from SSD 1 millisecond 1 MB from HDD 20 milliseconds
L1 cache 0.5 nanoseconds blink of an eye L2 cache
7 nanoseconds 4 seconds 1 MB from RAM 0.25 milliseconds 2 days 1 MB from SSD 1 millisecond 1 MB from HDD 20 milliseconds
L1 cache 0.5 nanoseconds blink of an eye L2 cache
7 nanoseconds 4 seconds 1 MB from RAM 0.25 milliseconds 2 days 1 MB from SSD 1 millisecond 1 week 1 MB from HDD 20 milliseconds
L1 cache 0.5 nanoseconds blink of an eye L2 cache
7 nanoseconds 4 seconds 1 MB from RAM 0.25 milliseconds 2 days 1 MB from SSD 1 millisecond 1 week 1 MB from HDD 20 milliseconds 4.5 months
Shopping!
Factors to Consider • display • weight • resolution •
CPU cores • CPU cache size • RAM size • storage capacity • HDD / SSD • peripherals • keyboard
Summary
CPU • instruction set • pipeline • parallelism • superscalar
• multi-core • clock speed • Moore’s Law • Megahertz Myth
Memory • byte, kilobyte, megabyte • registers • RAM •
addressing • big-endian, little-endian • caching • L1 cache, L2 cache, L3 cache • hard disk drive • platters, tracks, sectors • read-write heads • file allocation table • seek time, data rate • solid state drive • flash memory
Computer Science E-1 Lecture 2: Hardware