Index

2. Disk Tutorial Questions

• 1. A FAT32 based system has a cluster size of 32768 (32 * 2^10) bytes. What is the theoretical maximum capacity of the disk? Note that only 28 bits of each 32-bit FAT entry can be used for file allocation. Express your answer in TBytes (use 1 TByte = 2^40 Bytes). Check your answer at http://support.microsoft.com/kb/184006/en-us
• 2. A file system uses linked allocation with a cluster size of 512 bytes and a pointer size of 4 bytes. How many clusters are required to store the following files?
• ```MEMO.TXT-4502 bytes
PROJ.EXE-281750 bytes```

• If the disk allocation method was changed to indexed allocation, with each index entry requiring 4 bytes, how many clusters are now required to store these files?
• 3. Using appropriate Web references, outline the major characteristics of NTFS and discuss its improvements over the older FAT based system. Is FAT still used? Where and why?
• 4. Outline the differences in approach taken by the DOS/Windows FAT system and the Unix inode with respect to the way in which both operating systems allocate disk space. Your answer should include a description of the operation of the DOS FAT, the structure of a DOS directory entry and their relationship. You should then describe the Unix inode data structure, the structure of a Unix directory entry and their relationship.
• 5. Assuming a block size of 2048 bytes and an address pointer size of 4 bytes, what would be the size of a Unix file which completely utilises the capacity of:
• ```a. the first ten inode pointers?
b. the first eleven inode pointers?
c. the first twelve inode pointers?
d. the first thirteen inode pointers?```

• 6. Demonstrate the concept of disk mounting in a Unix file system with a suitable diagram and relavent discussion. How does this compare with the concept of a Window network drive. Outline the similarities and differences.

• possible clusters and each cluster is 32768 bytes

• 1 TB
• max FAT32 size in TB = TB
• linked allocation (last 4 bytes in each cluster are a pointer)
• each cluster is 512 bytes, so it can contain bytes and a 4 byte pointer
• 4502 byte file requires ( remainder 438 clusters), so 9 clusters
• 281750 byte file requires ( remainder 318), so 555 clusters
• Indexed allocation
• a single cluster can contain pointers (128 pointers)
• one will be used to chain to the next indexed cluster (if required), so we only have 127 data pointers
• a single cluster can therefore point to the contents of a byte file = 64 K bytes
• a file exceeding 64KB will require another cluster to contain the next 64KB worth of data
• 4502 file requires
• therefore will require 10 clusters
• a file of size 281750 bytes using indexed allocation will require
• multiple indexed clusters and multiple data blocks
• no of index clusters:
• no of data clusters:
• total = clusters
• Assuming a block size of 2048 bytes and an address pointer size of 4 bytes, what would be the size of a Unix file which completely utilises the capacity of:
• a. the first ten inode pointers?
• examine the inode diagram in the filesystem notes
• we see that the first ten blocks use direct pointers
• byte file

• first eleven inode pointers
• first ten = 20480 as calculated before
• the eleventh is a single indirect inode, which means that this block contains pointers to data blocks
• a single indirect block can point to a total of bytes
• bytes
• therefore first eleven inode pointer can contain a maximum file size of: byte
• 1069056 bytes

• c. the first twelve inode pointers?
• again we can use the prior calculation of the first eleven and add the twelfth
• 1069056 + size of twelfth
• the twelfth uses a double indirect pointer
• so this means that has 512 pointers which point to indirect pointer (as before)
• so the maximum file size is bytes

• d. the first thirteen inode pointers?
• the thirteenth pointer is a triple indirect, which means that it points to a block containing 512 pointers which point to double indirect inodes
• therefore bytes for a tripple indirect inode
• so the total is: size of the first twelve + size of the thirteenth
• bytes

7. Revision

• revise all topics
• for the spring term material pay special attention to:
• processes, process scheduling, file systems.

Index

1. Disk Tutorial and Revision
2. Disk Tutorial Questions