Beruflich Dokumente
Kultur Dokumente
CPS104 Lec32.1
GK Spring 2004
Admin.
Homework -7: is posted, Deadline extended, Due: next Friday, April 9th.
CPS104 Lec32.2
GK Spring 2004
Input / Output
CPS104 Lec32.3
GK Spring 2004
Processor
Cache
Memory - I/O Bus Main Memory I/O Controller Disk Disk I/O Controller Graphics I/O Controller Network Spring 2004 GK
CPS104 Lec32.4
CPS104 Lec32.5
GK Spring 2004
Today: Processing Power Doubles Every 18 months Today: Memory Size Doubles Every 18 months(?) Today: Disk Capacity Doubles Every 12-18 months The I/O The I/O GAP GAP
Magnetic Disks Magnetic Tapes CD ROM Juke Box (automated tape library, robots)
CPS104 Lec32.7
GK Spring 2004
Magnetic Disks
Long term nonvolatile storage Another slower, less expensive level of memory hierarchy
Track Arm Cylinder Head Platter Sector
CPS104 Lec32.8
GK Spring 2004
Platters Track
Typical numbers (depending on the disk size): u 500 to 2,000 tracks per surface u 32 to 128 sectors per track
Sector
Traditionally all tracks have the same number of sectors: u Constant bit density: record more sectors on the outer tracks u Recently relaxed: constant bit size, speed varies with track location
CPS104 Lec32.9
GK Spring 2004
Track Sector
Cylinder: all the tacks under the head Cylinder at a given point on all surface Platter Read/write data is a three-stage process: Head u Seek time: position the arm over the proper track u Rotational latency: wait for the desired sector to rotate under the read/write head u Transfer time: transfer a block of bits (sector) under the read-write head Average seek time as reported by the industry: u Typically in the range of 8 ms to 12 ms u (Sum of the time for all possible seek) / (total # of possible seeks) Due to locality of disk reference, actual average seek time may: u Only be 25% to 33% of the advertised number
CPS104 Lec32.10
GK Spring 2004
Rotational Latency: u Most disks rotate at 3,600 to 10000 RPM u Approximately 16 ms to 3.5 ms per revolution, respectively Head u An average latency to the desired information is halfway around the disk: 8 ms at 3600 RPM, 4 ms at 7200 RPM Transfer Time is a function of : u Transfer size (usually a sector): 1 KB / sector u Rotation speed: 3600 RPM to 7200 RPM u Recording density: bits per inch on a track u Diameter typical diameter ranges from 2.5 to 5.25 in u Typical values: 2 to 12 MB per second
Cylinder Platter
CPS104 Lec32.11
GK Spring 2004
Disk Access
Access time =
Seek time u move arm over track u average is confusing (startup, slowdown, locality of accesses) Rotational latency u wait for sector to rotate under head u average = 0.5/(3600 RPM) = 8.3ms Transfer Time u f(size, BW bytes/sec)
CPS104 Lec32.12
GK Spring 2004
Disk Parameters: u Transfer size is 8K bytes u Advertised average seek is 12 ms u Disk spins at 7200 RPM u Transfer rate is 4 MB/sec Controller overhead is 2 ms Assume that disk is idle so no queuing delay What is Average Disk Access Time for a Sector? u Ave seek + ave rot delay + transfer time + controller overhead u 12 ms + 0.5/(7200 RPM/60) + 8 KB/4 MB/s + 2 ms u 12 + 4.15 + 2 + 2 = 20 ms Advertised seek time assumes no locality: typically 1/4 to 1/3 advertised seek time: 20 ms => 12 ms
GK Spring 2004
CPS104 Lec32.13
DRAM as Disk
Solid state disk, Expanded Storage, NVRAM Disk is slow, DRAM is fast => replace Disk with battery backed DRAM BUT, Disk is cheap, much cheaper than DRAM Network Memory u fast networks (e.g., Myrinet) u use DRAM of other workstations as backing store u Trapeze/GMS project here
CPS104 Lec32.14
GK Spring 2004
R-DAT Technology
2000 RPM
Helical Recording Scheme Four Head Recording Tracks Recorded 20 w/o guard band Read After Write Verify
CPS104 Lec32.15
GK Spring 2004
CPS104 Lec32.16
GK Spring 2004
Storage costs
Media Disk Tape CDR Flash EPROM Paper Capacity
80-300GB 2-300GB
750MB
256-1000MB
10KB
Digital storage cost has a profound effect on the way we store and access Information!
Digital storage (and the Web) opens-up new exciting possibilities for access to information culture & knowledge. Digital storage introduces whole new set of problems to long term information storage.
CPS104 Lec32.17
GK Spring 2004
Robot Time 10 - 20 s
CPS104 Lec32.18
CPS104 Lec32.19
GK Spring 2004
Output
A bus is a shared communication link It uses one set of wires to connect multiple subsystems
CPS104 Lec32.20
GK Spring 2004
Advantages of Buses
Processor
I/O Device
I/O Device
I/O Device
Memory
Versatility: u New devices can be added easily u Peripherals can be moved between computer systems that use the same bus standard Low Cost: u A single set of wires is shared in multiple ways
GK Spring 2004
CPS104 Lec32.21
Disadvantages of Buses
Processor
I/O Device
I/O Device
I/O Device
Memory
The bus creates a communication bottleneck u Bus bandwidth can limit the maximum I/O throughput The maximum bus speed is largely limited by: u The length of the bus u The number of devices on the bus u The need to support a range of devices with:
Widely varying latencies Widely varying data transfer rates Lec32.22
GK Spring 2004
CPS104
Control lines: u Signal requests and acknowledgments u Indicate what type of information is on the data lines Data lines carry information between the source and the destination: u Data and Addresses u Complex commands
CPS104 Lec32.23
GK Spring 2004
A bus transaction includes two parts: u Sending the address u Receiving or sending the data Master is the one who starts the bus transaction by: u Sending the address Slave is the one who responds to the address by: u Sending data to the master if the master ask for data u Receiving data from the master if the master wants to send data
GK Spring 2004
CPS104 Lec32.24
Output Operation
Output is defined as the Processor sending data to the I/O device: Step 1: Request Memory
Processor I/O Device (Disk) Step 2: Read Memory Processor I/O Device (Disk)
Memory
Control (Device Write Request) Data (I/O Device Address and then Data) Memory
GK Spring 2004
Input Operation
Input is defined as the Processor receiving data from the I/O device:
Control (I/O Read Request) Data (I/O Device Address and then Data) Memory
CPS104 Lec32.26
GK Spring 2004
Types of Buses
Processor-Memory Bus (design specific) u Short and high speed u Only need to match the memory system
Connects directly to the processor External I/O Bus (industry standard) u Usually is lengthy and slower u Need to match a wide range of I/O devices u Connects to the processor-memory bus or backplane bus Backplane Bus (industry standard) u Backplane: an interconnection structure within the chassis u Allow processors, memory, and I/O devices to coexist u Cost advantage: one single bus for all components Bit-Serial Buses (New trend: SBI, Firewire .. ) u Use High speed unidirectional point-to-point communication u Use differential signaling u Use Distributed control
GK Spring 2004
CPS104 Lec32.27
I/O Devices
A single bus (the backplane bus) is used for: u Processor to memory communication u Communication between I/O devices and memory Advantages: Simple and low cost Disadvantages: slow and the bus can become a major bottleneck Example: IBM PC
CPS104 Lec32.28
GK Spring 2004
A Two-Bus System
Processor Memory Bus Processor Bus Adaptor I/O Bus Bus Adaptor I/O Bus Bus Adaptor I/O Bus Memory
I/O buses tap into the processor-memory bus via bus adaptors: u Processor-memory bus: mainly for processor-memory traffic u I/O buses: provide expansion slots for I/O devices Example: Apple Macintosh-II u NuBus: Processor, memory, and a few selected I/O devices GK Spring 2004 CPS104 Lec32.29 u SCCI Bus: the rest of the I/O devices
A Three-Bus System
Processor Memory Bus Processor Bus Adaptor Bus Adaptor Backplane Bus Bus Adaptor I/O Bus I/O Bus Memory
A small number of backplane buses tap into the processormemory bus u Processor-memory bus is used for processor memory traffic u I/O buses are connected to the backplane bus Advantage: loading on the processor bus is greatly reduced
GK Spring 2004
CPS104 Lec32.30
Synchronous Bus: u Includes a clock in the control lines u A fixed protocol for communication that is relative to the clock u Advantage: involves very little logic and can run very fast u Disadvantages:
Every device on the bus must run at the same clock rate To avoid clock skew, bus must be short if it is fast.
Asynchronous Bus: u It is not clocked u It can accommodate a wide range of devices u It can be lengthened without worrying about clock skew u It requires a handshaking protocol
GK Spring 2004
CPS104 Lec32.31
A Handshaking Protocol
ReadReq Data Ack
4 1 2 2 3
Address
4
Data
6 5 6 7
DataRdy
DataRdy: indicate the data word is now ready on the data lines
Data is put on the data lines at the same time
CPS104 Lec32.32
Separate versus multiplexed address and data lines: u Address and data can be transmitted in one bus cycle if separate address and data lines are available u Cost: (a) more bus lines, (b) increased complexity Data bus width: u By increasing the width of the data bus, transfers of multiple words require fewer bus cycles u Example: SPARCstation 20s memory bus is 128 bit wide u Cost: more bus lines Block transfers: u Allow the bus to transfer multiple words in back-to-back bus cycles u Only one address needs to be sent at the beginning u The bus is not released until the last word is transferred u Cost: (a) increased complexity (b) decreased response time for request
GK Spring 2004
CPS104 Lec32.33
One of the most important issues in bus design: u How is the bus reserved by a devices that wishes to use it? Chaos is avoided by a master-slave arrangement: u Only the bus master can control access to the bus:
It initiates and controls all bus requests
A slave responds to read and write requests The simplest system: u Processor is the only bus master u All bus requests must be controlled by the processor u Major drawback: the processor is involved in every transaction
u
GK Spring 2004
CPS104 Lec32.34
A bus master wanting to use the bus asserts the bus request A bus master cannot use the bus until its request is granted A bus master must signal to the arbiter after finish using the bus Bus priority: the highest priority device should be serviced first Fairness: Even the lowest priority device should never be completely locked out from the bus Distributed arbitration by self-selection: each device wanting the bus places a code indicating its identity on the bus. Distributed arbitration by collision detection: Ethernet uses this. Daisy chain arbitration: single device with all request lines. Centralized, parallel arbitration: see next-next slide
GK Spring 2004
u u u
CPS104 Lec32.35
Arbitration Circuit
Release
Master A
Master B
Master C
CPS104 Lec32.36
GK Spring 2004
Device 2
Advantage: simple Disadvantages: u Cannot assure fairness: A low-priority device may be locked out indefinitely u The use of the daisy chain grant signal also limits the bus speed
GK Spring 2004
CPS104 Lec32.37