SPONSORED LINKS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Win 95 RAM Usage




On Wed, 4 Sep 1996, Robert Dewar wrote:

> Generally in any decent system, all of the physical memory will be in use
> all the time, because you do not eject stuff from memory until you
> need to. 
> 
> Your top command merely shows that 61M of memory is currently in use for
> something, but the something may be old executables no longer in use,
> which will be kept around until the space they occupy is no longer needed.
> At that time they will not be swapped out, but merely discarded.

This is silly and makes no sense in operating system terms. "Eject" from
memory? "Discard?" Ask an OS how much memory is free and it will tell you
how much is currently not allocated, period. If it's telling you 61M is in
use, some program has asked for it. If some program has asked for it, the
OS is not free to just discard it - it has no idea if the program is
legitimately using it or just allocating stuff at random - it MUST swap
it. This is why memory leaks are so serious. If a program doesn't properly
deallocate the space, it remains "in use" as far as the OS is concerned.

I mean, do you think Norton traverses the memory space and looks for
segments not currently zeroed out? Even if it could so such a silly thing,
there is 4Gb of addresses possible under Lose95 (mapped to physical
memory, of course). Is uses a simple Lose95 system call to determine the
current amount of memory used and swap used.

Parties interested in how all this stuff really works should check out
"Build your own 32bit OS"(SAM Publishing), which isn't exactly bathroom
reading, but should be understandable by the layman. A more technical
approach would be Silberschatz and Galvin's "Operating System Concepts."
(http://heg-school.aw.com/cseng/authors/silberschatz/opsys/opsys.pfc.html
 is the on-line preface to the book) Stay away from Tannenbaum's book -
it's way too expensive and inappropreate for a lone learner. 

I dunno if it's any good, but a fellow named Nastasic has his lecture
notes for an OS course online in postscript form at
http://www.csam.iit.edu/~nastasic/osbook.html