A program P reads and processes 1000 consecutive records from a sequential…

PYQ GATE 1997

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:

Size of each record = 3200 bytes

Access time of D = 10 msecs

Data transfer rate of D = 800×103800 \times 10^3 bytes/second

CPU time to process each record = 3 msecs

What is the elapsed time of P if

(a) F contains unblocked records and P does not use buffering?

(b) F contains unblocked records and P uses one buffer (i.e., it always reads ahead into the buffer)?

(c) 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?

You may assume that the CPU time needed to transfer a record from a buffer to a local variable of P is negligible.

Sign up free to check your answer

Sign up free

Explore the full course: Zero To Hero

Loading lesson…