Indeed, I was unclear. A long time ago some OS I used distinguished between
swapping (getting rid of a whole process' address space) and paging. The
former one you can implement on any machine (with restrictions), the second
one needs an MMU and that's what CONFIG_SWAP means AFAICT.
> Most ucLinux platforms can't swap because they can't dynamically relocate code.
I believe that dynamically relocating code is fairly easy (PIC may help too),
but data is not: how do you relocate pointers of a swapped out process when
you swap it in at a different address?
I have fuzzy memories of a system in which you had a pair of
privileged registers (base and limit) which allowed you to implement
swapping and moving programs around in physical memories: all addresses
were checked against the limit and the base was added to perform
physical accesses. I might be wrong: it was about 20 years ago and I've
used so many different systems since then. But there is no such
mechanism on a 68000 for example (you could add it externally) and
it has its own problems (no easy way of sharing library code).
(Yes we're drifting way off-topic.)
> Linux 8086 can swap because it can use CS/DS updates to relocate code/data.
Unless I miss a subtle trick, that's using the segment registers as a
poor man's MMU. You can share library code with far calls but you can't
use "far" data pointers, can you?
> The way it worked on older systems is that you never run a program which
> isnt entirely in memory. With that constraint you know it won't suddenely
> want data you don't have.
Oh yes, I've used such systems a loooong time ago. But I can't remember
the details well enough.
Gabriel.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/