Re: Swapping

Alan Cox
2004-05-27T18:45:07Z

On Mer, 2004-05-26 at 23:45, Tommy McCabe wrote:
> 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

That is paging in conventional terminology. Actually to be
honest there are two divides here and even the PDP-11 used
elements of both

Firstly older processors could not restart a faulting instruction
perfectly. Eg if you did

"move block of 32 bytes from x to y"

you didn't know how much was copied when it faulted. Worse still
instructions that did the post increment/decrement might or might
not have changed the values. The 8086 is in this category, the 80286
is [with sufficient care] not.

Many systems that did have paging hardware but this limit used the
paging hardware for memory defragmentation only. It was necessary to
load all of a program into memory to run it, as it couldn't be allowed
to fault (because the fault could not be recovered)

The other difference is by fixed v variable size). Paging traditionally
means fixed size blocks and not loading all the program into memory at
once. Works a treat on a 386, not useful on a 286. In the 286 world
instead you have to work with variable sized segments being written to
or from disk, but you could in 286PM but not on 8086 load only some
segments into memory and load others on the fault.