From: Drew Eckhardt (drew@juliet.cs.colorado.edu)
Date: 05/29/92


From: drew@juliet.cs.colorado.edu (Drew Eckhardt)
Subject: Re: Linux swapping
Date: 29 May 1992 21:04:27 GMT

In article <235kl7h.james@netcom.com> james@netcom.com (James L. Paul) writes:
>In article <9spkbss6@cck.coventry.ac.uk> csg203@cch.coventry.ac.uk (Bluebeard) writes:
>>
>>I have 2megs of memory and 4megs of swap.
>>
>>Does this give me a total of 6megs or only 4 ?
>>
>>A unix expert, told me that the actual memory maps onto the swap, so only the
>>swap space above the system memory is available.
>>Is this true on linux ?
>>
>>I'm considering upgrading to 4meg of RAM, but as I've only got a 40meg
>>partition, I wasn't intending to increase the swap space.
>>
>>
>As another Linux beginner, I'd like to hear the answer to this too.
>My question is, does Linux swap or page? The use of the term swap is
>prevalent in Linux (ie, swap space, swapon) but I also saw descriptions
>of swap space given in pages?

Linux pages, but in the vernacular, the two are interchangeable,
and I'll assume that Bluebeard meant "paging".

>Most modern unixes page, not swap. Is linux among them?

Linux pages.

>BTW, My understanding is this: Swapping involves management at the
>process level, and each active process must be fully in physical ram.
>This limits efficiency, since memory available to be swapped out is
>limited to that of inactive processes. Paging happens at a lower
>level, and makes it possible (although slower) to keep only part of
>an active process in physical ram. Since paging requires memory
>management hardware to be effective, and Linux needs the 386 for
>this, I'm guessing that Linux uses paging, not swapping. Do I have
>this right? (And is demand paging different from paging? How?)
>

You are correct. Demmand paging is where you don't load
all of the executable when you exec(), instead you load pages
as you touch them. This increases the exec() speed, as well as reducing
real memory usage.