December2015 Cs Q27

0. Suppose that the number of instructions executed between page faults is directly proportional to the number of page frames allocated to a program. If the available memory is doubled, the mean interval between page faults is also doubled. Further, consider that a normal instruction takes one micro second, but if a page fault occurs, it takes 2001 micro seconds. If a program takes 60 sec to run, during which time it gets 15000 page faults, how long would it take to run if twice as much memory were available?

  • Option : C
  • Explanation :
    T = Ninstr x 1µs + 15,000 x 2,000 µs = 60s
    Ninstr x 1µs = 60,000,000 µs – 15,000,000 µs = 30,000,000 µs
    Ninstr = 30,000,000
    The number of instruction between two page faults is
    Ninstr /NPageFaults = 30,000,000/15,000 = 2,000
    If the mean interval between page faults is doubled, the number of instruction between
    two page faults is also doubled and is 4,000. Now the number of page faults is
    30,000,000/4,000 = 7,500
    T’ = 30,000,000 µs + 7,500 x 2,000 µs
    = 30,000,000 µs + 15,000,000 µs = 45,000,000 µs = 45s
    Doubling the memory, doesn’t mean that the program runs twice as fast as on the first system. Here, the performance increase is of 25%.
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 *