OSTEP Chapter 38

ECE 3600, Fall 2022


Table of Contents


1. RAIDs

     
N disks

disk = address % N

offset = address / N


     
disk1 = (address % (N/2)) * 2,   disk2 = disk1 + 1

offset = address / (N/2)

write to both disks,
read from even-numbered disk for even offsets,
read from odd-numbered disk for odd offsets.


     
 

     
 

2. Comparison

N disks

Each disk: B blocks, S MB/sec sequential, R MB/sec random, T sec latency


3. Exercises - RAID Level 0

Exercises from the book using raid.py:
numDisks 4
chunkSize 4k

$ python ./raid.py -n 4 -R 21 -L 0

LOGICAL READ from addr:17 size:4096
  Physical reads/writes?

LOGICAL READ from addr:8 size:4096
  Physical reads/writes?

LOGICAL READ from addr:10 size:4096
  Physical reads/writes?

LOGICAL READ from addr:16 size:4096
  Physical reads/writes?

$ python ./raid.py -n 4 -R 21 -L 0 -r

LOGICAL OPERATION is ?
  read  [disk 1, offset 4]

LOGICAL OPERATION is ?
  read  [disk 0, offset 2]

LOGICAL OPERATION is ?
  read  [disk 2, offset 2]

LOGICAL OPERATION is ?
  read  [disk 0, offset 4]

4. Exercises - RAID Level 1

$ python ./raid.py -n 4 -R 21 -L 1

LOGICAL READ from addr:17 size:4096
  Physical reads/writes?

LOGICAL READ from addr:8 size:4096
  Physical reads/writes?

LOGICAL READ from addr:10 size:4096
  Physical reads/writes?

LOGICAL READ from addr:16 size:4096
  Physical reads/writes?

$ python ./raid.py -n 4 -R 21 -L 1 -r

LOGICAL OPERATION is ?
  read  [disk 2, offset 8]

LOGICAL OPERATION is ?
  read  [disk 0, offset 4]

LOGICAL OPERATION is ?
  read  [disk 1, offset 5]

LOGICAL OPERATION is ?
  read  [disk 0, offset 8]