Question 71
HardWhat is the link count of a newly created empty directory in a Unix file system?
- A.
2
- B.
1
- C.
3
- D.
0
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Operating Systems
What is the link count of a newly created empty directory in a Unix file system?
2
1
3
0
Sign up free to see the answer and a step-by-step explanation.
Why is a soft link able to point to a file on another file system while a hard link is not?
Soft links copy the file
Soft links are larger
Hard links need root access
A soft link stores a path; a hard link refers to an inode number, which is only meaningful within one file system
Sign up free to see the answer and a step-by-step explanation.
What is the purpose of the free-space bitmap?
To record which blocks are free, with one bit per block
To store file names
To keep the journal
To record file permissions
Sign up free to see the answer and a step-by-step explanation.
A disk of 2 TB uses 4 KB blocks. How big is its free-space bitmap?
512 MB
16 MB
2 GB
64 MB
Sign up free to see the answer and a step-by-step explanation.
What is an extent-based file system's main advantage?
It removes the need for directories
Files can't fragment
Large files are stored as a few contiguous runs, so less metadata is needed and access is faster
No metadata is needed at all
Sign up free to see the answer and a step-by-step explanation.
What does the VFS layer let Linux do?
Support many file system types through the same system calls
Avoid using inodes
Run only one file system
Store files in the cloud only
Sign up free to see the answer and a step-by-step explanation.
Which is the best reason to use a log-structured file system?
It uses no metadata
It never needs cleaning
It turns random writes into fast sequential writes
It works only on tapes
Sign up free to see the answer and a step-by-step explanation.
A process opens a file, another process deletes it, and the first keeps reading. What happens on Unix?
The first process can keep reading; the data is freed when the last open descriptor is closed
The read fails at once
The file is restored
The disk becomes corrupt
Sign up free to see the answer and a step-by-step explanation.
What is the difference between a file descriptor and an inode?
A descriptor stores the file's data
An inode is per process
A descriptor is a per-process handle to an open file; an inode is the file's on-disk metadata
They are the same
Sign up free to see the answer and a step-by-step explanation.
Which allocation method makes both sequential and direct access fast but needs a known file size in advance?
FAT
Contiguous allocation
Linked allocation
Indexed allocation with chains
Sign up free to see the answer and a step-by-step explanation.