Suppose a file is on a filesystem using a 1K block size. This
file is maintained on the disk using i-nodes as is typical on many
UNIX filesystems. Suppose there are seven direct (32-bit) pointers,
and then a pointer to one singly direct block, a pointer to a
doubly indirect block, and a pointer to a triply indirect block.
Suppose a program creates and opens a file in this filesystem, and
then seeks to the following positions, writes a character, and then
exits. Identify how many disk blocks, (both data and indirect
blocks) must be allocated to store the data for the file. (Note
that a-c each represent a different file.) (Note: we are going to
consider the filesystem implementation to support ‘sparse’ files –
blocks that are never written to in the file will not be allocated
but will be represented by a NULL pointer in the direct and
indirect blocks. Answer the following considering sparse file
allocation.)
a. Seek to 8900
b. Seek to 350000
c. Seek to 63,000,000
How big would a file need to be to require the triply indirect
pointer?
Suppose a file is on a filesystem using a 1K block size. This file is maintained on the disk using i-nodes as is typical
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Suppose a file is on a filesystem using a 1K block size. This file is maintained on the disk using i-nodes as is typical
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!