Suppose we have a sequential (ordered) file of 100000 records where each record is 240 bytes. Assume that B=2400 bytes, s=16 ms, rd=8.3 ms, and btt=0.8 ms. Suppose we want to make X independent random records from the file. We could make X random block reads or we could perform one exhaustive read of the entire file looking for those X records. The question is to decide when it would be more efficient to perform one exhaustive read of the entire file than to perform X individual random reads. That is, what is the value for X when an exhaustive read of the file is more efficient than random X reads? Develop this function of X.

What will be an ideal response?


Total blocks in file = 100000 records * 240 bytes/record divided by 2400
bytes/block = 10000 blocks.
Time for exhaustive read
= s + r + b.btt
= 16 + 8.3 + (10000) * 0.8
= 8024.3 msec
Let X be the # of records searched randomly that takes more time than
exhaustive read time.
Hence, X (s + r + btt) > 8024.3
X (16+8.3+0.8) > 8024.3
X > 8024.3/25.1
Thus, X > 319.69
i.e. If at least 320 random reads are to be made, it is better to search the file exhaustively.

Computer Science & Information Technology

You might also like to view...

The ____ are the foundation of a security framework.

A. spheres of security B. NIST documents C. layered implementations of security D. CIA triads

Computer Science & Information Technology

After adding or removing array elements, the ____________________  function also renumbers the indexes for an array.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

In the SWF Preview panel, you can click a button or hyperlink and it will take you to its associated InDesign page.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Spot colors come pre-mixed.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology