Re: [CentOS] Swap memory: I can't reconcile this stuff.

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



On Tue, 2006-06-06 at 07:31, Kai Schaetzl wrote:
> Les Mikesell wrote on Mon, 05 Jun 2006 21:29:52 -0500:
> 
> > It's paged on demand.  Instead of thinking about memory being 
> > swapped out, think about it never being read from disk into 
> > memory until the memory that is supposed to hold it is accessed.
> 
> "never being read from disk" implies that there was something written to 
> the disk first. In that case the swap usage figure from top or free would 
> be wrong, wouldn't it?

The executable and it's libraries were written to disk a long
time ago.  When you start to execute it, the virtual memory
is allocated but the disk contents aren't loaded into memory
until there is an access to the virtual page.  In very old versions
of unix, executables were actually copied into swap but now
they just page in directly from their own disk file and never
need to be written back out.  From the virtual memory perspective
it is just a matter of which disk block needs to be loaded to
initialize the memory page if something ever accesses it.

-- 
  Les Mikesell
   lesmikesell@xxxxxxxxx


_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux