🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.hardware
Article #774

Virtual memory, was Re: Nitro

#774
From: Charles William Swiger
Date: Wed, 07 Oct 1992 19:42
51 lines
3174 bytes
Excerpts from netnews.comp.sys.next.hardware: 7-Oct-92 Re: Nitro Ulrich
Grepel@kino.intel (829)

>I don't think that 32 meg of ram is really enough to stop any swapping.
>Do a ps xua and add the vsize values - you will get a result that is
>much higher than ram size plus swapfile size. Partly that comes from
>executables (not only) that are loaded directly, without copying them
>to the swapfile, the other parts I would love to know about. So sure
>you have less swapping, but not none.
>
>Uli

True.

The vsize values do not tell you how many memory pages have actually
been *allocated*.  You can allocate a large amount of memory, but no
actual pages will be allocated until you first cause a page fault to
that page.  Only then does a "real page" get allocated (either in memory
on in the swapfile) for that section of the process's virtual memory
space.

Furthermore, there seems to be a confusion between swapping and paging. 
Most of the activity (particularly in a system with lots of memory) is
paging.  Paging means that 8K chunks of memory that have not been
recently used will be paged out to the swapfile so that a page needed to
satisfy a page fault can either be allocated or paged in from the
swapfile.  Paging does not cause a major performance impact; it's
normal.  NeXT's 3.0 seems to do a lot more paging than 2.x; perhaps
because 2.x had better "locality of virtual memory referencing."

Swapping is what occurs when *all* of the pages associated with a
process get paged out.  This is know as swapping the process out.  this
can cause the system to thrash, as it swaps one process out entirely,
then has to reload many pages back again in order to allocate a time
slice to the process, thus swapping another process out.  Swapping is
bad; it causes a serious loss of performance.  Under bad situations,
swapping may cut the useful work done by a machine down by a factor of
10 or more.

The virtual memory system tries hard to page rather than swap.  You can
check the system header files in /usr/include/vm/*.h for some
interesting things that may help you understand the virtual memory
system on the NeXT.

-Chuck

+---------------------------------------------+ 
|  Charles William Swiger -- CMU sucks rocks  | "The television screen is the
|   AMS & normal mail: cs4w+@andrew.cmu.edu   | retina of the mind's eye."
|    NeXTmail: <temporarily out of order>     |           
+---------------------------------------------+            --Videodrome
Technical Details
Message-ID: <weonqeW00Voi8yRVVx@andrew.cmu.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!cs4w+
References: <BvnJ4A.pL.2@cs.cmu.edu> <1992Oct6.133611.6559@cube.handheld.com> <1992Oct7.152211.20694@news.th-darmstadt.de>

Show Full Headers
Complete Article Headers
Organization: Senior, Chemistry, Carnegie Mellon, Pittsburgh, PA
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!cs4w+
Newsgroups: comp.sys.next.hardware
Message-ID: <weonqeW00Voi8yRVVx@andrew.cmu.edu>
Date: Wed,  7 Oct 1992 15:42:34 -0400 
From: Charles William Swiger <cs4w+@andrew.cmu.edu>
Subject: Virtual memory, was Re: Nitro
In-Reply-To: <1992Oct7.152211.20694@news.th-darmstadt.de>
References: <BvnJ4A.pL.2@cs.cmu.edu> <1992Oct6.133611.6559@cube.handheld.com>
 <1992Oct7.152211.20694@news.th-darmstadt.de>
Lines: 51