rdos wrote:Paging is not an effective protection mechanism. It is a complete disaster for protection unless multiple address spaces are also used.
What do you know? Every major OS these days uses multiple address spaces.
Now, I do like the idea of using a segmentation-type mechanism to make switching address spaces faster, and to let programs access multiple address spaces concurrently (take for example the PDP-11, which, while not the best example of what I'd like to see, had four sets of address translations active at any one time: kernel code, kernel data, user code, and user data). But the kind of segmentation scheme that would satisfy me probably wouldn't satisfy you, if you want something that can protect programs from themselves.
Poppycock. For protecting programs from each other, and protecting the kernel from programs, paging does quite well. Where it doesn't do so well is in protecting programs from themselves (catching array overruns and such).Basically, paging only has no better protection than real mode where anything can be overwritten by anybody.
The thing is, protecting a program from itself is great for debugging (so that you catch an out-of-bounds array index when it occurs, rather than at the end of a seven-level chain of wild pointers), but just slows things down in production code. Therefore, it's a good thing to implement in software, but not so good to implement in hardware. Witness the iAPX 432 and how poorly it did.
For production code, self-protection doesn't really do anything: if there is a pointer bug in any code that runs while a program is executing (whether it be in the program itself or in a library), it will cause failures. Whether those failures cause an immediate segfault (with self-protection) or a delayed heisenbug (without it) is irrelevant to the end user. The program still doesn't do the job he set it to.