Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

10.5 Assume that we have a demand-paged memory. The page table is held in regist

ID: 3771024 • Letter: 1

Question

10.5 Assume that we have a demand-paged memory. The page table is held in registers. It takes 8 milliseconds to service a page fault if an empty frame is available or if the replaced page is not modified, and 20 milliseconds if the replaced page modified. Memory access time is 100 nanoseconds.

                 Assume that the page to be replaced is modified 70 percent of the time. What is the maximum acceptable page-fault rate for affective access time of no more than 200 nanoseconds?

10.10 Consider the two-dimensional array A:

                 int A [] [] = new int [100] [100];

         where A [0] [0] is stored at location 200, in a paged memory system with pages of size        200. A small process resides in page 0 (location 0 to 199) for manipulating the A matrix;    thus, every instruction fetch will be from page 0.

                 For three page frames, how many page faults are generated by the following         array-initialization loops, using LRU replacement, and assuming page frame 1 has the    process in it, and the two are initially empty:

a.for (int j = 0; j < 100; j++)

              for ( int i = 0; i < 100; i++)

                       A [i] [j] = 0;

b.for (int i = 0; i < 100; i++ )

              for (int j = 0; j < 100; j++)

                       A [i] [j] = 0;

Explanation / Answer

We know, Effective Memory Access Time = (1 – p) × memory access time + p × page fault service time

Where p is the page fault rate.

According to the question,

(1 – p) × 100 ns + p × {(.70 × 20 + .30 × 8) × 106 ns) 200 ns

100 – 100p + 16400000p 200

16399900p 100

p 1/163999

The maximum acceptable page fault rate is . 1/163999

10.10

a.5000

b.50

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote