edited by
6,329 views
30 votes
30 votes

In a computer system, four files of size $11050$ bytes, $4990$ bytes, $5170$ bytes and $12640$ bytes need to be stored. For storing these files on disk, we can use either $100$ byte disk blocks or $200$ byte disk blocks (but can't mix block sizes). For each block used to store a file, $4$ bytes of bookkeeping information also needs to be stored on the disk. Thus, the total space used to store a file is the sum of the space taken to store the file and the space taken to store the book keeping information for the blocks allocated for storing the file. A disk block can store either bookkeeping information for a file or data from a file, but not both.
What is the total space required for storing the files using $100$ byte disk blocks and $200$ byte disk blocks respectively?

  1. $35400$ and $35800$ bytes
  2. $35800$ and $35400$ bytes
  3. $35600$ and $35400$ bytes
  4. $35400$ and $35600$ bytes
edited by

1 Answer

Best answer
56 votes
56 votes

for $100$ bytes block:

$11050 = 111$ blocks requiring $111 \times 4 = 444$ bytes of bookkeeping info which requires another $5$ disk blocks. So, totally $111 + 5 = 116$ disk blocks. Similarly,
$4990 = 50 + (50\times 4)/100 = 52$
$5170 = 52 + (52 \times 4)/100 = 55$
$12640 = 127 + (127 \times 4/100) = 133$
-----
$356 \times 100 = 35600$ bytes

For $200$ bytes block:

$56 + (56 \times 4/200) = 58$
$25 + (25 \times 4 / 200) = 26$
$26 + (26 \times 4 / 200) = 27$
$64 + (64 \times 4 / 200) = 66$
-----
$177 \times 200 = 35400$

So, (C) option.

edited by
Answer:

Related questions

27 votes
27 votes
1 answer
4
Ishrat Jahan asked Nov 3, 2014
5,370 views
We wish to schedule three processes $P1$, $P2$ and $P3$ on a uniprocessor system. The priorities, CPU time requirements and arrival times of the processes are as shown be...