Has anyone ever tried making a single-address-space Linux variant?
One interesting variety of OS are single-address-space OSes, where there is only one giant address space (no per-process addressing, and no separate physical vs. virtual addressing). The TLB is literally turned off. I believe the MS research OS Blowfish does this for example. In order for it not to be a security nightmare you have to combine it with some other tech (proof carrying code, or running everything on top of a trusted virtual machine, etc.) but there's no reason it can't be made secure. There's a significant performance advantage, and a lot of implementation details for the OS should become simpler.
I think it'd be cool to hack on such an OS, but the problem of needing to implement a gajillion drivers is pretty insurmountable. It seems to me that the most economical way to do it would be to try and do it as a Linux kernel patch set. Has this already been tried? I googled around a bit and found nothing but I might have been using bad terms. I don't have a lot of OS experience so I don't know how deeply embedded the assumptions are going to be in the kernel about there being multiple address spaces, and whether those are likely to require per-driver changes.
Posted Jun 15, 2010, 9:15 PM UTC
check out http://en.wikipedia.org/wiki/%CE%9CClinux
Any idea how they deal with implementing fork() as mattcox brought up? It's not mentioned in their FAQ.
uClinux doesn't provide fork(). Applications have to use either threads or vfork().
I'm not that famiilar with uclinux, but I think it forgoes the copy-on-write semantics completely, in favor of using relocatable images that get duplicated up front, then have all references shifted in the copy. This normally implies that processes are constrained to a contiguous region, with no runtime allocation or dynamic linking.
Looks like a classic speed vs. size tradeoff, in that context switches are cheaper due to the global address space, but at the cost of having to pre-allocate all heap space and giving every process its own copy of libc, etc. You also lose memory protection with no mmu, but might gain some speed.