File Systems and Storage Management Practice Quiz (34 questions)

All questions and answers

1. Which description best defines a file in an operating system?

A named collection of related information on secondary storage, represented only as bytes with a fixed meaning
A named collection of unrelated information on secondary storage, represented in forms whose meaning is defined by its creator and user
A named collection of related information held in main memory, represented in forms whose meaning is defined by its creator and user
A named collection of related information on secondary storage, represented in forms whose meaning is defined by its creator and user

A named collection of related information on secondary storage, represented in forms whose meaning is defined by its creator and user

Explanation

A file is named, contains related information, and is recorded on secondary storage; its bits, bytes, lines, or records get their meaning from its creator and user. Treating the contents as unrelated or locating them in main memory changes the definition.

2. Two files contain different kinds of data and have different internal organizations. What best explains this difference?

Their creators determine the information and structure, which depend on each file's type
Their storage devices determine the information and structure, which depend on each device's capacity
Their names determine the information and structure, which depend on each file's location
Their operating systems impose the same information and structure on every file type

Their creators determine the information and structure, which depend on each file's type

Explanation

The information in a file is defined by its creator, and its structure depends on its type. A shared structure for every file type or a structure determined by the device does not fit this principle.

3. A system records a file's protection settings and its last-use time. Which set of other items consists of typical file attributes?

Name, type, protection, storage device, and creation, modification, and use time, date, and user identification
Directory entry, read operation, write operation, seek position, and creation, modification, and use time, date, and user identification
Name, identifier, type, location, size, and creation, modification, and use time, date, and user identification
Contents, open operation, read pointer, write pointer, and creation, modification, and use time, date, and user identification

Name, identifier, type, location, size, and creation, modification, and use time, date, and user identification

Explanation

Typical attributes include a file's name, identifier, type, location, size, protection, and relevant time, date, and user identification. Contents and read, write, or seek operations are not attributes, while the listed attribute set also includes the identifier.

4. An application is creating a new file. Which two actions are required to complete the creation?

Find space in the file system and reset an existing file's length to zero
Release space in the file system and remove an entry from the directory
Add a new-file entry to the directory and release its allocated space
Find space in the file system and add a new-file entry to the directory

Find space in the file system and add a new-file entry to the directory

Explanation

Creating a file requires locating space in the file system and adding an entry for it in the directory. Releasing space and removing an entry are associated with deletion, while resetting length describes truncation.

5. A process reads a file and then writes to it, performing one operation at a time. How can the operating system track where the next operation should occur?

Use a shared current-position pointer that advances after each read or write
Use a directory entry as the position marker and leave it unchanged after I/O
Use separate read and write pointers that both remain at the starting position
Use a shared current-position pointer that remains fixed after each read or write

Use a shared current-position pointer that advances after each read or write

Explanation

File reads and writes use system calls and a file-position pointer that advances after each operation; when a process uses one operation at a time, both can use a shared current-position pointer. Separate fixed pointers fail to track progress.

6. An administrator removes a file's contents but keeps its file record and attributes. Which operation has been performed?

Creation, which allocates space and adds a new directory entry
Truncation, which resets the file length to zero while preserving its attributes
Repositioning, which changes the current file position without changing its contents
Deletion, which removes the directory entry while releasing the file space

Truncation, which resets the file length to zero while preserving its attributes

Explanation

Truncation releases a file's contents and resets its length to zero while preserving its attributes. Deletion instead removes the directory entry and releases the file's space.

7. An operating system leaves applications to interpret most input-file structures. What file structure must it still support so that programs can start?

An executable-file structure
A database-table structure
A spreadsheet-file structure
A compressed-archive structure

An executable-file structure

Explanation

The operating system must support an executable-file structure to load and run programs, even when applications interpret other input files themselves. Spreadsheet, database, and archive structures are examples of other formats, not the required program-loading structure.

8. A program reads a record, then requests the next record; each read advances its position through the file. Which access method is it using?

Extension-based identification
Index access
Sequential access
Direct access

Sequential access

Explanation

Sequential access processes records in order, and each read-next operation advances the file pointer. Direct access selects a numbered block, while index access locates a block through pointers.

9. A data file contains numbered fixed-length blocks, and a program reads block 28 before writing block 4. Which method permits this order?

Index access
Extension-based identification
Sequential access
Direct access

Direct access

Explanation

Direct access treats a file as numbered fixed-length logical blocks that can be read or written in any order by specifying a block number. Sequential access advances through records in order, whereas index access follows a pointer found through an index.

10. A file administrator wants the system to control whether users can list a directory or append to a file. What does file protection control?

File-name extensions
Executable-file loading
Record ordering
Requested file operations

Requested file operations

Explanation

File protection controls requested operations, including listing and appending as well as reading, writing, executing, and deleting. User identity records are associated with access-control mechanisms, not the operations themselves.

11. A directory stores user names alongside the operations each person is permitted to perform. Which mechanism does this describe?

An access-control list
A file-operation check
An rwx permission scheme
A per-file password system

An access-control list

Explanation

An access-control list associates a file or directory with user names and the types of access permitted to each user. The rwx scheme uses owner, group, and universe fields, while a password system relies on passwords rather than a user-and-permission list.

12. A system assigns permissions using three user categories and three-bit fields where r, w, and x represent read, write, and execute. Which protection scheme is being used?

A shared-password scheme
Owner-group-universe rwx fields
A per-file access-control list
A sequential access method

Owner-group-universe rwx fields

Explanation

The compact scheme divides users into owner, group, and universe and uses three permission fields that may encode read, write, and execute as rwx bits. An ACL instead associates named users with permitted access, and password schemes rely on passwords rather than these fields.

13. Which set correctly identifies the principal on-disk structures of a file system?

A per-volume boot control block and volume control block, plus a per-file directory structure and per-volume file control block
A mount table and directory cache, a system-wide open-file table, and per-process open-file tables
A per-volume boot control block and volume control block, a file-system directory structure, and a per-file file control block
A per-volume boot control block, a system-wide open-file table, a directory cache, and per-file buffers

A per-volume boot control block and volume control block, a file-system directory structure, and a per-file file control block

Explanation

The on-disk structures include two per-volume blocks, the file-system directory structure, and an FCB for each file. Mount tables and open-file tables are in-memory structures; the other alternatives misassign or omit the per-file FCB.

14. A process opens a file that is not already open by any process. After the directory search finds it, what does the system do next?

Copies the directory structure into the system-wide table and creates a per-process entry pointing to it
Copies the FCB into the per-process table and creates a system-wide entry pointing to it
Creates a system-wide entry for the file but does not add a per-process entry
Copies the FCB into the system-wide open-file table and creates a per-process entry pointing to it

Copies the FCB into the system-wide open-file table and creates a per-process entry pointing to it

Explanation

When an unopened file is found, its FCB is copied into the system-wide open-file table, and the process gets an entry pointing to that system-wide entry. Storing the FCB only per process reverses the roles of the tables, while copying the directory or omitting the process entry misstates the opening sequence.

15. A file-system implementation needs to track mounted volumes, retain recently accessed directory information, record open files system-wide and per process, and hold blocks during disk I/O. Which collection provides these in-memory functions?

A mount table, directory cache, system-wide and per-process open-file tables, and I/O buffers
A boot control block, volume control block, directory structure, and per-file FCBs
A directory cache, system-wide open-file table, volume control block, and boot control block
A mount table, directory structure, per-file FCBs, and free-block pointers

A mount table, directory cache, system-wide and per-process open-file tables, and I/O buffers

Explanation

The in-memory structures comprise the mount table, directory cache, both levels of open-file tables, and buffers for blocks being read or written. Boot and volume control blocks are on-disk structures, and a directory structure is not the same as its in-memory cache.

16. A directory stores file names and data-block pointers in a sequential list, and the system checks entries one by one to find a requested file. Which directory organization is being used?

A sorted-list directory
A chained-overflow hash directory
A hash-table directory
A linear-list directory

A linear-list directory

Explanation

A linear-list directory holds names and pointers in a sequential list, so finding an entry requires a linear search. A hash table uses a filename-derived value, a sorted list can use binary search, and chained overflow handles hash collisions.

17. A directory retains entries in a linear list but calculates a value from each requested file name to locate a pointer to the matching name. Which organization describes this lookup?

A chained-overflow directory
A hash-table directory
A linear-list directory
A sorted-list directory

A hash-table directory

Explanation

A hash-table directory computes a value from the file name and uses it to return a pointer to the corresponding name in the linear list. A linear list searches sequentially, a sorted list supports binary search, and chained overflow addresses collisions.

18. A directory entry for a file records its starting disk block and allocated length. Which allocation method does this describe?

Contiguous allocation
Linked allocation
Indexed allocation
Clustered allocation

Contiguous allocation

Explanation

Contiguous allocation stores a file in consecutive disk blocks and records the starting block and allocated length in its directory entry. Linked allocation uses pointers between potentially scattered blocks; indexed and clustered allocation describe different arrangements.

19. A workload needs both sequential reading and direct access to file blocks while keeping disk seeks low. Which allocation method best fits these needs?

Extent-based allocation
Contiguous allocation
Indexed allocation
Linked allocation

Contiguous allocation

Explanation

Contiguous allocation supports both sequential and direct access, and its consecutive blocks usually require few disk seeks. Linked allocation is efficient for sequential access but requires following pointers to locate a particular block.

20. A disk manager selects holes using first-fit and best-fit, but repeated file creation and deletion leave free space split into many small pieces. What problem has developed?

External fragmentation
Pointer overhead
Sequential-access delay
Internal fragmentation

External fragmentation

Explanation

Repeated allocation and deletion can divide free disk space into small holes, causing external fragmentation even when first-fit or best-fit is used. Internal fragmentation is unused space within allocated storage, while pointer overhead is space used to store links.

21. A file's blocks may lie in different disk locations, each block points to the next, and the directory identifies the first and last blocks. Which allocation method is this?

Linked allocation
Indexed allocation
Clustered allocation
Contiguous allocation

Linked allocation

Explanation

Linked allocation represents a file as potentially scattered blocks connected by pointers, with the directory pointing to the first and last blocks. Contiguous allocation stores blocks consecutively, while indexed allocation uses an index structure.

22. A file must grow as free blocks become available, and the system should avoid external fragmentation and disk compaction. Which method meets these requirements?

Extent-based allocation
Fixed-size partition allocation
Contiguous allocation
Linked allocation

Linked allocation

Explanation

Linked allocation can add available free blocks to a file as it grows, avoids external fragmentation, and does not require compaction. Contiguous allocation can be constrained by the need for a sufficiently large consecutive free region.

23. A program frequently reads a file from beginning to end but rarely jumps directly to a particular block. Which access pattern is best supported by linked allocation?

Direct access
Sequential access
Indexed access
Random access

Sequential access

Explanation

Linked allocation supports sequential access efficiently because the reader follows each block's pointer to the next. Direct access to a particular block is inefficient because pointers must be followed from the beginning.

24. In an indexed-allocation system, what does the directory store for a file, and what does that referenced block contain?

The file’s data-block addresses; the directory entry contains the index block
The index-block address; the index block contains the file’s data-block addresses
The first data-block address; that block contains the remaining data-block addresses
The last data-block address; each data block contains the next block’s address

The index-block address; the index block contains the file’s data-block addresses

Explanation

The directory stores the address of the file’s index block, which holds addresses of its data blocks. The first-data-block choice confuses the index address with a data address; the directory-entry choice reverses where the pointers are stored; the last-data-block choice describes linked allocation.

25. A program requests the seventh data block of a file stored using indexed allocation. Which lookup gives direct access to that block?

Follow pointers through the first six data blocks
Read the seventh index-block entry as the requested data
Read the sixth index-block entry and follow its address
Read the seventh index-block entry and follow its address

Read the seventh index-block entry and follow its address

Explanation

The ith index-block entry points to the ith file block, so the seventh entry directly identifies the requested block without sequential traversal. Using the sixth entry is an off-by-one error; traversing data blocks confuses indexed with linked access; reading the entry as data confuses an address with the block contents.

26. A technician groups together all tracks located at the same disk-arm position. What is this group called, and how are the platter surfaces organized?

A cylinder; surfaces are divided into tracks, which are subdivided into sectors
A block group; surfaces are divided into sectors, which are subdivided into tracks
A track; surfaces are divided into sectors, which are subdivided into cylinders
A sector; surfaces are divided into cylinders, which are subdivided into tracks

A cylinder; surfaces are divided into tracks, which are subdivided into sectors

Explanation

A cylinder is the set of tracks at one arm position, while each platter surface is organized into tracks and sectors. Calling the group a sector confuses a subdivision with the aligned tracks; calling it a track confuses one circular path with the set of tracks; the block-group choice does not describe this physical layout.

27. A magnetic disk is servicing a request: first its arm moves to the cylinder containing the target, then the platter rotates until the target sector reaches the head. Which terms describe these two delays, in order?

Seek time, then rotational latency
Rotational latency, then seek time
Positioning time, then transfer rate
Transfer rate, then seek time

Seek time, then rotational latency

Explanation

Seek time is the arm’s movement to the desired cylinder; rotational latency is the wait for the desired sector to rotate under the head. Reversing the terms swaps the two mechanisms, transfer rate measures data flow rather than arm movement, and positioning time is the combined delay rather than one of its two parts.

28. A facility is choosing storage for a workload where faster access, greater reliability, and lower power use are priorities. Which characteristic of an SSD supports choosing it over a magnetic disk?

It uses a moving head but avoids rotational latency
It has no moving parts, seek time, or rotational latency
It uses a spinning platter with shorter seek time and latency
It loses stored information when power is removed

It has no moving parts, seek time, or rotational latency

Explanation

An SSD is nonvolatile memory used like a hard drive, and its lack of moving parts, seek time, and rotational latency can make it faster, more reliable, and lower-power than a magnetic disk. The spinning-platter and moving-head choices describe mechanical storage, while loss of data without power contradicts nonvolatility.

29. A disk controller is busy, so several I/O requests are waiting in a queue. What decision does disk scheduling make?

Which process should be allowed to issue I/O
Which disk drive should receive the requests
Which pending request to service next
How the data in each request should be encoded

Which pending request to service next

Explanation

Disk scheduling selects the next pending I/O request when the drive or controller is busy. Choosing a drive, encoding data, or granting process access describes a different decision.

30. With the disk head initially at cylinder 53 and the pending queue 98, 183, 37, 122, 14, 124, 65, 67, SSTF is used. How far does the head travel to service the queue?

640 cylinders
299 cylinders
236 cylinders
183 cylinders

236 cylinders

Explanation

SSTF repeatedly services the pending request nearest the current head position, producing a total movement of 236 cylinders for this queue. The 640-cylinder total is the FCFS result; 183 is the farthest request's cylinder, not total movement.

31. A disk arm moves from one end of the disk to the other, servicing requests along the way, and then reverses to service requests on its return. Which algorithm is being used?

C-SCAN, with service in one direction
SCAN, also called the elevator algorithm
FCFS, based on request arrival order
SSTF, based on the nearest request

SCAN, also called the elevator algorithm

Explanation

SCAN travels across the disk servicing requests, reverses at the end, and services requests in both directions; it is also called the elevator algorithm. C-SCAN does not service requests on its return trip, while SSTF and FCFS use different selection rules.

32. A scheduling policy services requests as the head moves across the disk in one direction, then returns to the beginning without servicing requests on that return trip. Which policy is it?

FCFS
SCAN
SSTF
C-SCAN

C-SCAN

Explanation

C-SCAN services requests in one direction and makes its return to the beginning without servicing requests; SCAN services in both directions. SSTF chooses the nearest request, whereas FCFS follows arrival order.

33. A technician prepares a blank magnetic disk by dividing it into sectors and writing a header, data area, and trailer in each sector. What process is this?

Logical formatting with file-system structures
Partitioning into cylinder groups
Error-correcting-code verification
Low-level formatting

Low-level formatting

Explanation

Low-level formatting divides a blank magnetic disk into sectors and writes each sector's header, data area, and trailer. Partitioning creates groups of cylinders, logical formatting creates file-system structures, and ECC checking detects possible corruption during I/O.

34. An operating system is preparing a disk to store files. Which sequence establishes both disk partitions and the file system?

Divide the disk into sectors, then calculate ECC values
Write initial file-system structures, then partition into cylinder groups
Calculate ECC values, then create sector headers and trailers
Partition into cylinder groups, then write initial file-system structures

Partition into cylinder groups, then write initial file-system structures

Explanation

Preparing a disk for file storage requires first partitioning it into one or more groups of cylinders and then logically formatting it by writing initial file-system structures. Low-level formatting creates sector structures, while ECC handling supports data-integrity checks during I/O.

Study with flashcards

Lock in the answers with 89 flashcards on File Systems and Storage Management.

What is a file?

A named collection of related information recorded on secondary storage.

What determines the meaning of information in a file?

Its creator and user.

How are a file’s information and structure determined?

By its creator, depending on the file type.

See the flashcards →

Read the study guide

Go over the full study guide for File Systems and Storage Management.

Read the study guide →

Related classes

Make your own practice quizzes

Upload your class notes and Revizly writes a practice quiz with explained answers in about a minute.

Quiz maker