in Operating System
408 views
2 votes
2 votes

Suppose a file F of size 8KB is shared by 50 processes, each process read the entire F 5 times sequentially, disk uses linked allocation policy to store both Inode and data of the file with block size 256 byte in FAT and Block Pointer takes 2 bytes. The number of disk block access related to access the file F in executing all the 50 processes is:( Marks: 0.00 )

  1.   33
  2.   35
  3.   36
  4.   34
in Operating System
408 views

4 Comments

Please explain this problem concept.
0
0
I think this might be correct.

In each block out of 256 bytes 2 bytes will be for pointer.

Hence total blocks required for storing file data = ceil(8*1024/254) = 33 blocks.

Hence to search 33 blocks and exact goto that record will require extra 1 access Hence 33+1 = 34 accesses.
0
0
I did not get it why we need this extra 1access? And also here what is the role of FAT and inode?
0
0
One extra to access inode
0
0

1 Answer

0 votes
0 votes
As disk uses linked allocation for storing blocks, no extra blocks for FAT are needed. It needs to access Inode table from the disk and there are ceil [8KB/(256 - 2)] = 33 spanned block need to access to load the whole file F sequentially.

 So total = 33+1 (Access the Inode) =34.

Once the file loaded to memory by any one process, we do not need to access hard disk block as the file F is shared by other 50 processes.