Questions:

What is the advantage of having all file link pointers collected together in a File Allocation Table. Why is this better than having each block point to the next block in the file?


One advantage is that this layout allows for somewhat quick seeking to random spots within a file. Since the table is stored contiguously on the disk, reading the table is fairly quick. This also allows for the table to be cached into memory, further speeding up look-up times.

Consider a system where free space is kept in a free space list. Suppose the pointer to the free space list is lost. Can the system reconstruct the free space list? How? (this is question 11.3a)


You examine every file on the file system. Any block not mentioned should be put back on the reconstructed free list.

Consider a file system similar to the EXT2 file system.  How many disk I/O operations are needed to read the contents of the file /a/b/c?  Assume nothing is currently cached? What does each request access?(this is question 11.3b)


Read the contents of inode 1 to find where inode 1 is stored (inode 1 is the root directory)

Read the root directory to find the entry for "a". That tells you inode number for the directory "a".

Read the contents of the inode for "a". That tells you the location of the directory "a".

Read the directory "a". Look for the entry for "b". That tells you the inode number for "b".

Read the contents of the inode for "b". That tells you the location for the directory "b".

Read the directory "b". Look for the entry for "c". That tells you the inode number for "c".

Read the contents of the inode for "c". That tells you the location for the file "c".

Read the file "c". This can take one or more reads, depending on how long "c" is.

Note that the odd entries all look the same, and all the even entries look the same.



Question 12.2a: Suppose a hard drive is currently on culinder 143, and the previous request was cylinder 125. The queue of requests in FCFS order is 86,1470, 913, 1774, 948, 1509, 1022, 1750, 130. What is the total distance needed to satisfy all the requests in FCFS order?


Order is: 86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130

(143 – 86) + (1470 – 86) + ( 1470 – 913) + (1774 – 913) + ( 1774 – 948) + (1509 – 948) + ( 1509 – 1022) + (1750 - 1022) + ( 1750 – 130) = 7081 cylinders.


Question 12.2b Suppose a hard drive is currently on culinder 143, and the previous request was cylinder 125. The queue of requests in FCFS order is 86,1470, 913, 1774, 948, 1509, 1022, 1750, 130. What is the total distance needed to satisfy all the requests in SSTN order?


New order is: 130, 86, 913, 948, 1022, 1470, 1509, 1750, 1774
Distance is: (143 – 130) + ( 130 – 86) + ( 913 – 86) + (948 – 913) + (1022 – 948) + (1470 – 1022) + (1509 – 1470) + (1750 – 1509) + (1774 – 1750) = 1745 cylinders


Question 12.9a: Consider a RAID array with five disks, with the parity for the set of four blocks on four disks stored on the fifth disk. How many blocks are accessed in order to write one block of data?


Either


Write the new block. Read all four blocks in a parity unit. Compute the new parity. Write the parity block. Six accesses.


-or-


Read the block about to be replaced. Read the associated parity block. Compute the change in parity. Write the new block. Write the new parity block. Four accessed. THIS IS THE BETTER CHOICE!


Question 12.9b: Consider a RAID array with five disks, with the parity for the set of four blocks on four disks stored on the fifth disk. How many blocks are accessed in order to write seven contiguous blocks of data?


This question is quite tricky! First, how many writes are needed to change a block on the RAID array?


To change one block of a parity group, use the algorithm from 12.9a to conclude four accesses are needed.


To change two blocks in the same group, read the two blocks about to be replaced, read the associated parity, compute the new parity, and write the two data and one parity blocks. That was five accesses.


To change three blocks in the same group, read the three blocks about to be replaced, read the associated parity, compute the new parity, and write the three data and one parity blocks. That was six accesses.


To change all four of the blocks of a parity group. just write them and the associated parity block. That's five accesses.


So how are these seven contiguous blocks arranged among parity groups? It could be

Group N+0: 0 relevant data blocks = 0 accesses to change

Group N+1: 4 relevant data blocks = 5 accesses to change

Group N+2: 3 relevant data blocks = 6 accesses to change

Total 11 accesses to change

-or-

Group N+0: 1 relevant data blocks = 4 accesses to change

Group N+1: 4 relevant data blocks = 5 accesses to change

Group N+2: 2 relevant data blocks = 5 accesses to change

Total 14 accesses to change

-or-

Group N+0: 2 relevant data blocks = 5 accesses to change

Group N+1: 4 relevant data blocks = 5 accesses to change

Group N+2: 1 relevant data blocks = 4 accesses to change

Total 14 accesses to change

-or-

Group N+0: 3 relevant data blocks = 6 accesses to change

Group N+1: 4 relevant data blocks = 5 accesses to change

Group N+2: 0 relevant data blocks = 0 accesses to change

Total 11 accesses to change



How many bits per square inch occur on a DVD? (Feel free to use a tape measure. Show work).


DVD recording area = 14 in^2
(see http://www.imagineeringezine.com/e-zine/bitesize.html)
Data capacity 4.7 GB for DVD-5
Data capacity: 9 GB for DVD-9
Density for DVD-5: 2.88376376 × 109 bits per (square inch)
See Google caclulator
Density for DVD-9: 5.52210081 × 109 bits per (square inch)
See Google caclulator