UCB CS61C: Machine Structures: Motivation For Input/Output
UCB CS61C: Machine Structures: Motivation For Input/Output
UCB CS61C: Machine Structures: Motivation For Input/Output
edu/~cs61c
UCB CS61C : Machine Structures
Lecture 35 – Input / Output
2010-04-21
www.chrisharrison.net/projects/skinput/
CS61C L35 Input / Output (3) Garcia, Spring 2008 © UCB CS61C L35 Input / Output (4) Garcia, Spring 2008 © UCB
I/O Device Examples and Speeds Instruction Set Architecture for I/O
I/O Speed: bytes transferred per second What must the processor do for I/O?
(from mouse to Gigabit LAN: 7 orders of mag!) Input: reads a sequence of bytes
Output: writes a sequence of bytes
Device Behavior Partner Data Rate (KB/s)
Some processors have special input and
Keyboard Input Human 0.01
Mouse Input Human 0.02
output instructions
Voice output Output Human 5.00 Alternative model (used by MIPS):
Floppy disk Storage Machine 50.00 Use loads for input, stores for output address!
Laser Printer Output Human 100.00 Called “Memory Mapped Input/Output” 0xFFFFFFFF!
Magnetic Disk Storage Machine 10,000.00
A portion of the address space 0xFFFF0000!
Wireless Network I or O Machine 10,000.00
dedicated to communication paths
Graphics Display Output Human 30,000.00
to I/O devices (no mem there) cntrl reg.!
Wired LAN Network I or O Machine 125,000.00 data reg.!
Instead, they correspond to registers 0!
When discussing transfer rates, use 10x in I/O devices
CS61C L35 Input / Output (5) Garcia, Spring 2008 © UCB CS61C L35 Input / Output (6) Garcia, Spring 2008 © UCB
Processor-I/O Speed Mismatch Processor Checks Status before Acting
1GHz microprocessor can execute 1 billion Path to device generally has 2 registers:
load or store instructions per second, or Control Register, says it’s OK to read/write
4,000,000 KB/s data rate (I/O ready) [think of a flagman on a road]
Data Register, contains data
I/O devices data rates range from 0.01 KB/s to
125,000 KB/s Processor reads from Control Register in loop,
spins while waiting for device to set Ready bit in
Input: device may not be ready to send data
Control reg (0 ⇒ 1) to say its OK
as fast as the processor loads it
Processor then loads from (input) or writes to
Also, might be waiting for human to act
(output) data register
Output: device not be ready to accept data Load from or Store into Data Register resets Ready bit (1
as fast as processor stores it ⇒ 0) of Control Register
What to do? This is called “Polling”
CS61C L35 Input / Output (7) Garcia, Spring 2008 © UCB CS61C L35 Input / Output (8) Garcia, Spring 2008 © UCB
CS61C L35 Input / Output (9) Garcia, Spring 2008 © UCB CS61C L35 Input / Output (10) Garcia, Spring 2008 © UCB
#16
Finals Week Final Exam
8-11am in
Review Sun Hearst Gym
May 9 3-6pm
10 Evans
www.computerhistory.org/internet_history
The Internet (1962) Why Networks?
Founders Originally sharing I/O devices between
JCR Licklider, as head of ARPA,
writes on “intergalactic network”
computers
1963 : ASCII becomes first E.g., printers
universal computer standard
1969 : Defense Advanced
Then communicating between computers
Research Projects Agency “Lick” E.g., file transfer protocol
(DARPA) deploys 4 “nodes” @
UCLA, SRI, Utah, & UCSB Then communicating between people
1973 Robert Kahn & Vint Cerf E.g., e-mail
invent TCP, now part of the
Internet Protocol Suite Then communicating between networks of
Internet growth rates Revolutions like this don't computers
Vint Cerf come along very often
Exponential since start! E.g., file sharing, www, …
www.greatachievements.org/?id=3736
en.wikipedia.org/wiki/Internet_Protocol_Suite
CS61C L35 Input / Output (16) Garcia, Spring 2008 © UCB
!!
en.wikipedia.org/wiki/History_of_the_World_Wide_Web
The World Wide Web (1989) Shared vs. Switched Based Networks
“System of interlinked
!
Shared
hypertext documents on Shared vs. Switched:
the Internet” Node! Node! Node
Switched: pairs (“point-to-
History point” connections)
1945: Vannevar Bush communicate at same time
describes hypertext system World’s First web Node!
called “memex” in article Tim Berners-Lee server in 1990 Shared: 1 at a time (CSMA/CD) Crossbar"
1989: Tim Berners-Lee Aggregate bandwidth (BW) Switch
proposes, gets system up ’90
in switched network is
~2000 Dot-com entrepreneurs Node!
rushed in, 2001 bubble burst many times shared: Node!
www.archive.org
Wayback Machine point-to-point faster since no
Snapshots of web over time arbitration, simpler interface
Today : Access anywhere! Node!
switch!
network!
interface!
• ability to name the components and to route
packets of information - messages - from a
source to a destination"
Magnetic Disk – common I/O device Photo of Disk Head, Arm, Actuator
A kind of computer memory
Information stored by magnetizing ferrite material on surface of
rotating disk Arm! Spindle!
similar to tape recorder except digital rather than analog data
Nonvolatile storage
Head!
retains its value without applying power to disk.
Two Types
Floppy disks – slower, less dense, removable.
Hard Disk Drives (HDD) – faster, more dense, non-removable.
Actuator! { Platters (1-12)!
Purpose in computer systems (Hard Drive):
Long-term, inexpensive storage for files
“Backup” for main-memory. Large, inexpensive, slow level in the
memory hierarchy (virtual memory)
CS61C L35 Input / Output (21) Garcia, Spring 2008 © UCB CS61C L35 Input / Output (22) Garcia, Spring 2008 © UCB
Platter Actuator
Actuator
en.wikipedia.org/wiki/Ipod www.apple.com/ipod
What does Apple put in its iPods? RAID : Redundant Array of Inexpensive Disks
Toshiba flash Samsung flash Toshiba 1.8-inch HDD Toshiba flash
1, 2GB 4, 8GB 80, 160GB 8, 16, 32GB
Invented @ Berkeley (1989)
A multi-billion industry
80% non-PC disks sold in RAIDs
Idea:
Files are “striped” across multiple disks
Redundancy yields high data availability
Disks will still fail
Contents reconstructed from data
redundantly stored in the array
⇒ Capacity penalty to store redundant info
⇒ Bandwidth penalty to update redundant info
shuffle, nano, classic, touch
CS61C L35 Input / Output (27) Garcia, Spring 2008 © UCB CS61C L35 Input / Output (28) Garcia, Spring 2008 © UCB
CS61C L35 Input / Output (29) Garcia, Spring 2008 © UCB CS61C L35 Input / Output (30) Garcia, Spring 2008 © UCB