File and Input/Output System Q.27

0. A program P reads and processes 1000 consecutive records from a sequential file F stored on device D without using any file system facilities. Given the following:
(i) Size of each record = 3200 bytes.
(ii) Access time of D = 10 m secs.
(iii) Data transfer rate of D = 800 x 103 bytes/sec
(iv) CPU time to process each record = 3 m secs.
What is the elapsed time of P if records of F are organized using-a blocking factor of 2 (i.e. each block on D contains two records of F) and P uses one buffer?

  • Option : A
  • Explanation : In this case 500 accesses are sufficient to transfer 1000 records.
    ∴ Elapsed time=(Time taken to transfer Z records in one access +Processing time of two records) x 500
    = [(10 + 4 + 4) + 3 + 3] x 500m sec
    = 12 sec.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *