1/24
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No study sessions yet.
Which of the following is NOT a valid path name for the file /etc/passwd?
/etc/passwd/.
In contiguous file allocation, disk fragmentation that occurs when a file doesn't fill its last block completely is an example of:
Internal fragmentation
For a file allocation system with a seek time of 5 msec, rotational delay of 4 msec, transfer rate of 80 MB/sec, and average file size of 8 KB, approximately how long does it take to read and write a file?
18 msec
Which file allocation scheme would be MOST appropriate for a file that varies in size between 4 KB and 4 MB during its lifetime?
Indexed/table-based allocation
What is a major disadvantage of linked allocation when dealing with randomly accessed student records?
Requires traversing the chain to reach a specific block
If a data block becomes corrupted in a linked allocation system, which files are affected?
Only the file containing that block
An i-node contains 10 direct addresses of 8 bytes each. If all disk blocks are 1024 KB, what is the maximum file size using only direct addresses?
10,240 KB
What is the main advantage of storing short file data directly within the i-node?
Improves efficiency by eliminating a disk access
When opening a file, why is it better to search the i-node table for an existing entry rather than always fetching a new copy?
Multiple processes may have the file open; shared state is necessary
In the expression /usr/jim/../ast/x, if /usr/jim is the working directory, what is the absolute path?
/usr/ast/x
Which statement about hard links and symbolic links is TRUE?
Symbolic links create a new i-node; hard links share the same i-node
What happens to a hard link when the original file is deleted?
The hard link still accesses the file data (if link count > 0)
A disk has B blocks, F of which are free, and disk addresses require D bits. The free list uses less space than a bitmap when:
F/B < D/(word size in bits)
For D = 16 bits (2 bytes per address) and a 32-bit word size, at what percentage of free disk space do bitmaps become more efficient than free lists?
Less than 6.25% free
On a 4-TB disk using 4-KB blocks with the free-list method, approximately how many block addresses can be stored in one block?
1,024 addresses
Is the open() system call in UNIX absolutely essential?
No, but it provides efficiency by setting up data structures once
A system call rename() differs from copying a file and deleting the original in that:
Rename is atomic and preserves hard links and permissions
Do systems that support random-access files need a rewind operation?
No, seeking to position 0 accomplishes the same thing
If a cache hit takes 1 msec and a cache miss (requiring disk read) takes 40 msec, the mean request time with hit rate h is:
h + 40(1-h) msec
For an external USB hard drive, which cache strategy is more suitable?
Write-through cache (safer against sudden disconnection)
Given FAT entries: (22,19); (19,15); (15,17); (17,21); (21,-1), and file f1 starts at block 22, what blocks does f1 occupy?
22, 19, 15, 17, 21
In MS-DOS FAT-16, if one file uses k FAT entries, what constraint does this place on other files?
Total file length is limited by available FAT entries
For a UNIX system with 4-KB blocks and 4-byte addresses, with i-nodes containing 10 direct, 1 single indirect, 1 double indirect, and 1 triple indirect entry, what is the approximate maximum file size?
4 TB
To fetch the i-node for /usr/ast/courses/os/handout.t (assuming root i-node in memory, one disk block per directory), how many disk operations are needed?
10
In a file system with 4-KB blocks where the median file size is 1 KB, what fraction of disk space is wasted if all files were exactly 1 KB?
75%