Step 1: LRU (Least Recently Used) Page Replacement.
In LRU, the page that has not been used for the longest time is replaced.
Step 2: Process the page reference string.
We process the reference string one page at a time, replacing the least recently used page when necessary. The sequence of frames is updated after each reference.
- Reference 7 → Page fault, frames: [7]
- Reference 0 → Page fault, frames: [7, 0]
- Reference 1 → Page fault, frames: [7, 0, 1]
- Reference 2 → Page fault, replace 7 (LRU), frames: [0, 1, 2]
- Reference 0 → No page fault, frames: [0, 1, 2]
- Reference 3 → Page fault, replace 1 (LRU), frames: [0, 2, 3]
- Reference 0 → No page fault, frames: [0, 2, 3]
- Reference 4 → Page fault, replace 2 (LRU), frames: [0, 3, 4]
- Reference 2 → Page fault, replace 3 (LRU), frames: [0, 4, 2]
- Reference 3 → Page fault, replace 0 (LRU), frames: [3, 4, 2]
- Reference 0 → Page fault, replace 4 (LRU), frames: [3, 0, 2]
- Reference 3 → No page fault, frames: [3, 0, 2]
- Reference 2 → No page fault, frames: [3, 0, 2]
Step 3: Count the total number of page faults.
Total page faults = 9.
Match List-I with List-II.
| List-I | List-II |
|---|---|
| A. AND | I. Output 1 only if both inputs are 1 |
| B. OR | II. Output 1 if any input is 1 |
| C. NAND | III. Output 0 only if both inputs are 1 |
| D. NOR | IV. Output 1 only if both inputs are 0 |
Choose the correct answer from the options given below:
Match List-I with List-II:
| List-I (Personalities/Public Figures) | List-II (Bodies/Institutions) | ||
|---|---|---|---|
| (A) | Sanjay Malhotra | (I) | National Human Rights Commission |
| (B) | Om Prakash Rawat | (IV) | Election Commission of India |
| (C) | Justice V. Ramasubramanian | (III) | Supreme Court of India |
| (D) | Justice Deepak Misra | (II) | Reserve Bank of India |