Re: Kernel Memory Management


Subject: Re: Kernel Memory Management
From: Jim Cole (greyleaf@yggdrasill.net)
Date: Fri Jul 06 2001 - 01:16:14 MDT


Chris Ruprecht's bits of Thu, 5 Jul 2001 translated to:

>I wasn't worried that I'd run out of 'good stuff', specially not with 768 MB
>of physical and 1 GB of virtual memory. I was just wondering how the kernel
>decides what to and what not to cache/buffer/share. I could go and read the
>kernel source code (and spend the next 4 weeks doing so and the following 4
>months in some asylum :), but there must be an easier way to figure this
>out. I'm sure, someone, somewhere, has an answer which could be put into a
>line or two or three.

Probably a gross oversimplification, but... I think for the most part any
time there is a disk access, an attempt is made to maintain the accessed
bits in RAM. The assumption being that the same data might be needed again
in the near future. And the implementation being such that there is no
significant cost for maintaining that data, even if it is never again
accessed. Memory used for such caching is released whenever it is needed
by an application, or when newer data is available for caching. The basic
strategy is to make use of otherwise unused RAM in order to, potentially,
avoid some disk accesses.

>Also, I have the same memory configuration on my Pismo as I have on a RedHat
>Box (768 MB). The Pismo reports a total of 707000KB, the RedHat box reports
>776000 KB (rounded figures). I'm wondering what happened to the 69000 KB in
>the Mac ... the Kernel can't be THAT big ;).

Which kernel are you using? Unless they have eliminated the problem in the
newer kernels, there is a limit on the amount of RAM that can be addressed
with the PPC kernels. The limit is right around 700 MB. I would guess that
that is what accounts for the difference you are seeing.

Jim



This archive was generated by hypermail 2a24 : Fri Jul 06 2001 - 00:21:07 MDT