File Systems Overview
- 26Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What is the operating system's definition of a file?
What is the operating system's definition of a file?
26 questions
- 1
What is the operating system's definition of a file?
- A
A collection of data stored in a non-volatile memory
- B
A sequence of bytes with a unique name
- C
A contiguous logical address space
- D
A block of data with metadata attached
Correct answer
CA contiguous logical address space
Explanation
In the context of operating systems, a file is defined as a contiguous logical address space. The logical aspect means it may not be physically contiguous on the storage medium.
- A
- 2
Which of the following is NOT a typical file attribute mentioned in the lecture?
- A
File compression ratio
- B
File creation date
- C
File type
- D
File name
Correct answer
AFile compression ratio
Explanation
The lecture listed common attributes: file name, file type, file size, location, creation date, modification date, and access control. Compression ratio is not a standard file attribute tracked by the operating system.
- A
- 3
According to the lecture, the Mac OS (based on Unix) provides additional file attributes that include:
- A
A label that can assign colors to files
- B
A list of all users who have ever accessed the file
- C
The exact physical sector locations on the disk
- D
A checksum for automatic error correction
Correct answer
AA label that can assign colors to files
Explanation
The lecture mentioned that Mac OS adds features like a label (with colour) and the ability to choose which application opens a file type. It does not track all users, physical sectors, or provide a checksum as part of file attributes.
- A
- 4
Why is it important to close files after use in a multi-user operating system?
- A
To prevent other users from reading the file
- B
To ensure the file is saved to disk immediately
- C
To free up space in the file-system metadata structures
- D
To release the file lock for other processes
Correct answer
CTo free up space in the file-system metadata structures
Explanation
The lecture stressed that keeping track of open files consumes system resources. If files are not closed, the metadata structures grow and can eventually cause the system to fail. Releasing locks is important but the primary reason given is resource exhaustion.
- A
- 5
What does file locking prevent?
- A
A file from being deleted while it is open
- B
Unauthorized access to a file by non-owners
- C
Conflicting updates when multiple users write to the same file
- D
Multiple users from reading the same file simultaneously
Correct answer
CConflicting updates when multiple users write to the same file
Explanation
File locking is a mechanism to prevent conflicting updates. It allows exclusive write access to one user, while others may have read-only access or be blocked entirely. It does not prevent multiple reads, deletion, or general unauthorized access.
- A
- 6
In the context of file locking, what is the difference between an exclusive lock and a shared lock?
- A
An exclusive lock prevents all access; a shared lock allows only one writer at a time
- B
An exclusive lock is mandatory; a shared lock is advisory
- C
An exclusive lock allows only the owner to read; a shared lock allows multiple readers
- D
An exclusive lock blocks all other accesses; a shared lock allows multiple concurrent readers
Correct answer
DAn exclusive lock blocks all other accesses; a shared lock allows multiple concurrent readers
Explanation
An exclusive lock grants one process full access and blocks all others. A shared lock allows multiple processes to read the file but prevents writing. The lecture described exclusive locks (block all) and shared locks (allow multiple readers).
- A
- 7
Which statement about file extensions is correct?
- A
Unix systems store the file type in the extension, unlike Windows
- B
All operating systems require a visible file extension to determine file type
- C
File extensions are mandatory in Linux to identify executable files
- D
File extensions are merely a convention and can be associated with any application
Correct answer
DFile extensions are merely a convention and can be associated with any application
Explanation
The lecture explained that file extensions are not required by the operating system; they are a convention. Users can associate any extension with any application. Windows and DOS popularized the use, but Unix does not enforce it.
- A
- 8
Which file type is characterized by having each record of the same length, often used in transaction processing systems?
- A
Fixed-length record file
- B
Simple text file
- C
Variable-length record file
- D
Binary file with complex structure
Correct answer
AFixed-length record file
Explanation
The lecture described fixed-length record files as having a structure where each record has the same size, e.g., transaction data with specific fields for date, time, card number, etc.
- A
- 9
In what access method must a program read data in order from beginning to end?
- A
Indexed sequential access
- B
Sequential access
- C
Direct access
- D
Random access
Correct answer
BSequential access
Explanation
Sequential access means data is read in a linear sequence, one record after another. The lecture used tape drives as the classic example.
- A
- 10
Why are tape drives still widely used in large data centers despite being relatively slow?
- A
They consume less power than solid state drives
- B
They are cheap, have large capacities, and are reliable for archival storage
- C
They are easier to network than hard drives
- D
They provide the fastest random access to data
Correct answer
BThey are cheap, have large capacities, and are reliable for archival storage
Explanation
The lecture stated that tapes are cheap, offer large storage capacities, and are well-suited for backups and archival data where speed is not critical. They are not fast, but cost-effective.
- A
- 11
In direct access storage, how does the operating system typically locate a file quickly?
- A
By keeping an index of file locations in memory while the system is running
- B
By reading a directory structure from the disk each time
- C
By scanning the disk sequentially until the file is found
- D
By storing a pointer to the file in the file's metadata on the disk
Correct answer
ABy keeping an index of file locations in memory while the system is running
Explanation
The lecture explained that for direct access, the index (directory) is loaded into memory at startup, allowing quick lookup of file locations without repeated disk reads. The index can be multi-level to avoid consuming too much memory.
- A
- 12
What is the primary benefit of indexed sequential access method (ISAM) for tape drives?
- A
It makes tape drives as fast as hard drives
- B
It eliminates the need for sequential scanning by using an index
- C
It reduces the cost of tape storage by compressing data
- D
It allows random access to any record without moving the tape
Correct answer
BIt eliminates the need for sequential scanning by using an index
Explanation
ISAM uses an index to point to the approximate location of a record, reducing the amount of sequential tape needed. The lecture described using an index on tape to skip to relevant sections.
- A
- 13
What is the main disadvantage of a single-level directory structure?
- A
It requires all file names to be unique across all users
- B
It does not allow grouping of files
- C
It is too slow to access files
- D
It cannot support file permissions
Correct answer
AIt requires all file names to be unique across all users
Explanation
The lecture mentioned that with a single-level directory, all files are in one place, so file names must be unique. This causes conflicts when multiple users have files with the same name.
- A
- 14
Which directory structure solves the naming conflict in single-level directories but still does not allow grouping?
- A
Two-level directory
- B
Tree-structured directory
- C
Single-level directory with long names
- D
Acyclic-graph directory
Correct answer
ATwo-level directory
Explanation
A two-level directory gives each user their own directory, so different users can have files with the same name. However, there is no further subdivision to group files within a user's area.
- A
- 15
In a tree-structured directory, what is an absolute path name?
- A
A path that uses relative references like '..' or '.'
- B
A path that includes only the file name and its direct parent
- C
A path that starts from the current directory and goes up or down
- D
A path that starts from the root directory and uniquely identifies a file
Correct answer
DA path that starts from the root directory and uniquely identifies a file
Explanation
An absolute path begins at the root (top) of the directory tree and lists each directory down to the file. The lecture contrasted this with relative path names, which depend on the current directory.
- A
- 16
What is a characteristic of an acyclic-graph directory structure?
- A
It requires back pointers to detect cycles
- B
It is the same as a tree structure but with limited depth
- C
It prevents cycles but allows multiple names for the same file
- D
It allows only one link to each file
Correct answer
CIt prevents cycles but allows multiple names for the same file
Explanation
An acyclic-graph directory allows files to have multiple parent directories (hard links) but does not allow cycles. The lecture described this as using links to share files while avoiding loops.
- A
- 17
To safely delete a shared file in an acyclic-graph directory, what must the operating system track?
- A
The number of hard links pointing to the file
- B
The size of the file to avoid data loss
- C
The file's original owner
- D
The creation time of the file
Correct answer
AThe number of hard links pointing to the file
Explanation
The lecture explained that when multiple names point to the same file, the file should not be deleted until all links are removed. A reference count (back pointer) is kept to know how many names point to it.
- A
- 18
What technique is used to handle cycles in directory structures?
- A
Forbidding symbolic links altogether
- B
Using absolute paths only
- C
Replacing cycles with copies of files
- D
Garbage collection
Correct answer
DGarbage collection
Explanation
Cycles can create dangling links and unresolvable paths. Garbage collection periodically checks for and cleans up unreachable or cyclic structures. The lecture mentioned garbage collection as a solution.
- A
- 19
What is a mount point in a file system?
- A
The physical connector used to attach a disk drive
- B
The process of formatting a new partition
- C
The root directory of a file system
- D
The location where a storage device is attached to the directory tree
Correct answer
DThe location where a storage device is attached to the directory tree
Explanation
Mounting makes a storage device accessible at a specific point in the directory tree, called the mount point. The lecture gave examples like USB drives appearing in the file manager or devices in /usr/dev on Linux.
- A
- 20
Why might a user partition their disk into two partitions, one for the operating system and one for data?
- A
To increase the overall disk capacity
- B
To improve the speed of the operating system
- C
To enable dual-booting of two operating systems
- D
To allow backing up only personal data without reinstalling the OS
Correct answer
DTo allow backing up only personal data without reinstalling the OS
Explanation
The lecture described this practice: keeping the OS partition separate allows backing up only the data partition, saving time since the OS can be reinstalled from original media.
- A
- 21
What is a volume in the context of file systems?
- A
A logical grouping of files without any formatting
- B
A partition that has been formatted with a file system
- C
A copy of a file system for backup purposes
- D
A physical disk drive
Correct answer
BA partition that has been formatted with a file system
Explanation
A volume is a formatted partition, i.e., a partition with a file system structure applied. The lecture mentioned that when you format a partition, it becomes a volume.
- A
- 22
Which protocol is commonly used for sharing files over a network in Unix/Linux systems?
- A
HTTP
- B
SMB
- C
NFS
- D
FTP
Correct answer
CNFS
Explanation
The lecture specifically mentioned NFS (Network File System) as a common protocol for file sharing, originating from early Unix systems.
- A
- 23
In Unix/Linux file permissions, what does the numeric mode 755 signify?
- A
Owner: read, write, execute; Group: read, write; Others: read
- B
Owner: read, write; Group: read; Others: read
- C
Owner: read, write, execute; Group: read, execute; Others: read, execute
- D
Owner: read, write; Group: read, write; Others: read, write
Correct answer
COwner: read, write, execute; Group: read, execute; Others: read, execute
Explanation
The number 755 in binary: owner (7 = rwx), group (5 = r-x), others (5 = r-x). The lecture explained the binary representation: read=4, write=2, execute=1, so owner gets 4+2+1=7, group and others get 4+1=5.
- A
- 24
When listing files in Linux with 'ls -l', what does the first character 'd' indicate?
- A
The file is a device
- B
The file is deletable
- C
The file is a directory
- D
The file is a dynamic link
Correct answer
CThe file is a directory
Explanation
In the extended listing, 'd' in the first column means the entry is a directory. A dash '-' indicates a regular file. The lecture pointed out this distinction.
- A
- 25
In Windows file permissions, how does the 'modify' permission differ from 'write'?
- A
Modify permits read access as well, while write does not
- B
Modify includes delete permission, while write does not
- C
Modify allows changing attributes, while write only allows changing content
- D
Modify is the same as write; Windows uses the terms interchangeably
Correct answer
BModify includes delete permission, while write does not
Explanation
The lecture noted that Windows separates modify (which includes the ability to delete) from write, whereas Unix groups write and modify together. Modify grants additional capabilities like deletion.
- A
- 26
What components are typically needed to enable file sharing over a network?
- A
A firewall and an antivirus program
- B
A dedicated physical connection and a local directory structure
- C
A web server and a database server
- D
A DNS server, an LDAP server, and a file-sharing protocol such as NFS
Correct answer
DA DNS server, an LDAP server, and a file-sharing protocol such as NFS
Explanation
The lecture listed DNS for name resolution, LDAP for user information, and a protocol like NFS as components that work together for network file sharing.
- A

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