Computer Science, asked by dechrisy05, 1 month ago

4. Consider the following page reference string: 1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6. How many page faults would occur for the following replacement algorithms, assuming demand paging with seven frames? Remember that all frames are initially empty, so your first unique pages will cost one fault each. a. LRU replacement a. FIFO replacement b. Optimal replacement

Answers

Answered by damandeepdev19
0

Answer:The number of page faults using FIFO and LRU will be same using 3 empty frames.

The number of page faults using optimal page replacement algorithm and LRU will be

same using 3 empty frames.

III. The number of page faults using optimal page replacement algorithm will be same

using 3 empty frames and 2 empty frames.

IV. The number of page faults using FIFO, LRU and optimal page replacement algorithm

will be same using 4 empty frames.

Explanation:

Answered by vishakasaxenasl
0

Answer:

LRU and FIFO replacement will give two-page faults while OPR  will give only one-page faults.

Explanation:

Page Replacement Algorithms

Page Replacement Algorithms are used by the memory of the computer. Since the size of the primary memory is limited so it cannot contain all the data at once. Whatever data is required by the primary memory is fetched from the auxiliary as a requirement and this data fetching is directed by page replacement algorithms:

(a) FIFO Replacement

FIFO stands for First In First Out replacement algorithm. This is the simplest page replacement algorithm however it does not give optimal performance all the time.

(b) LRU Replacement

LRU stands for Least Recently Used. In this algorithm, only those pages replaced that are not recently used by the processors with the new pages. It is better than FIFO replacement.

(c) OPR Repalcment

OPR stands for Optimal Page Replacement Algorithm. This is the most optimal algorithm for page replacement since it gives a few page faults. However, its implementation is complex.

#SPJ2

Similar questions