1. Home
  2. Explore
  3. Computer Science
  4. File System Implementation

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

File System Implementation

  • 91Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: File System Architecture
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

What is the purpose of a file system’s logical view?

Tap to flipClick to flipspace

It gives applications a consistent way to access named files without needing to know how or where the data is physically stored.

Or swipe the card

91 cards

  1. What is the purpose of a file system’s logical view?

    It gives applications a consistent way to access named files without needing to know how or where the data is physically stored.

  2. How does the operating system hide differences between storage devices?

    It uses device drivers to provide a consistent interface to different hardware, such as hard disks and USB drives.

  3. What is the general path of a file request through a layered file system?

    An application requests a logical file operation; file-system layers organize and locate the data, then I/O and a device driver communicate with the device.

  4. What is a benefit of layering in file-system design?

    It reduces complexity and lets the system support different file systems and devices through consistent interfaces.

  5. What is a cost of adding more file-system layers?

    Each layer adds processing and communication overhead, which can slow file operations.

  6. What is a file control block (FCB) used for?

    It stores information needed to describe and manage a file, such as its name, state, and storage-related details.

  7. What additional information might a file control block contain in a more complex file system?

    It may contain links to indexes, related tables, or other structures, in addition to basic file information.

  8. Why must file-system data be brought into memory before it can be used?

    The system works on data in memory, so data and required file-system structures must be read from storage first.

  9. What does mounting a file system allow the operating system to do?

    It makes a file system available at a mount point and records information such as its type and the operations it supports.

  10. How do automatic and ad hoc mounting differ?

    Automatic mounting makes a device’s file system available during startup; ad hoc mounting makes it available when needed, such as when a USB drive is connected.

  11. Why might an operating system ask to check a newly connected drive?

    The drive may contain file-system metadata created or changed by another operating system, or its metadata may be inconsistent.

  12. What is the difference between a partition and a volume?

    A partition is a physical division of a disk; a volume is a logical storage unit and may span more than one physical disk.

  13. How is a physical disk organized into addressable storage units?

    A disk is divided into tracks and sectors; a track-sector intersection forms a block that can be addressed.

  14. What is the relationship between a logical file name and a physical disk location?

    The file system maps the logical name to storage locations, such as disk blocks, which a device driver can read into memory.

  15. What is contiguous file allocation?

    A file is stored in a consecutive run of disk blocks.

  16. What is a main advantage of contiguous allocation?

    It is simple and allows a file’s blocks to be accessed with little location-tracking overhead.

  17. What are two problems with contiguous file allocation?

    It can cause external fragmentation, and a file may be unable to grow if adjacent free blocks are unavailable.

  18. Why might a file need to be moved under contiguous allocation?

    If it grows and the following blocks are occupied, the file may need to be relocated to a larger contiguous region.

  19. What is extent-based allocation?

    A file is stored in one or more contiguous regions called extents, with additional extents allocated as it grows.

  20. What trade-off does extent-based allocation make compared with a single contiguous region?

    It makes growth more flexible, but the system must track and link multiple extents.

  21. How does linked allocation store a file?

    Each file block points to the next block, and the final block contains a null or end-of-file pointer.

  22. What is an advantage of linked allocation?

    It can allocate blocks as needed and avoids requiring a large contiguous region.

  23. What are two disadvantages of linked allocation?

    Accessing a later block may require following many pointers, and corruption of a pointer can make the rest of the file inaccessible.

  24. How does a file allocation table (FAT) represent linked file blocks?

    It stores each block’s next-block pointer in a central table rather than inside the data block.

  25. What is an advantage of keeping file-block links in a file allocation table?

    The table can be loaded into memory, making it easier and faster to follow a file’s block chain.

  26. What is a risk of using a single file allocation table?

    If the table is damaged, the system may lose access to many files or to the entire disk’s file layout.

  27. How does block size affect a file allocation table?

    Smaller blocks require more table entries; larger blocks reduce the number of entries but may waste more space within files.

  28. What is indexed allocation?

    A file has an index block that lists the disk blocks containing its data.

  29. What is the benefit of indexed allocation over linked allocation?

    The index allows the system to locate a file’s blocks directly rather than following a chain from block to block.

  30. How can multilevel indexing support a file that needs more block addresses than one index can hold?

    An index can point to additional index blocks, which then point to data blocks.

  31. How does the described UFS allocation scheme combine direct and indirect blocks?

    It uses direct pointers to data blocks and single, double, and triple indirect pointers to reach data through one or more index levels.

  32. Why might a file system use direct pointers for frequently accessed files?

    Direct pointers reach data without first reading an index block, reducing access steps.

  33. Why can different devices or workloads use different file systems?

    Different workloads have different performance and storage needs, so a file system can be chosen to suit the device and use case.

  34. What is a linear-list directory structure?

    It stores file names and their directory information in a list that is searched entry by entry.

  35. How can a linked list or B-tree improve directory lookup?

    These structures organize directory information to make access faster than scanning a simple linear list.

  36. How does a hash table support directory lookup?

    A hash function maps a file name to a value used to locate its directory entry quickly.

  37. What is a hash collision in a directory hash table?

    It occurs when different inputs map to the same hash value and must be handled by the table’s design.

  38. What is a disadvantage of hash-based directory organization?

    Hash functions can be costly to design and compute, and collisions require additional handling.

  39. What is a bitmap method for tracking free disk blocks?

    It assigns one bit to each block to indicate whether that block is free or in use.

  40. How much space does a bitmap need for a disk with 2282^{28}228 blocks?

    It needs 2282^{28}228 bits, or 2252^{25}225 bytes if each bit is stored in a byte-packed bitmap.

  41. How can a linked free list track unused disk blocks?

    The system stores a pointer to the first free block, and each free block points to the next one.

  42. What is one advantage of a linked free list over a bitmap?

    It can provide a free block quickly by taking the block at the head of the list.

  43. What is a space map, and why might large storage systems use one?

    It is a method for tracking free space that can be organized to suit large storage systems and their allocation needs.

  44. What is internal fragmentation in file storage?

    It is unused space inside an allocated block when a file does not fill the entire block.

  45. How does a magnetic disk store data?

    It records data by magnetizing regions of its surface in different directions.

  46. What are the main components of a magnetic hard disk?

    It has rotating platters and read/write heads that move across the platters to access data.

  47. Why is a physical shock dangerous to a hard disk?

    A read/write head can contact the disk surface and damage it.

  48. What is seek time?

    The time required for a disk’s read/write head to move to the requested track or cylinder.

  49. What is rotational latency?

    The time spent waiting for the desired sector to rotate under the read/write head.

  50. What is disk access latency?

    The time needed to position the head and wait for the desired data to rotate into place; it includes seek time and rotational latency.

  51. What factors contribute to total disk I/O time?

    Seek time, rotational latency, data transfer time, and controller overhead.

  52. How does a disk controller relate to a computer and a storage device?

    The computer communicates with the disk controller, which manages communication with the storage device.

  53. What is a key trade-off between SSDs and magnetic hard disks?

    SSDs generally offer faster access but cost more per unit of storage; magnetic disks generally offer more storage for less cost but are slower.

  54. Why do SSDs use wear-leveling software?

    Because memory cells have limited write cycles, wear leveling spreads writes across the cells.

  55. How does magnetic tape compare with disks and SSDs?

    It can store large amounts of data at low cost, but access is slow.

  56. What does the storage trade-off phrase “pick two” refer to?

    A storage solution may offer low cost, high speed, and large capacity, but it is difficult to maximize all three at once.

  57. What is read-ahead in file-system caching?

    The system fetches data beyond the currently requested block because nearby data may be needed soon.

  58. Why might a file system cache directory information or repeated requests?

    Keeping likely-to-be-used information in memory can reduce slower accesses to external storage.

  59. What is a storage area network (SAN)?

    A network that connects systems to shared storage devices, such as disks, SSDs, or tapes.

  60. What does the term “cloud storage” mean in the lecture’s explanation?

    Storage hosted on computers elsewhere and accessed over a network.

  61. How can network-attached storage (NAS) appear to a user?

    It can appear as a drive in a file explorer, even though the data is stored on a separate network-connected device.

  62. What is the purpose of a network protocol such as TCP in remote storage access?

    It provides rules for sending data across a network.

  63. How can multiple storage devices improve read performance?

    Data can be distributed across devices so that multiple devices provide blocks in parallel.

  64. Why might a storage network use optical fiber instead of copper?

    An optical connection can provide faster communication for storage traffic.

  65. Why can scaling up cloud or network storage make performance harder to manage?

    Many devices and users may access storage at once, increasing contention and the amount of data the system must serve.

  66. What is first-come, first-served (FCFS) disk scheduling?

    It services disk requests in the order they arrive.

  67. What is shortest seek time first (SSTF) disk scheduling?

    It services the pending request closest to the current head position.

  68. What is a potential fairness problem with SSTF?

    Requests far from the current head position may wait a long time if closer requests keep arriving.

  69. What does aging achieve when applied to disk I/O requests?

    It increases the priority of requests that have waited longer, helping prevent indefinite postponement.

  70. What is SCAN disk scheduling?

    The disk head moves in one direction, servicing requests along the way, then reverses direction and continues.

  71. What is the key difference between SCAN and C-SCAN?

    SCAN reverses direction at the end of its sweep; C-SCAN returns to the other end and services requests in only one direction.

  72. What is LOOK disk scheduling?

    The head moves in one direction only as far as the last pending request, then reverses.

  73. What is C-LOOK disk scheduling?

    The head services requests in one direction to the last request, then jumps back to the first request at the other end of the pending range.

  74. How does disk workload influence the choice of scheduling algorithm?

    Different algorithms suit different workloads: SSTF may work well under lighter loads, while SCAN-style algorithms can be useful under heavier loads.

  75. Why can disk scheduling algorithms have significant value in large systems?

    Small reductions in access time can produce large performance gains when many disk requests are processed.

  76. What does formatting a disk do?

    It establishes the organization needed for the disk to be used, including sectors and other addressable structures.

  77. What is a partition in disk management?

    A logical division of a disk’s addressable storage into a separate unit.

  78. Must all partitions on a disk use the same file system?

    No. Different partitions can use different file systems.

  79. What is a cluster in disk storage?

    A group of blocks treated together for storage allocation or I/O.

  80. What is raw disk access?

    Direct access to a disk partition without relying on a general-purpose file system to organize it.

  81. What information can a master boot record contain?

    Boot code and a partition table that identifies partitions and helps select one to boot.

  82. What is swap space?

    Disk space used as an extension of memory when the operating system needs to move memory contents to storage.

  83. Why might an operating system keep swap space contiguous?

    Contiguous placement can avoid extra disk movement and improve access performance.

  84. How can Windows manage swap-file size?

    It can adjust the swap file according to the operating system’s requirements, within configured limits.

  85. What does RAID stand for?

    Redundant array of independent disks.

  86. How can RAID improve read performance?

    It can distribute data across disks so that parts of a request are read in parallel.

  87. How does disk mirroring provide redundancy?

    It stores a duplicate copy of data on another disk.

  88. How can parity or another redundancy algorithm help when a disk fails?

    It can use information distributed across multiple disks to reconstruct missing data.

  89. What is hot swapping in a storage system?

    Replacing a failed disk while the system remains powered on and operating.

  90. What is one trade-off of using mirrored disks?

    Mirroring increases redundancy but reduces usable capacity because data is stored on multiple disks.

  91. Why does adding more disks not guarantee that a system will never lose data?

    More disks can increase total capacity, but disks can still fail; redundancy and recovery design determine how failures affect data.

Card 1 of 91
Card 1 of 91

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent