123k views
3 votes
Consider the following string of 20 page requests:

{ 5, 4, 0, 9, 3, 5, 8, 4, 6, 2, 7, 1, 2, 0, 6, 9, 8, 8, 3, 1 }

Assume that the FIFO Algorithm is used, and this system can support a page table size of 3. Also assume that a page fault takes 10ms of time, and memory access takes 3 ms of time.

Provide the following pieces of information:

How many page faults are generated with this string?

User Angelino
by
7.3k points

1 Answer

4 votes

Final answer:

To determine the number of page faults generated by a sequence of page requests using the FIFO page replacement algorithm with a page table size of 3.

Step-by-step explanation:

The student asks how many page faults are generated with a given string of 20 page requests under a First-In, First-Out (FIFO) page replacement algorithm with support for a page table size of 3. To determine the number of page faults, we analyze the sequence of page requests and track the changes to the three available page slots.

Starting with empty slots, page requests are fulfilled in the order they arrive, with the oldest page being replaced when a new one needs to be loaded and no space is available. The first three requests (5, 4, 0) result in 3 page faults, as they fill the empty table. The next requests are then checked against the current pages in the table to see if they incur a page fault. Where a fault occurs, the oldest page is replaced as per the FIFO policy.

A page fault occurs each time a request is made for a page that is not currently held in the page table. Counting how many times this occurs over the sequence, we can provide the student with the total page faults generated. Given the time costs associated with page faults and memory access, the student could further calculate the impact on system performance.

User Aorr
by
7.4k points