cs61c l16 disks © uc regents 1 cs161 lecture 25 - disks laxmi bhuyan bhuyan

25
CS61C L16 D isks © UC R 1 CS161 Lecture 25 - Disks Laxmi Bhuyan http://www.cs.ucr.edu/~bhuyan/

Upload: todd-jobes

Post on 29-Mar-2015

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan bhuyan

CS61C L16 Disks © UC Regents

1

CS161 Lecture 25 - Disks

Laxmi Bhuyan

http://www.cs.ucr.edu/~bhuyan/

Page 2: CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan bhuyan

CS61C L16 Disks © UC Regents

2

Magnetic Disks

°Purpose:• Long-term, nonvolatile, inexpensive storage for files

• Large, inexpensive, slow level in the memory hierarchy (discuss later)

Processor (active)

Computer

Control(“brain”)Datapath(“brawn”)

Memory(passive)(where programs, data live whenrunning)

DevicesInput

Output

Keyboard, Mouse

Display, Printer

Disk,Network

Page 3: CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan bhuyan

CS61C L16 Disks © UC Regents

3

Photo of Disk Head, Arm, Actuator

Actuator

ArmHead

Platters (12)

{Spindle

Page 4: CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan bhuyan

CS61C L16 Disks © UC Regents

4

Disk Device Terminology

° Several platters, with information recorded magnetically on both surfaces (usually)

° Actuator moves head (end of arm,1/surface) over track (“seek”), select surface, wait for sector rotate under head, then read or write

• “Cylinder”: all tracks under heads

° Bits recorded in tracks, which in turn divided into sectors (e.g., 512 Bytes)

Platter

OuterTrack

InnerTrackSector

Actuator

HeadArm

Page 5: CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan bhuyan

CS61C L16 Disks © UC Regents

5

Disk Device Performance

Platter

Arm

Actuator

HeadSectorInnerTrack

OuterTrack

°Disk Latency = Seek Time + Rotation Time + Transfer Time + Controller Overhead

° Seek Time? depends no. tracks move arm, seek speed of disk

° Rotation Time? depends on speed disk rotates, how far sector is from head

° Transfer Time? depends on data rate (bandwidth) of disk (bit density), size of request

ControllerSpindle

Page 6: CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan bhuyan

CS61C L16 Disks © UC Regents

6

Disk Device Performance

°Average distance sector from head?

°1/2 time of a rotation• 7200 Revolutions Per Minute 120 Rev/sec

• 1 revolution = 1/120 sec 8.33 milliseconds

• 1/2 rotation (revolution) 4.16 ms

°Average no. tracks move arm?• Sum all possible seek distances from all possible tracks / # possible

- Assumes average seek distance is random

• Disk industry standard benchmark

Page 7: CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan bhuyan

CS61C L16 Disks © UC Regents

7

Data Rate: Inner vs. Outer Tracks °To keep things simple, orginally kept same number of sectors per track

• Since outer track longer, lower bits per inch

°Competition decided to keep BPI the same for all tracks (“constant bit density”)

More capacity per disk

More of sectors per track towards edge

Since disk spins at constant speed, outer tracks have faster data rate

°Bandwidth outer track 1.7X inner track!

Page 8: CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan bhuyan

CS61C L16 Disks © UC Regents

8

Disk Performance Model /Trends° Capacity

+ 100%/year (2X / 1.0 yrs)

°Transfer rate (BW)+ 40%/year (2X / 2.0 yrs)

°Rotation + Seek time– 8%/ year (1/2 in 10 yrs)

°MB/$> 100%/year (2X / <1.5 yrs)

Fewer chips + areal density

Page 9: CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan bhuyan

CS61C L16 Disks © UC Regents

9

State of the Art: Ultrastar 72ZX• 73.4 GB, 3.5 inch disk

• 2¢/MB

• 10,000 RPM; 3 ms = 1/2 rotation

• 11 platters, 22 surfaces

• 15,110 cylinders

• 7 Gbit/sq. in. areal den

• 17 watts (idle)

• 0.1 ms controller time

• 5.3 ms avg. seek

• 50 to 29 MB/s(internal)source: www.ibm.com; www.pricewatch.com; 2/14/00

Latency = Queuing Time + Controller time +Seek Time + Rotation Time + Size / Bandwidth

per access

per byte{+

Sector

Track

Cylinder

Head PlatterArmTrack Buffer

Page 10: CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan bhuyan

CS61C L16 Disks © UC Regents

10

Disk Performance Example°Calculate time to read 1 sector (512B) for UltraStar 72 using advertised performance; sector is on outer track

Disk latency = average seek time + average rotational delay + transfer time + controller overhead

= 5.3 ms + 0.5 * 1/(10000 RPM) + 0.5 KB / (50 MB/s) + 0.15 ms

= 5.3 ms + 0.5 /(10000 RPM/(60000ms/M))

+ 0.5 KB / (50 KB/ms) + 0.15 ms

= 5.3 + 3.0 + 0.10 + 0.15 ms = 8.55 ms

Page 11: CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan bhuyan

CS61C L16 Disks © UC Regents

11

Areal Density°Bits recorded along a track• Metric is Bits Per Inch (BPI)

°Number of tracks per surface• Metric is Tracks Per Inch (TPI)

°Care about bit density per unit area• Metric is Bits Per Square Inch

• Called Areal Density

• Areal Density = BPI x TPI

Page 12: CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan bhuyan

CS61C L16 Disks © UC Regents

12

Disk History

1989:63 Mbit/sq. in60,000 MBytes

1997:1450 Mbit/sq. in2300 MBytes

source: New York Times, 2/23/98, page C3, “Makers of disk drives crowd even more data into even smaller spaces”

1997:3090 Mbit/sq. in8100 MBytes

Page 13: CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan bhuyan

CS61C L16 Disks © UC Regents

13

Areal DensityYear Areal Density

1973 1.71979 7.71989 631997 30902000 17100

1

10

100

1000

10000

100000

1970 1980 1990 2000

Year

Are

al D

ensity

• Areal Density = BPI x TPI

• Change slope 30%/yr to 60%/yr about 1991

Page 14: CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan bhuyan

CS61C L16 Disks © UC Regents

14

1 inch disk drive!°2000 IBM MicroDrive:

• 1.7” x 1.4” x 0.2”

• 1 GB, 3600 RPM, 5 MB/s, 15 ms seek

• Digital camera, PalmPC?

°2006 MicroDrive?

°9 GB, 50 MB/s! • Assuming it finds a niche in a successful product

• Assuming past trends continue

Page 15: CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan bhuyan

CS61C L16 Disks © UC Regents

15

Fallacy: Use Data Sheet “Average Seek” Time°Manufacturers needed standard for fair

comparison (“benchmark”)• Calculate all seeks from all tracks, divide by number of seeks => “average”

°Real average would be based on how data laid out on disk, where seek in real applications, then measure performance

• Usually, tend to seek to tracks nearby, not to random track

°Rule of Thumb: observed average seek time is typically about 1/4 to 1/3 of quoted seek time (i.e., 3X-4X faster)

• UltraStar 72 avg. seek: 5.3 ms 1.7 ms

Page 16: CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan bhuyan

CS61C L16 Disks © UC Regents

16

Connecting to Networks (and Other I/O)°Bus - shared medium of communication that can connect to many devices

°Hierarchy of Buses in a PC

Page 17: CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan bhuyan

CS61C L16 Disks © UC Regents

17

Buses in a PC: connect a few devices

CPU Memory bus

MemorySCSI:

External I/O bus

(1 to 15 disks)

SCSI Interface

Ethernet Interface

Ethernet Local Area Network

°Data rates• Memory: 133 MHz, 8 bytes 1064 MB/s (peak)

• PCI: 33 MHz, 8 bytes wide 264 MB/s (peak)

• SCSI: “Ultra3” (80 MHz), “Wide” (2 bytes) 160 MB/s (peak)

Ethernet:12.5 MB/s (peak)

PCI Interface

PCI: Internal

(Backplane) I/O bus

Page 18: CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan bhuyan

CS61C L16 Disks © UC Regents

18

Why Networks?°Originally sharing I/O devices between computers

(e.g., printers)

°Then Communicating between computers

(e.g, file transfer protocol)

°Then Communicating between people (e.g., email)

°Then Communicating between networks of computers Internet, WWW

Page 19: CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan bhuyan

CS61C L16 Disks © UC Regents

19

Growth Rate

Ethernet Bandwidth

1983 3 mb/s

1990 10 mb/s

1997 100 mb/s

1999 1000 mb/s

0

10,000,000

20,000,000

30,000,000

40,000,000

50,000,000

60,000,000

70,000,000

80,000,000

90,000,000

100,000,000

Jan-93 Apr-95 Jun-97 Aug-99

Inte

rnet H

osts

"Source: Internet Software Consortium (http://www.isc.org/)".

Page 20: CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan bhuyan

CS61C L16 Disks © UC Regents

20

What makes networks work?° links connecting switches to each other and to computers or devices

Computer

networkinterface

switch

switch

switch

°ability to name the components and to route packets of information - messages - from a source to a destination

°Layering, protocols, and encapsulation as means of abstraction

Page 21: CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan bhuyan

CS61C L16 Disks © UC Regents

21

Typical Types of Networks°Local Area Network (Ethernet)• Inside a building: Up to 1 km

• (peak) Data Rate: 10 Mbits/sec, 100 Mbits /sec,1000 Mbits/sec (1.25, 12.5, 125 MBytes/s)

• Run, installed by network administrators

°Wide Area Network• Across a continent (10km to 10000 km)

• (peak) Data Rate: 1.5 Mbits/sec to 2500 Mbits/sec

• Run, installed by telephone companies

°Wireless Networks, ...

Page 22: CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan bhuyan

CS61C L16 Disks © UC Regents

22

Network Basics: links

°Link made of some physical media• wire, fiber, air

°with a transmitter (tx) on one end• converts digital symbols to analog signals and drives them down the link

°and a receiver (rx) on the other• captures analog signals and converts them back to digital signals

° tx+rx called a transceiver

0110 0110

Page 23: CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan bhuyan

CS61C L16 Disks © UC Regents

23

Example: Network Media

Copper, 1mm think, twisted to avoid antenna effect

Twisted Pair:

Used by cable companies: high BW, good noise immunity

Coaxial Cable:

Copper coreInsulator

Braided outer conductorPlastic Covering

Light: 3 parts are cable, light source, light detector

Fiber OpticsTransmitter– L.E.D– Laser Diode Receiver

– Photodiodelightsource Silica

Total internalreflection

Air

Page 24: CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan bhuyan

CS61C L16 Disks © UC Regents

24

ABCs of Networks: 2 Computers

° Starting Point: Send bits between 2 computers

° Queue (First In First Out) on each end

° Can send both ways (“Full Duplex”)

° Information sent called a “message”• Note: Messages also called packets

networkinterfacedevice

OS

appln

OS

appln

Page 25: CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan bhuyan

CS61C L16 Disks © UC Regents

25

ABCs: many computers

°switches and routers interpret the header in order to deliver the packet

°source encodes and destination decodes content of the payload

networkinterfacedevice

OS

appln

OS

appln