In article <1992Aug5.120359.16381@klaava.Helsinki.FI>, torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds) writes: | In article <1992Aug5.102706.15668@colorado.edu> drew@ophelia.cs.colorado.edu (Drew Eckhardt) writes: | >In article <1992Aug5.023248.1639@uniwa.uwa.edu.au> oreillym@tartarus.uwa.edu.au (Michael O'Reilly) writes: | >> | >>The 386 chip has a feature that lets you acomplish the same idea without | >>any fancy schemes like that. The basic idea is that when a page is | >>accessed for the first time, a bit is set in the page tables. WHen it is | >>written, a different bit is set. | | The accessed bit will be used in the soon-to-be-made (I didn't get them | together yesterday, but I'll try again today) first patch to 0.97. It's | very practical, and didn't need any additional state information. While | the current routine isn't a real LRU (Least Recently Used) which needs | some actual calculations, it's NRU (Not Recently Used) which is a simple | approximation that can do with just the one bit that is already provided | by the hardware. Bravo! Someone posted that this was the standard 386 paging scheme, and I thought I had missed it in the source. And I totally forgot that there was an access bit in the hardware, although if someone had ask it as a yes/no question I believe I would have rememberd. | A closer approximation to LRU would be some aging mechanism (the 386 | page tables even have room for a 3-bit wide aging or somthing like that | in the unused bits), and it might be worth implementing eventually. Now that would be really elegant. I don't know if it would save enough to justify the page table sweep, but elegant none the less. Actually I don't know if it would be much better than just using the one bit. -- bill davidsen, GE Corp. R&D Center; Box 8; Schenectady NY 12345 I admit that when I was in school I wrote COBOL. But I didn't compile.
