File System Implementation
- 87Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What is the difference between a logical file system and the physical storage of files?
87 questions
- 1
What is the difference between a logical file system and the physical storage of files?
Model answer
The logical file system presents files and directories in a consistent form, while physical storage describes where their data is actually located on a device.
Explanation
A logical filename such as
Fred.txtcan map to particular physical disk blocks. - 2
How do layers in a file system help applications work with different storage devices?
Model answer
Layers hide device-specific details from applications. Device drivers and lower file-system layers handle communication with the particular hardware.
Explanation
An application can use the same logical interface whether its data is stored on a hard disk, USB drive, or another device.
- 3
What role does a device driver play in file-system access?
Model answer
A device driver provides the operating system with a way to communicate with a particular type of hardware while presenting a consistent interface to higher layers.
Explanation
The driver handles device-specific input and output, so higher layers need not manage the hardware directly.
- 4
How is a logical filename connected to the physical location of its data?
Model answer
The file system uses organizational metadata to map the logical filename to the physical blocks containing its data.
Explanation
For example, opening a named file can ultimately prompt the system to retrieve particular blocks from a disk.
- 5
What is a file control block, and what kind of information can it contain?
Model answer
A file control block stores information used to identify and manage a file, such as its name, state, and location-related details. Depending on the file system, it can also contain additional indexing or linking information.
Explanation
The file control block is part of the metadata needed to manage and retrieve a file.
- 6
Why must file data be brought into memory before it can be worked on?
Model answer
The system transfers data from storage into memory so that programs and the processor can work with it.
Explanation
The storage device holds data, but processing takes place using data available in memory.
- 7
What is a mount point, and what information does the operating system need when mounting a file system?
Model answer
A mount point is the location through which a mounted file system is made accessible. The operating system needs to know the file-system type and the information and operations associated with it.
Explanation
Mounting makes a device's files available within the system's logical file structure.
- 8
Why might a system mount some storage devices at startup but mount others only when needed?
Model answer
Internal devices are commonly mounted at startup, while removable or external devices can be mounted on demand when they are connected or accessed.
Explanation
On-demand mounting accommodates devices such as USB drives that may not be present when the system starts.
- 9
What is the difference between a partition and a volume?
Model answer
A partition is a physical division of a disk, whereas a volume is a logical storage unit that can span more than one physical disk.
Explanation
A volume presents storage logically and need not correspond to just one physical disk.
- 10
Why can adding layers to a file system reduce complexity but also slow operations?
Model answer
Layers separate responsibilities and hide device differences, making the system easier to manage. However, each layer adds processing overhead as requests pass through it.
Explanation
A request may travel through several file-system components before reaching the device.
- 11
Why might an operating system ask to check a newly connected drive, and what are two possible underlying problems?
Model answer
The drive may contain file-system metadata created by another operating system, or its metadata may be damaged. The operating system may check it because it cannot confidently interpret or access the file system.
Explanation
Problems with directory structures or file control blocks can make otherwise present files difficult to locate.
- 12
What is the purpose of a boot control block?
Model answer
A boot control block contains information used in starting the system from a device, including the means to locate or begin loading the operating system.
Explanation
During startup, the machine checks a bootable device and transfers control to its boot information.
- 13
Why does a file system need to keep track of directories as well as files?
Model answer
Directory information organizes files and allows the system to locate them through the logical file-system structure.
Explanation
The system must be able to find a file within its directory before retrieving its file-control information and data.
- 14
How does a disk organize data into physical units, and how does that relate to a block?
Model answer
A disk is organized into tracks and sectors; a track-sector location identifies a block that can be addressed for storage or retrieval.
Explanation
Blocks provide units that the file system can locate and transfer on the device.
- 15
What is a cylinder in a multi-platter disk?
Model answer
A cylinder is the set of corresponding tracks at the same radial position across the disk's platters.
Explanation
The disk's read/write heads access tracks at particular positions as they move across the platters.
- 16
How does the operating system translate a logical file request into a disk operation?
Model answer
It uses file-system metadata to identify the physical blocks for the file, then directs the device to retrieve those blocks into memory.
Explanation
The logical name is resolved into physical locations that the device can access.
- 17
What is the trade-off involved in choosing a disk block size?
Model answer
Large blocks reduce the number of blocks that must be tracked but can waste space when files are small. Small blocks reduce wasted space but increase the amount of allocation information to manage.
Explanation
The file system balances storage efficiency against metadata and management overhead.
- 18
Why does using more, smaller disk blocks increase file-system bookkeeping?
Model answer
The system must track more individual blocks and record which blocks belong to each file.
Explanation
More blocks require more allocation entries or pointers to describe file locations.
- 19
What is contiguous allocation, and what is its main advantage?
Model answer
Contiguous allocation stores a file in consecutive disk blocks. It is simple to manage and allows the system to read a run of blocks directly.
Explanation
The file's location and length can identify a continuous region of storage.
- 20
What are two problems that can arise with contiguous allocation?
Model answer
Free space can become fragmented, leaving no large enough continuous region for a file. A file that grows may also outgrow its allocated region and need to be moved.
Explanation
A disk can have enough total free space but lack enough adjacent blocks to hold a file.
- 21
What is an extent-based allocation system?
Model answer
It allocates a file in one or more contiguous runs called extents, adding further extents when the file grows.
Explanation
Each extent can be accessed as a run of blocks, while metadata links the file to its multiple extents.
- 22
How does linked allocation store a file, and what marks the end of the file?
Model answer
The file's blocks can be stored in different disk locations, with each block pointing to the next. A null or nil pointer marks the end.
Explanation
The system follows the pointers from one block to the next to read the file.
- 23
What is an advantage and a disadvantage of linked allocation?
Model answer
It can use scattered free blocks without requiring one large contiguous area. However, accessing later blocks requires following links, potentially causing extra disk movement and delay.
Explanation
A file's blocks may be physically far apart even though its logical sequence is linked.
- 24
What risk arises if a pointer in a linked file becomes corrupted?
Model answer
The system may lose the path to the remaining blocks, making part or all of the file inaccessible.
Explanation
A damaged pointer can break the chain that connects the file's blocks.
- 25
How does a file allocation table represent the links between a file's blocks?
Model answer
It stores block-link information in a central table rather than storing each link within its corresponding data block.
Explanation
The table records which block follows another in a file's allocation chain.
- 26
What is one benefit and one risk of keeping file-allocation links in a table?
Model answer
The table can be brought into memory to help locate blocks quickly. If the table is damaged, however, access to many files on the disk may be lost.
Explanation
Centralized allocation information improves lookup convenience but can become a critical point of failure.
- 27
How does indexed allocation locate a file's data blocks?
Model answer
An index block lists the locations of the file's data blocks, allowing the system to find them through that index.
Explanation
The file is associated with an index block that contains its block addresses.
- 28
How can multi-level indexing accommodate files that need more block addresses than one index block can hold?
Model answer
An index entry can point to another index block, which in turn points to further indexes or to the data blocks.
Explanation
Adding index levels expands the number of data-block addresses the system can represent.
- 29
What allocation approach does the described Unix file system use for direct, single-indirect, and double-indirect blocks?
Model answer
It combines direct pointers to data blocks with single-indirect pointers to an index and double-indirect pointers that lead through an additional index level.
Explanation
The different pointer types provide ways to locate file data at different levels of indirection.
- 30
In the described Unix file system, what limits follow from using 4-kilobyte blocks and 32-bit block addresses?
Model answer
The addressing scheme can identify at most 232 blocks, so the maximum addressable storage is 232×4 kilobytes.
Explanation
The number of addressable blocks multiplied by the block size gives the storage limit.
- 31
Why might sequential storage be suitable for a DVD but a less suitable choice for a workload requiring frequent access to scattered data?
Model answer
A DVD is commonly read as a sequential stream, so simple sequential access suits its use. Scattered access can require repeated movement across the storage medium.
Explanation
File-system choices should reflect the access pattern and workload.
- 32
How can a directory implemented as a linear list affect file lookup?
Model answer
The system may need to scan entries one by one until it finds the requested file, so lookup can become slow as the list grows.
Explanation
A long list requires checking many entries to locate a particular name.
- 33
How can linked lists or B-trees improve directory organization compared with a simple linear list?
Model answer
They provide alternative organizational structures that can make it faster to locate directory information than scanning a long linear list.
Explanation
The source identifies both as faster ways to access organized data.
- 34
How does a hash table help locate a file, and what is a hash collision?
Model answer
A hash function maps a file name to a value used to find its entry quickly. A collision occurs when different inputs map to the same value.
Explanation
A hash-based structure must include a way to handle collisions rather than assume every name maps uniquely.
- 35
Why can a hash-based directory be faster to search but more complex to implement?
Model answer
The hash value can guide the system directly to an entry instead of requiring a full list scan. Designing the function and handling collisions add complexity.
Explanation
Fast lookup depends on both the hash function and the structure's collision-handling method.
- 36
How can a bitmap represent whether disk blocks are free or in use?
Model answer
It assigns one bit to each block and uses one bit value to represent free space and the other to represent allocated space.
Explanation
Either convention can be used, provided the system interprets it consistently.
- 37
For a 1-terabyte disk with 4-kilobyte blocks, how many bits are needed for a one-bit-per-block bitmap, and why can this be costly?
Model answer
The disk contains 228 blocks, so the bitmap needs 228 bits, or 225 bytes. This is substantial space used just to track whether blocks are free or allocated.
Explanation
The number of blocks is the disk capacity divided by the block size; one bitmap bit is then required for each block.
- 38
How does a free-space linked list work when the system allocates a block?
Model answer
The list links free blocks together. To allocate one, the system takes the block at the list's head and updates the head to the next free block.
Explanation
The new head is obtained from the link stored for the allocated block.
- 39
What are two ways to refine free-space tracking beyond a basic linked list?
Model answer
The system can record groups of free blocks or keep track of how many free blocks are available.
Explanation
These approaches can make free-space management more suitable for a particular system.
- 40
Why can large storage systems use a different free-space strategy from a personal computer?
Model answer
Their scale and workloads differ, so they may need a management structure designed for much larger amounts of storage and different performance demands.
Explanation
The described system uses space maps for large storage environments, illustrating that free-space methods depend on scale.
- 41
How can caching or buffering improve file-system performance?
Model answer
Frequently used or recently accessed data can be kept in memory, reducing the need to retrieve it again from slower storage.
Explanation
A later request for cached data may be served from memory rather than the disk.
- 42
What is read-ahead, and when can it help?
Model answer
Read-ahead retrieves data that is likely to be needed next while the current data is being accessed. It helps when the prediction is correct.
Explanation
For example, after requesting one block, the system may fetch the following block in advance.
- 43
How does a magnetic disk store data?
Model answer
It represents data by magnetizing regions of its surface in different directions.
Explanation
The magnetic orientation of a region encodes a bit value.
- 44
What is seek time, and what is rotational latency?
Model answer
Seek time is the time taken to move the disk head to the required track. Rotational latency is the time spent waiting for the desired part of the rotating disk to reach the head.
Explanation
Both contribute to the time needed to position a magnetic disk for access.
- 45
How does increasing a magnetic disk's rotational speed affect rotational latency?
Model answer
It reduces rotational latency because the disk takes less time to rotate the desired data under the head.
Explanation
A faster rotation means a shorter wait for the required sector to arrive.
- 46
What components contribute to a disk read's overall access time?
Model answer
Access time includes positioning the head and waiting for rotation, along with controller overhead and the time to transfer data.
Explanation
The total depends on the disk, its controller, and the transfer rate.
- 47
What does a disk controller do?
Model answer
It sits between the computer and the disk and manages how requests are handled by the storage device.
Explanation
The computer communicates with the controller, which coordinates access to the disk.
- 48
Why can solid-state drives provide faster access than magnetic disks, and what trade-offs do they involve?
Model answer
SSDs avoid the mechanical seek and rotational delays of magnetic disks, so they can provide faster access. They have generally been more expensive per unit of capacity and may offer less capacity for a given cost.
Explanation
Differences in speed, cost, and storage capacity influence which device is suitable.
- 49
Why may an SSD use wear-leveling software?
Model answer
SSD memory cells have a limited number of write cycles, so wear-leveling spreads writes across the device to avoid using some cells disproportionately.
Explanation
Distributing writes helps manage the finite write endurance of the cells.
- 50
Why is magnetic tape still useful despite being slow to access?
Model answer
It can store a large amount of data at low cost, making it useful when capacity and cost matter more than access speed.
Explanation
Tape illustrates a storage trade-off: substantial, inexpensive storage can be slow.
- 51
What trade-off among speed, cost, and capacity is illustrated by storage media?
Model answer
Storage choices balance speed, cost, and capacity; a device offering large capacity at low cost may be slow, while a fast, high-capacity option may be more expensive.
Explanation
No single storage choice necessarily maximizes all three properties at once.
- 52
Why does external storage usually take longer to access than memory?
Model answer
Storage devices and their connections have access and transfer delays that memory does not incur to the same extent.
Explanation
The delay can be large enough to consume substantial processor time compared with executing instructions.
- 53
What is a storage area network, and how does it extend the idea of local storage?
Model answer
A storage area network connects storage devices over a network so that systems can access storage that is separate from their local machines.
Explanation
It applies network connectivity to shared storage rather than only connecting computers.
- 54
What does it mean to say that cloud storage is a computer somewhere else?
Model answer
Cloud storage is provided by remote computers and storage systems accessed over a network, rather than by a nebulous or purely abstract resource.
Explanation
The user interface can make remote storage appear much like a local drive.
- 55
How can networked storage appear in a user's file explorer without requiring the user to manage the network details?
Model answer
The operating system presents the remote storage as a logical drive or file-system location and handles the underlying network communication.
Explanation
Abstraction allows users to work with files without directly managing the remote hardware or network protocol.
- 56
What is network-attached storage, and how might a user access it?
Model answer
Network-attached storage is a storage device connected to a network, such as a drive connected to a router. It can be presented to a computer as an accessible drive.
Explanation
The operating system can direct files and backups to the network device through that drive location.
- 57
How can a storage network improve performance by distributing a file across multiple devices?
Model answer
If blocks are spread across devices, several devices can provide different blocks in parallel instead of one device supplying them all in sequence.
Explanation
Parallel access can reduce the wait for a large set of data.
- 58
Why might a large storage network use faster connections such as optical links?
Model answer
Faster connections can increase the rate at which data moves between storage and users, helping address network bottlenecks.
Explanation
Connection type becomes important when many devices and users access large amounts of data.
- 59
Why must large storage networks consider duplication and backup?
Model answer
They contain many devices and serve many users, so failures and data loss must be addressed through suitable duplication or backup strategies.
Explanation
A larger system has more storage components to manage and protect.
- 60
What is disk scheduling, and what is it intended to improve?
Model answer
Disk scheduling determines the order in which pending disk requests are serviced. It aims to reduce unnecessary movement of the disk head and improve access performance.
Explanation
Reordering requests can reduce the distance the head travels between requested locations.
- 61
How does first-come, first-served disk scheduling work, and what is its main drawback?
Model answer
It serves requests in the order they arrive. The head may travel back and forth across the disk, causing substantial movement.
Explanation
Arrival order does not account for the physical locations of the requested data.
- 62
How does shortest-seek-time-first scheduling choose the next disk request?
Model answer
It chooses the pending request closest to the current head position.
Explanation
Selecting the nearest request can reduce immediate head movement.
- 63
What fairness problem can arise with shortest-seek-time-first scheduling?
Model answer
Requests that are farther away may be postponed repeatedly if closer requests keep arriving, so some requests can wait for a long time.
Explanation
The strategy prioritizes proximity rather than ensuring every request is serviced promptly.
- 64
How can aging help address starvation in disk scheduling?
Model answer
Aging can increase the priority of requests that have waited for a long time, helping ensure they are eventually serviced.
Explanation
This counters repeated postponement of requests that are not currently close to the head.
- 65
How does the SCAN disk-scheduling algorithm service requests?
Model answer
The head moves in one direction, servicing requests along the way, then reverses direction and continues servicing requests.
Explanation
Its back-and-forth sweep resembles a lift serving floors along its route.
- 66
How does C-SCAN differ from SCAN?
Model answer
C-SCAN services requests in one direction; after reaching the end, the head returns to the beginning without servicing requests on the return trip.
Explanation
It operates like a circular sweep rather than reversing direction while serving requests.
- 67
How does LOOK differ from a scan that travels all the way to the physical end of the disk?
Model answer
LOOK reverses direction at the last pending request in that direction instead of travelling to the disk's physical end when no request is there.
Explanation
It avoids movement beyond the furthest request that needs service.
- 68
Why can the best disk-scheduling algorithm depend on system workload?
Model answer
Different request loads and usage patterns favor different trade-offs in movement, waiting time, and fairness.
Explanation
A strategy suitable for a lightly loaded desktop may not be ideal for a heavily loaded server.
- 69
Why might organizations value small improvements in disk-scheduling performance?
Model answer
In systems serving many requests, reducing the time for each access can produce a substantial overall performance gain.
Explanation
Small savings can accumulate across a large number of disk operations.
- 70
What does formatting a disk do?
Model answer
Formatting establishes structures such as sectors that allow the storage device to be addressed and used for data.
Explanation
The disk's physical surface does not by itself specify the organization the file system needs.
- 71
How can formatted sectors be grouped into partitions?
Model answer
Sectors can be grouped into partitions, each of which acts as a logical disk.
Explanation
Partitions divide a physical disk into separate logical storage areas.
- 72
Must every partition on a disk use the same file system?
Model answer
No. Different partitions can use different file systems.
Explanation
The file-system choice can vary according to the purpose of each partition.
- 73
What is a recovery partition, and why might a computer have one?
Model answer
It is a separate partition that can hold recovery information used to restore the computer.
Explanation
A startup option can direct the system to boot from the recovery partition rather than the usual system partition.
- 74
What is a cluster in relation to disk blocks?
Model answer
A cluster is a group of blocks treated together as a unit for some file-system operations.
Explanation
A request for a cluster can involve several underlying blocks.
- 75
What is raw disk access, and why might an application request it?
Model answer
Raw disk access lets an application work directly with a partition without relying on a general-purpose file system. An application may use it to organize storage in a way suited to its own needs.
Explanation
Direct control can support an application's specific performance or access requirements.
- 76
What information can a master boot record contain?
Model answer
It can contain boot code and a partition table that identifies partitions and helps determine which one to boot.
Explanation
The boot process uses this information to select a starting point for loading an operating system.
- 77
How can a computer with multiple partitions allow a user to choose which operating system to start?
Model answer
The boot process can use the partition information to select a partition containing a particular operating system.
Explanation
Different partitions can contain different operating systems, and the boot selection determines which one is loaded.
- 78
What is swap space, and why is it treated as a special storage area?
Model answer
Swap space is disk space used in connection with virtual memory. It may be kept in a separate partition or managed within a file, depending on the operating system.
Explanation
Swap supports memory management and is handled differently from ordinary user files.
- 79
Why might an operating system try to keep swap space contiguous?
Model answer
Contiguous placement can reduce storage access overhead when the system uses swap space.
Explanation
The system may place or manage swap specially to avoid scattered disk access.
- 80
What is RAID, and what storage goals can it support?
Model answer
RAID combines multiple disks into an array that can be managed as storage. Depending on its design, it can improve performance, provide redundancy, or support larger storage arrangements.
Explanation
Different RAID levels make different trade-offs among speed, capacity, and data protection.
- 81
How can splitting data across multiple disks improve read performance?
Model answer
Different parts of the data can be read from multiple disks in parallel rather than waiting for one disk to provide all of them.
Explanation
Parallel reads can increase the rate at which data is delivered.
- 82
How does mirroring protect data, and what is its storage-capacity cost?
Model answer
Mirroring stores the same data on more than one disk, providing a copy if one disk fails. Because data is duplicated, usable capacity is reduced.
Explanation
For example, two disks used as mirrors provide less unique storage than using both disks independently.
- 83
How can parity or another redundant-data method help recover from a disk failure?
Model answer
Redundant information can be distributed across disks so that missing data can be reconstructed if a disk fails.
Explanation
The recovery method uses the remaining data and redundancy to fill in the lost information.
- 84
What is hot swapping in a disk system?
Model answer
Hot swapping is replacing a failed disk while the system remains powered on and continues operating.
Explanation
A compatible system can detect and use the replacement without shutting down.
- 85
Why does reliable RAID operation depend on software as well as hardware?
Model answer
The system needs software that manages the disks and implements the chosen redundancy or performance scheme; hardware alone does not determine how the array behaves.
Explanation
The RAID arrangement relies on coordinated control of its disks.
- 86
How can a disk controller with memory improve a multi-disk storage system?
Model answer
Controller memory can be used for buffering or caching, helping manage data transfers and potentially improve performance.
Explanation
Temporary or frequently used data can be handled more efficiently by the controller.
- 87
Why should the choice of RAID level depend on the system's use case?
Model answer
RAID levels differ in how they balance capacity, performance, and redundancy, so the appropriate choice depends on the system's priorities.
Explanation
A configuration that favors redundancy may provide less usable capacity than one focused on storage space.

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