Parity, ECC, RAID
./section-14.pdf
3
floor(log2(n_bits)) + 1
p1 p2 0 p4 0 1 1
1 2 3 4 5 6 7
1 2 3 4 5 6 7
p p 0 p 0 1 1
p1 - 1, 3, 5, 7
- 0, 0, 1
p2 - 2, 3, 6, 7
- 0, 1, 1
p4 - 4, 5, 6, 7
- 0, 1, 1
1 2 3 4 5 6 7
p p d p d d d
1 2 1 4 2 3 4
1 0 0 0 0 1 1
2
add additional parity bit over the whole seq.
1 2 3 4 5 6 7
0 1 1 0 1 1 1
p p d p d d d
1 2 1 4 2 3 4
p1 - bit = 0; seq = 1; error
p2 - bit = 1; seq = 1; match
p4 - bit = 0; seq = 1; error
1 + 4 = 5;
flip 5th to fix error
1 2 3 4 5 6 7
0 1 1 0 0 1 1 =>
1 0 1 1
2
1 2 3 4 5 6 7
1 0 0 1 0 0 0
p p d p d d d
1 2 1 4 2 3 4
p1 - bit = 1; seq = 0; error
p2 - bit = 0; seq = 0; match
p4 - bit = 1; seq = 0; error
1 + 4 = 5;
flip 5th to fix error
1 2 3 4 5 6 7
1 0 0 1 1 0 0 =>
0 1 0 0
2
Configuration Pro Con
RAID 0 striping of data simple storage no redundancy
across disks management
RAID 1 traditional mirroring easy cope with failures amount of disks
every data write also by going to the mirror expensive
goes to backup disk
RAID 4
independent read/write, small reads blocking write
error detection within
RAID 5
parity spread across the disks multiple writes simultaneously
as long as parity bits not
located at the same disks