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

RE: Swapfiles





>John Hasler wrote
>I wrote:
>> Executables, being read-only, are mapped directly from disk and never
>> use any swap at all.  Only data gets mapped to swap.

>Karsten writes:
>> Is this a GNU/Linux thing or a more general Unix/POSIX thing?

>Neither.  It's a virtual-memory thing.  It's the obvious thing to do as
>soon as you have vm.

>> Recent development or long-time feature.

>VMS had it from day one, I believe, and Berkeley introduced it into Unix
>when they ported it to the VAX.

I am a little puzzled by the comment "executables do not use swap" and I
have to admit computer design is not my forte. However let me dive in :-)
  I was under the impression the swap process did not care what the memory
was doing, in fact the user process or data did not know it was in ram or on
disk, but ran in the virtual memory.  If there was a request from part of
the program running in this virtual memory (hence obviously in ram space
talking to the processor) and the instruction pointed to an area in virtual
memory that was not in ram space the MMU would generate an exception to
kernal space and the swap would occur.  The trick is to guess what parts of
the virtual memory should be kept in ram space. (Hence all the design in the
kernal world)   As well there are some means to request that parts of your
program remain in RAM space (this used to be a function of the sticky bit I
think)  but I am not a programmer so I really cannot comment too much on
this.


Brian

--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact
listmaster@lists.debian.org


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: