Re: Paging algorithm used? (Curiosity)

Rik van Riel (riel@humbolt.geo.uu.nl)
Fri, 10 Sep 1999 12:57:14 +0200 (CEST)


On Thu, 9 Sep 1999, Drew Bernat wrote:

> I'm taking an OS class, and we discussed paging algorithms (WS and
> WSClock in particular). I remember a discussion on this list a week or
> so ago which said that LRU was the standard method used in the kernel.
> Can anyone give me a quick rundown on the actual algorithm used (the
> only one I know is Clock). I'm mostly just curious, though there is a
> final project requirement for the class :)

At the moment Linux is using a number of single-handed clocks.

For anonymous and mapped pages we scan the page tables of the
processes. If the page is stale we evict it _from the page tables_,
but not from memory.

The other hand is scanning physical memory and unmaps stale pages
which don't have any other reference (for example, the virtual
pages we unlinked above).

This gives easy balancing between the different memory usages and
is a cheap and effective 'simulation' of page aging.

Rik

--
The Internet is not a network of computers. It is a network
of people. That is its real strength.
--
work at:	http://www.reseau.nl/
home at:	http://www.nl.linux.org/~riel/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/