13.07.2015 Views

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

220 File Structures Chapter 6If extents are required to be the same length (for example, one block), restructuringwill not work. Instead, we could provide overflow file descriptors that contain morepointers. The file descriptor could use the first nine pointers for the file itself and, ifnecessary, use the tenth pointer to point not to the next extent of the file but to the firstoverflow descriptor. This overflow descriptor could be a full block. Assuming that weneed two 2-byte integers for each extent (one for the size, one for the pointer), we couldfit another 128 extents in each overflow descriptor. The last one could again be reservedfor overflow.Figure 6.12 shows a descriptor for a file that requires 13 blocks. The overflowdescriptor as shown has slots for 56 extents. Only 4 are in use. The last slot, if needed,would point to yet another overflow descriptor.Figure 6.12 A 13-block file

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!