login
Header Space

 
 

Re: .97 (new buffer allocation code)

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
Date: Tuesday, August 4, 1992 - 10:56 am

In article <1992Aug4.035247.5999@uniwa.uwa.edu.au>, oreillym@tartarus.uwa.edu.au (Michael O'Reilly) writes:

| One thing that would improve things as well is doing pageing before it
| is needed.
| 
| i.e. if the buffer drops below Y buffers, and there is less than Z free
| pages, it starts useing a standard clock algorithm to page least
| recently used pages to disk.
| This would fit in very nicely in the idle process. (which
| currently just busy waits)

  I believe that there might be a good case for having an additional
state for pages instead of two. Currently pages are in use, or free, or
i/o buffers. One method which seems to offer room for a lot of
improvement is to have a additional state for pages near the end of the
LRU list. By unmapping those pages from all processes but not freeing
them immediately, you get the chance to see if they are really in use,
by getting a page fault and remapping them, and putting them back at
the top of the LRU list.

  This really is a savings, since if you fully released the page you would
have to unmap (same), write it out if dirty (improved), read it back in
(improved), and remap it (same). On the other hand, if the page is not
active any more, when space gets tight you just write it out or release
it. It is true that on a system with everything in memory, but just
barely, this could result in a bit of overhead due to marking and
unmarking pages, and therefore the number marked should be tunable,
preferably by the kernel at runtime, based on the ratio of program size
to physical memory, physical page fault rate, etc.

  The benefit of this is that you tend to concentrate physical i/o on
pages which are not going to be needed again, rather than pages which
have been in memory for a long time.
-- 
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.
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: .97 (new buffer allocation code), william E Davidsen, (Tue Aug 4, 10:56 am)
speck-geostationary