Chapter 8

39
1 Chapter 8 11/23/09

description

Chapter 8. 11/23/09. IO System. Storage Must be dependable Networks Must tolerate faults in communications by including mechanisms to detect and recover form faults. Peripherals Extremely Diverse. I/O Systems. Emphasis is placed on dependability and cost. - PowerPoint PPT Presentation

Transcript of Chapter 8

Page 1: Chapter 8

1

Chapter 8

11/23/09

Page 2: Chapter 8

2

IO System• Storage

– Must be dependable

• Networks– Must tolerate faults in communications by

including mechanisms to detect and recover form faults.

• Peripherals– Extremely Diverse

Page 3: Chapter 8

3

I/O Systems• Emphasis is placed on dependability and

cost.– Processors and memory emphasize

performance and cost.

• I/O System performance must keep pace with processor performance.– I/O can become a bottleneck.

Page 4: Chapter 8

4

Page 5: Chapter 8

5

I/O performance• Complex

– Access Latency– Throughput

• Depends on many aspects of the system.– Device characteristics– Connection between device and rest of system– Memory hierarchy– Operating system– Etc.

• I/O benchmarks are primitive compared to processor benchmarks.

Page 6: Chapter 8

6

Page 7: Chapter 8

7

Page 8: Chapter 8

8

Transferring data between a device and memory

• Polling• I/O interrupts• DMA

– Special DMA controller handles transfers– Processor sets up DMA– DMA controller starts operation, arbitrates the

bus, and interrupts processor when DMA is complete.

Page 9: Chapter 8

9

Disk Storage• Nonvolatile – Data is not lost when power

turned off.

• Consists of platters (1-4) each with two recordable disk surfaces, and R/W heads.

• Platters are rotated at 5400-15,000 RPM.

• Each dist is divided into tracks.

• Tracks are divided into sectors.

Page 10: Chapter 8

10

Page 11: Chapter 8

11

Answer: Second. Track Seek time.

Page 12: Chapter 8

12

Page 13: Chapter 8

13

Disk manufactures report minimum, maximum and average seek time.

The first two are easy to measure.

Average is open to wide interpretation because it depends on seek distance. The standard is

Sum of the time for all possible seeks divided by number of possible seeks.

Actual average may be considerably less.

Page 14: Chapter 8

14

Page 15: Chapter 8

15

Transfer time – time to transfer a block of bits.

Function of sector size, rotation speed and recording density.

30 – 80 MB/sec typical.

However, most disk controllers have a built-in cache that stores sectors as they are passed over. Resulting in higher transfer rates.

Today most disk transfers are multiple sectors lengths.

Controller time – Overhead imposed by controller in performing disk I/O.

Disk I/O time consists of the above times plus any wait time because other processes are using the disk.

Page 16: Chapter 8

16

Page 17: Chapter 8

17

Page 18: Chapter 8

18

Page 19: Chapter 8

19

Replace large disk with many small disks.

Page 20: Chapter 8

20

Page 21: Chapter 8

21

RAID

• RAID 0 – Spread data over multiple drives.– Called striping improves performance but no

redundancy.

• RAID 1 – Mirrors or shadows data to redundant drive.

• RAID 2-6 – Incorporates error correction techniques.

Page 22: Chapter 8

22

RAID 5• To illustrate concepts and implications

consider RAID 5.• RAID 5 uses striped array with rotating

parity. • Optimized for short, multithreaded

transfers.• Capable of recovering from a single drive

failure.

Page 23: Chapter 8

23

RAID 5 system consisting of three data drives and rotating parity.

Four stripes for sectors A, B, C, and D are shown.

Page 24: Chapter 8

24

Rotating Parity• Why rotating parity?• The following steps are necessary to update a single data sector in a

stripe.– The old data sector and the parity sector for the stripe must be read.– Compute the new parity using the new data sector, old data sector, and old

parity.– Write new data sector and new parity sector.

• Thus, to write to a data sector both the data sector and parity sector must be read and written.

• Since there are many data drives a fixed parity drive would accessed much more frequently than a data drive.

• This excessive access of a single parity drive is avoid by rotating parity across all drives.

Page 25: Chapter 8

25

ParityParity encoding is given by

Where Di represent a data byte in a sector on drive i.

If both sides of the above equation are exclusive ored with P, then

D5 for example can be recovered by

0 1 2 3 4 5P D D D D D D

0 1 2 3 4 5

0 1 2 3 4 5

0 1 2 3 4 50

P D D D D D D

P P D D D D D D P

D D D D D D P

5 0 1 2 3 4D D D D D D P

Page 26: Chapter 8

26

Raid 6

• Use two parity drives (P and Q).

• Data can be recovered if two sectors in a stripe are corrupted.

• P parity is the same as RAID 5 (simple XOR).– Easy to encode and easy to recover data.

• Q parity is more complicated.

Page 27: Chapter 8

27

Q parity encoding0 1 2 3 4 5P D D D D D D

The Q parity is a Reed-Solomon code given by 0 0 1 1 2 2 3 3 4 4 5 5Q g D g D g D g D g D g D

0 1 2 3 4 51 2 4 8 16 32Q D D D D D D

Where is Galois Field (GF) multiplication and gi is a

constant. For i < 8 it turns out that gi = 2i. For larger i, it not

as simple. For example g8 = 29.

But Q simplifies to

The problem is how to compute the GF multiplication.

Page 28: Chapter 8

28

GF multiplication• In ordinary arithmetic multiplication can be

accomplished summing the logs and taking the inverse log.

• GF multiplication is typically accomplished using lookup tables to find the GF log and inverse log. The addition in modulo 255.

See Xilinx application note XAPP731 “Hardware Accelerator for RADD 6 Parity Generation / Data Recovery Controller”.

1255log log ( ) log ( )GF GF GFA B A B

Page 29: Chapter 8

29

Page 30: Chapter 8

30

Buses• A bus is a shared communication link, which uses one set

of wires to connect multiple subsystems.• Advantages

– Versatile– Low cost

• Disadvantage– Communication bottleneck

• A bus generally consists of data, and control lines.– Control lines are used to signal request and acknowledgments,

and to indicate what type of information is on the data lines.– Data lines carry information between the source and destination.

These lines are often separated into address and data.

Page 31: Chapter 8

31

Bus Transactions

• A sequence of bus operations that includes a request and may include a response, either of which may carry data.

• May require several bus operations to complete.

• Includes two parts sending address and sending or receiving data.

Page 32: Chapter 8

32

Processor-memory bus

• Connects processor and memory.

• Short

• High speed

• Matched to memory system to maximize memory-processor bandwidth.

Page 33: Chapter 8

33

I/O Buses

• Can connect many types of I/O devices.

• Can be long.

• Wide range of data bandwidths.

• Provides a way of extending the machine and adding new peripherals.

Page 34: Chapter 8

34

Backplane Bus

• Allows processor, memory and I/O to exist on a single bus.

Page 35: Chapter 8

35

Synchronous Bus

• Contains a clock as part of the control lines, and uses a fixed protocol for communicating that is relative to the clock.

• Every device must run at the clock rate.• Because of clock skew synchronous busses

can not be long.• Processor-memory buses tend to be

synchronous.

Page 36: Chapter 8

36

Asynchronous Buses

• Not clocked.

• Uses handshaking.

• Can accommodate wide variety of devices.

• Can be long.

• Frequently used in I/O buses.

• USB and Firewire are asynchronous buses.

Page 37: Chapter 8

37

Page 38: Chapter 8

38

address data

Page 39: Chapter 8

39