thewrongchristian wrote:But, of course, you can still use the protection mechanisms of the MMU within a single address space to protect the kernel from the user applications.
Then you have the situation I already mentioned with OS-9 on the e300 (but on the x86 it would work the same): If the MMU is used at all, then for each virtual address, it must look up protection attributes and physical address. Since we store those together, it does not matter if you can calculate the physical address from the virtual one, even if the page table walk is in software; you still have to look up the protection attributes anyway. Thereby negating all the supposed speed advantages of running without MMU. So you might as well do it properly.
thewrongchristian wrote:Is position independent code something you'll be looking at in your OS?
All the PIC solutions I know of are built with memory mapping in mind, and don't really lend themselves to a single-address-space world. I know of OS-9, as stated, but I know of no toolchain (except the one from Radisys themselves) that can produce OS-9 modules. And ELF and ELF FDPIC require the distance between code and data to be known at link time, and kept at load time.
See, in a multitasking single-address-space OS, what you would want, ideally, is a design that allows you to load code and data section independently of each other. That allows you to have multiple processes running the same program, and each process would have a different data section, and would all share code. OS-9 can do that, at least.
ELF and ELF FDPIC don't allow that. If a dynamic library (and position independent executables are often claiming to be dynamic libraries) wants a 2MB break between code and data, you must allocate those 2MB for the process. If another process were to use the same program, you would have to load the entire program again. No code sharing possible. The whole thing will end up as a massive waste of space, just because the OS designer didn't want to implement paging properly. Don't get me wrong: This stuff is position independent. You can load the program anywhere in address space, but it must allocate the whole area.
I don't know PE enough to make a determination about it, though. It is possible it might allow such usage. Not likely, though.