Solution (source code)

= Solution

Emulate reference observations using <page table> protection and <page faults>. When resetting a page's reference state, temporarily revoke access to its resident mapping and invalidate any corresponding <translation lookaside buffer> entry. The first subsequent access traps. The handler recognizes an intentionally protected resident page, sets a software reference flag and restores the mapping without performing a disk read. A later <CLOCK page replacement> scan can use and clear this software flag.

\b[One protection fault records the first access after each reset], rather than trapping on every access. All mappings that can access the frame must be considered. The method requires ordinary memory-protection traps, even though hardware reference bits are absent, and adds a fault cost that native reference flags avoid.