1 / 56

Chapter VIIII File Systems Review Questions and Problems

Chapter VIIII File Systems Review Questions and Problems. Jehan-François Pâris jfparis@uh.edu. Mount. What is the purpose of the UNIX mount operation? To install a new device driver in the kernel To construct a single directory tree crossing disk partition boundaries

derick
Download Presentation

Chapter VIIII File Systems Review Questions and Problems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter VIIII File Systems Review Questions and Problems Jehan-François Pâris jfparis@uh.edu

  2. Mount • What is the purpose of the UNIX mount operation? • To install a new device driver in the kernel • To construct a single directory tree crossing disk partition boundaries • To install a shared library

  3. Mount • What is the purpose of the UNIX mount operation? • To install a new device driver in the kernel • To construct a single directory tree crossing disk partition boundaries • To install a shared library

  4. Mount • What is the main advantage of that mount operation? • It speeds up file accesses • It hides from the user actual file locations on disk

  5. Mount • What is the main advantage of that mount operation? • It speeds up file accesses • It hides from the user actual file locations on disk

  6. File Organization • Savvy UNIX users try to pick the best block size for each of their files • TRUE • FALSE

  7. File Organization • Savvy UNIX users try to pick the best block size for each of their files • TRUE • FALSE:All files in the same disk partition have the same block size

  8. Protection • What is the main advantage of access control lists over tickets? • They are more flexible • They are faster • They are always encrypted

  9. Protection • What is the main advantage of access control lists over tickets? • They are more flexible • They are faster • They are always encrypted

  10. Protection • What is the main advantage of tickets over access control lists? • They are more flexible • They are faster • They are always encrypted

  11. Protection • What is the main advantage of tickets over access control lists? • They are more flexible • They are faster • They are always encrypted

  12. Protection • What is the best way to combine access control lists and tickets? Use ____________________ for long term access control and ____________________ for short term access control

  13. Protection • What is the best way to combine access control lists and tickets? Use access control lists for long term access control and tickets   for short term access control

  14. Protection • Why?

  15. Protection • Why? To take advantage of • the higher flexibility of access control lists and • the lower cost of tickets

  16. Protection • Give examples of • access control lists and • tickets in the UNIX file system

  17. Protection • Give examples of • access control lists and • tickets in the UNIX file system • nine-bit file modes • file descriptors

  18. Protection • Which are the major advantage and the major disadvantage of the UNIX implementation of access control lists?

  19. Protection • Which are the major advantage and the major disadvantage of the UNIX implementation of access control lists? • Major advantage: They occupy very little space • Major disadvantage: They are much less flexible than full ACLs because only system administrators can create or modify user groups

  20. Protection • Which users can do what with a file having these protection bits?-rw-rw-r--

  21. Protection • Which users can do what with a file having these protection bits?-rw-rw-r– Owner of file and members of the group associated with the file can read and modify the file Everybody else can just read it

  22. Block sizes • Which issues should we consider when selecting the block size of a disk partition?

  23. Block sizes • Which issues should we consider when selecting the block size of a disk partition? • Larger block sizes speed up data transfers • Smaller block sizes minimize internal fragmentation

  24. Block sizes • Why is it so important to minimize internal fragmentation in a file system? Because most file systems have many very small files • Using 8 KB blocks to store a 4KB file wastes 50% of the disk space

  25. Block sizes • Why is it so important to minimize internal fragmentation in a file system? Because most file systems have many very small files • Using 8 KB blocks to store a 4KB file wastes 50% of the disk space

  26. File sizes • What is the maximum file size in a 32-bit system?

  27. File sizes • What is the maximum file size in a 32-bit system? Four megabytes because a 32-bit unsigned integer can address 232 bytes

  28. Addressing file contents • A BSD file system has 12 direct block addresses and 8 KB blocks? How many bytes can be addressed • Directly from the i-node? • With one level of indirection? • With two levels of indirection?

  29. Addressing file contents 12 13 9 6 0 3 4 7 10 1 2 8 5 11 Twelvedirectblocks b/4 indirect block addresses b/4 blockaddresses b/4 blockaddresses b/4 blockaddresses b/4indirectblocks . . . b/4b/4 double indirect blocks Block size b  4KB

  30. Addressing file contents 12 13 9 6 0 3 4 7 10 1 2 8 5 11 Twelvedirectblocks b/4 indirect block addresses b/4 blockaddresses b/4 blockaddresses b/4 blockaddresses b/4indirectblocks . . . b/4b/4 double indirect blocks Block size b = 8KB

  31. Addressing file contents 12 13 9 6 0 3 4 7 10 1 5 2 11 8 Twelvedirectblocks 2K blockaddresses 2K indirect block addresses 2K blockaddresses 2K blockaddresses . . . b/4b/4 double indirect blocks Block size b = 8KB 96 KB b/4indirectblocks

  32. Addressing file contents 12 13 9 6 0 3 4 7 10 1 5 2 11 8 Twelvedirectblocks 2K blockaddresses 2K indirect block addresses 2K blockaddresses 2K blockaddresses . . . b/4b/4 double indirect blocks Block size b = 8KB 96 KB 2K blocks = 16MB

  33. Addressing file contents 12 13 9 6 0 3 4 7 10 1 5 2 11 8 Twelvedirectblocks 2K blockaddresses 2K indirect block addresses 2K blockaddresses 2K blockaddresses . . . b/4b/4 double indirect blocks Block size b = 8KB 96 KB 2K blocks = 16MB 4GB - 16MB – 98 KB

  34. Addressing file contents • Directly from the i-node, we can access the first 12 blocks of the file, that is,12x8 KB =96 KB • As one block can contain8K/4 = 213/4 = 211 block addresses,we can access 211 blocks, that is,211x8 KB = 211x213 B = 224 B = 16MB of data with one level of indirection

  35. Addressing file contents • With two levels of indirection,we should be able to access8K/4 = 213/4 = 211x211 = 222 block addresses, that is,222x8 KB = 222x213 B = 235 B = 32 Since file sizes cannot exceed 4GB,we can only access4 GB – 16MB -96 KB

  36. Block sizes again • Why did the designers of BSD FFS picked a minimum block size of 4 KB?

  37. Block sizes again • Why did the designers of BSD FFS picked a minimum block size of 4 KB? Because it is the smallest block size that eliminates the need for a third level of indirection

  38. Block sizes again • Why did the designers of BSD FFS introduced block fragments?

  39. Block sizes again • Why did the designers of BSD FFS introduced block fragments? To reduce internal fragmentation:fragments can be used to store small files (less than 4 KB) and the tail end of larger files

  40. Cylinder groups • What is the main advantage of introducing cylinder groups in FFS?

  41. Cylinder groups • What is the main advantage of introducing cylinder groups in FFS? It reduces seek times:since each cylinder group contains bothi-nodes and data blocks, we can store the first few blocks of large files and all the blocks of regular files closer to theiri-nodes

  42. Metadata updates • When you create a new file, in which order should the blocks containing (a) the new directory entry and (b) the new i-node be written to disk?

  43. Metadata updates • When you create a new file, in which order should the blocks containing (a) the new directory entry and (b) the new i-node be written to disk? We should write first the block containing the new i-node and then the block containing the new directory entry

  44. Metadata updates • When you delete an existing file, in which order should the blocks containing (a) the deleted directory entry and (b) the reclaimed i-node be written to disk?

  45. Metadata updates • When you delete an existing file, in which order should the blocks containing (a) the deleted directory entry and (b) the reclaimed i-node be written to disk? We should write first the block containing the deleted directory entry and then the block containing the reclaimed i-node

  46. Metadata updates • How does FFS ensure that all metadata updates are written to disk in the right order?

  47. Metadata updates • How does FFS ensure that all metadata updates are written to disk in the right order? It uses blocking writes:metadata ordering is enforced by ensuring that a metadata update cannot proceed until the previous one has completed

  48. Metadata updates • What is the main drawback of this solution?

  49. Metadata updates • What is the main drawback of this solution? They occasion too many seeks and, as a result, significantly degrade the performance of the file system

  50. Journaling file systems • Which are the respective advantages and disadvantages of • Journaling file systems doing synchronous log updates? • Journaling file systems doing asynchronous log updates? Justify your answers

More Related