Why use the Accessed-Bit for the Least-Recently-Used algorithm?

152 views Asked by At

In our lecture, the LRU algorithm for page replacement was explained by looking wether a page has been accessed in the last "epoch" (not sure if that's the proper english term). After every epoch, the A-Bit is set back to 0 on all pages. Lazy me didn't listen correctly and implemented a simulator in a different manner during an assignment:

Just put the most recently used page on top of a stack so we have our pages in the order in which they were most recently used and it's obvious that both ideas are aquivalent.

This is done this way on wikipedia too so I'm wondering, why would you even do it the A-Bit-way? Is it just a naive implementation from the past or does it have better runtime? I would doubt that since you'd have those epochs and reset the A-Bit all the time.

0

There are 0 answers