operating-system-r-bit.html
* created: 2025-05-29T10:40
* modified: 2025-06-30T21:35
title
R-Bit
description
Is part of the page table and keeps track if a page was recently accessed.
related notes
Keeping track of referenced page frames.
The R-Bit keeps track of whether a process accessed the page already. If the R-Bit is 0 the content of the page was not accessed. This is used to keep track if the page was recently used or not.
The NRU (Not Recently Used) Algorithm for example checks this bit to determine if a process recently accessed a page, by flipping all bits back to 0 after a certain time interval, we ensure that the page isn't “stale”. Keep in mind that we only want to flip the R-Bit. The M-Bit needs to keep its state.
TODO! Put NRU in separate file.
Should the M-Bit also be removed when the NRU algorithm clears all R-Bits?
No, because we still need to track the if the state was modified so that we can handle our page swap accordingly.