public inbox for linux-8086@vger.kernel.org
 help / color / mirror / Atom feed
* Swapping
@ 2004-05-26 22:45 Tommy McCabe
  2004-05-27 18:45 ` Swapping Alan Cox
  0 siblings, 1 reply; 7+ messages in thread
From: Tommy McCabe @ 2004-05-26 22:45 UTC (permalink / raw)
  To: linux-8086

Swapping, in theory, is actually quite simple. The
memory is borken up into fixed-size pages, or
segments, or whatever you want to call them. Instead
of each program accessing the memory directly, as in
DOS, each program interfaces with a virtual kernel
memory. When a page enters the virtual kernel memory,
the kernel puts it somewhere in the hardware memory.
Because of this interface layer, pages can be wherever
they want in the hardware, but all the program sees is
the virtual address. Also, the virtual memory can be a
lot larger than the hardware memory. So, if the
hardware memory is almost all used, and a program
enters a page in virtual memory, the kernel can put
that page on the hard disk instead of in RAM, and when
the program uses that virtual address, the kernel
fetches the data from the hard drive, and the program
never sees it because the kernel does all the
switching and fetching. An opposite, but harder idea,
is caching- when a file is loaded from the hard disk,
its allocated space in virtual memory, which is
allocated space in real memory, so that the data can
be accessed faster.


	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-06-04  7:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-26 22:45 Swapping Tommy McCabe
2004-05-27 18:45 ` Swapping Alan Cox
2004-05-28  7:52   ` Swapping Gábor Lénárt
2004-05-28 14:56     ` Swapping Tommy McCabe
2004-05-28 15:01       ` Swapping Gábor Lénárt
2004-06-03 22:36     ` Swapping Alan Cox
2004-06-04  7:38       ` Swapping Gábor Lénárt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox