Who Clears The Dirty Bit
A page's PTE carries a present bit P, an accessed bit A and a dirty bit D. The hardware sets A and D; it never clears either. Trace one page through this sequence:
| step | event |
|---|---|
| 1 | the page is faulted in from swap and the kernel installs the PTE |
| 2 | the process reads a byte on the page |
| 3 | the process writes a byte on the page |
| 4 | the clock hand sweeps this PTE, finds the page recently used and passes over it |
| 5 | the kernel cleans the page: it writes the contents out to swap and leaves it mapped |
| 6 | the process reads a byte on the page again |
What is (P, A, D) after step 6?
Sign in to answer questions and track your progress
Sign In