(a) List four items of metadata that you might find in a File Control Block (FCB). [4...
Question:
(a) List four items of metadata that you might find in a File Control Block (FCB). [4 marks]
(b) Consider a Unix process accessing a file using the standard API. Is protection provided through Access Control Lists or Capabilities? Justify your answer. [2 marks]
(c) Consider a filesystem structured as a directed acyclic graph (DAG) where files are structured from sets of 4096-byte disk blocks with 64-bit addresses. The first block of each file contains the following information:
control information: 1024 bytes
direct block pointers: 1008 bytes
indirect block pointer: 8 bytes
double indirect block pointer: 8 bytes
immediate data: 2048 bytes
The data bytes of a file start at the beginning of the immediate data. After the immediate data, the file data is found on the block addressed by the first direct block pointer and then carries on in a fashion similar to the structure defined by a Unix inode. We consider the first byte of the file to be byte 0, then byte 1, etc. Files are named by directory entries that are 128 bytes long. Directories are stored as files limited to a single block in size. Only two levels of directory are allowed. The root directory is stored in block 0. You may find it useful to know that 126 ? 8 = (27 ? 2) ? 2 3 = 1008.
(i) Assuming identical structure for the first blocks of both files and directories, what is the maximum number of files this filesystem may contain? Without changing the size of a disk block, a disk block address, or a directory, how might you increase this, and to what? [4 marks]
(ii) How many disk blocks must be read to access byte 72 of a named file? How many must be read to access byte 223? [3 marks]
(iii) How big is the largest single file that can be stored in this filesystem? [3 marks]
(iv) Discuss the advantages and disadvantages of maintaining protection information with the file or with a directory entry for the file. [4 marks]
Accounting For Non-Accounting Students
ISBN: 9781292128979
9th Edition
Authors: John R. Dyson, Ellie Franklin