Os Notes2
Os Notes2
Page replacement policies in operating systems are algorithms used to decide which memory pa
---
**Example**:
- Assume 3 frames and the reference string: `7, 0, 1, 2, 0, 3, 0, 4`.
- Process:
- Pages `7, 0, 1` are loaded into frames.
- Next, `2` causes a page fault and replaces `7` (oldest).
- Continue replacing the oldest pages as needed.
- Final Result: High page faults if the reference string frequently revisits older pages.
---
**Example**:
- Reference string: `7, 0, 1, 2, 0, 3, 0, 4`, with 3 frames.
- Process:
- Pages `7, 0, 1` are loaded into frames.
- For page `2`, replace `7` since it is used the furthest in the future.
- For subsequent faults, always replace the page with the furthest future use.
- Result: Minimum possible page faults for the given reference string.
---
**Example**:
- Reference string: `7, 0, 1, 2, 0, 3, 0, 4`, with 3 frames.
- Process:
- Pages `7, 0, 1` are loaded.