CS 457/557, assignment 2

Due Friday, 26 January, 2018

RAID recovery

After a power failure, there is a recovery process that we shal study in Chapter 17. During this process, any recently written block will need to be re-read, and probably modified. It can happen that one such block was only half written, so neither the old nor new version can be read.

Assuming there are 5 RAID disks, restore this block (the first 10 bits) from the other 4:

      1 1 1 1 1  0 0 0 0 0
      1 1 0 0 1  1 0 0 1 0
      1 0 1 0 1  0 1 0 1 1
      1 1 1 0 0  0 1 1 0 1
new:

Record and Block layout

Similar to (but not) Exercise 13.5.1 (p. 593), "dereferenced"

Suppose a fixed-length record has the following fields in this order:
Each record also has a record header, consisting of two 4-byte pointers and a character.

1. Calculate the record length of such a record for these 2 situations regarding field alignment:
  1. Fields can start an any byte
  2. Fields must start at a byte that is a multiple of 4
2. How many records can we fit in a block 16,384 bytes long (16K bytes), for each field alignment (a. & b.),
where there is also a block header consisting of three 8-byte integers.
  1. Record length as in 1. a.
  2. Record length as in 1. b.
Submit on paper, or see How to submit in Assignment 1.
Lin Jensen. Back to course