On 2/22/06, Brian Wheeler <bdwheele at indiana.edu> wrote:
On Wed, 2006-02-22 at 12:16 +0000, Liam Proven wrote:
> I must point out that I did carefully use the
word "swap" not "page"!
> But I confess I'm not 100% clear on the difference. Does anyone know
> of a good online reference to explain it? Moderately technical is fine
> - I am a techie with a reasonable understanding of OS design, but I am
> not a programmer, or at least, not in C.
Swap is technically putting a segment (data or code)
as one unit to the
disk.
paging is like swapping except using smaller-than-segment chunks (i.e.
pages). In a paging system, each segment consists of a bunch of
fixed-size pages and each one of those pages can be put on disk (or
brought back) individually. When the OS tries to read from one of the
missing pages, an exception is raised and the memory is loaded from
disk.
Er. Thankyou. The snag is, that explanation does rather depend on
understanding the difference between segments and pages. I am young
enough that I have really only ever dealt with machines with flat
32-bit memory spaces - I saw a few 286s in my 1st year ot 2 in work,
but back then, I understood nothing about such arcana.
So. What is a segment, what is a page, and what is the difference? I
know that pre-386 Intel x86 chips used a 64k segment size and that
this caused problems, but little more than that.
--
Liam Proven ?
http://livejournal.com/userinfo.bml?user=lproven
AOL/AIM/iChat: liamproven at
aol.com ? MSN/Messenger: lproven at
hotmail.com
Yahoo: liamproven at yahoo.co.uk ? Skype: liamproven ? ICQ: 73187508
Gmail/Google Talk/Orkut: lproven at
gmail.com