RE: [SLE] swap space question in 9.3 install
From: Greg Wallace (jgregw_at_acsalaska.net)
Date: 07/29/05
- Previous message: boricua: "[SLE] mplayer"
- In reply to: Randall R Schulz: "Re: [SLE] swap space question in 9.3 install"
- Next in thread: Jerry Feldman: "Re: [SLE] swap space question in 9.3 install"
- Reply: Jerry Feldman: "Re: [SLE] swap space question in 9.3 install"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: <suse-linux-e@suse.com> Date: Fri, 29 Jul 2005 06:05:23 -0800
On Friday, July 29, 2005 @ 5:32 AM, Randall Schulz wrote:
>Hi,
>On Thursday 28 July 2005 21:44, Greg Wallace wrote:
>> ...
>>
>> Interesting. On a Windoze machine, when you start a program, it
>> loads two copies of the program into memory, one into cache and one
>> into active memory. If you close the program, the active memory area
>> is freed, but the cached copy stays there until you do a restart or
>> until the memory runs low and Windoze needs to reuse it. If you turn
>> right around and re-start the program, the program is copied from the
>> cache area of RAM over to the active memory area (a memory to memory
>> copy), so that it starts faster the second time. Is this the same
>> thing with swap on Linux? Is everything in "used" also in "cached",
>> along with some copies of programs that are no longer executing (I
>> e., the memory is available for re-use, if necessary, but also
>> available for a fast load of the program)?
>For the way most programs are linked, the text (and some of the
>pre-initialized data) is considered "pure" (read-only) and thus
>shareable. Furthermore the linker can align the pure code and data
>within the object file so it's properly aligned to the hardware's
>paging boundaries. Then the OS need never copy that information to swap
>space. Demand paging retrieves it directly from the executable program
>or shared-object file. When a page holding pure code or data is to be
>replace, it's simply abandoned, never needing to be paged out.
>> Greg Wallace
>Randall Schulz
So are you saying that this "pure" code is still re-read from disk, or can
it be sometimes available for use directly from a previously loaded "pure"
copy in RAM? I. e., is a RAM copy ever available for re-use after a program
has finished, or is it always re-loaded from disk (whether from swap or from
the file copy itself)?
Greg Wallace
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
- Previous message: boricua: "[SLE] mplayer"
- In reply to: Randall R Schulz: "Re: [SLE] swap space question in 9.3 install"
- Next in thread: Jerry Feldman: "Re: [SLE] swap space question in 9.3 install"
- Reply: Jerry Feldman: "Re: [SLE] swap space question in 9.3 install"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|