Single Address Space Operating System
c2.com
c2.com
That change is coming. You can statically link to addresses in that world. It makes for some really interesting optimizations in terms of code which falls through into optimizations in terms of JITs.
Is it a net win? I think so, there would clearly be new ways in which it would be a challenge but you can make some useful reasoning about validity of addresses with a numerical compare that isn't nearly as efficient in a variable address OS.
The way you describe this, it sounds like segmentation. Wouldn't the value of each processing having a memory prefix be that all its internal data would think they have an offset of zero?
ptr & prefixmask != prefix
means its out of range. That is a pretty cheap optimization, VMS and SunOS both used that sort of check in kernel space to insure that the kernel wasn't about to dereference a pointer outside of kernel space (potentially in some random process).There's a 1994 COMPCON paper on it.
If I remember correctly, the caches were virtually tagged, even on the StrongARM, making context switching on linux very expensive.
salem is referring to how addresses are compared in the cache: http://en.wikipedia.org/wiki/CPU_cache#Virtual_tags_and_vhin...
you are referring to ASIDs which are the mechanism by which different address spaces can share space in the TLB at the same time: http://www.helenos.org/doc/design/html.chunked/mm.html#id253...
The MMU features were available on ARMs for a surprisingly long time, and I remember seeing at least one embedded OS other than Newton that used them.
However their best trick was keeping the machine code and OS so separate than when migrating to RISC from CISC you didn't even need the source code for the majority of code running on the system to migrate.
For anyone unfamiliar with the AS/400 and predecessors I highly recommend the expensive book by Frank Soltis who is largely the architect of it. Many things were done very differently than other operating systems and applications. http://www.amazon.com/Inside-AS-400-Second-Edition/dp/188241...
Imagine all the world's computers running in a single unified address space. All network access is abstracted away, loading a resource is as simple as loading a memory address.
It would be like a new golden era for C! Rather than using URIs or some sort of XML addressing schema or whatever else people decide to invent, instead, all the world's information and knowledge from all around the world (solar system, universe?) is available through one unified address space.
Although I imagine we'd still need some sort of DNS system running on top. ;)
The standard rebuttal to this thinking is Waldo et al. "A Note on Distributed Computing" from 1994. http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.41.7...
"We argue that objects that interact in a distributed system need to be dealt with in ways that are intrinsically different from objects that interact in a single address space. These differences are required because distributed systems require that the programmer be aware of latency, have a different model of memory access, and take into account issues of concurrency and partial failure."
It's the greatness of the potential of failure/hang on all actions that separates local RAM access from distributed computing. You don't generally need to worry about your app hanging indefinitely because of a memory read.
With page files, all of those are treated the same by the programmer.
Local HDD can already have access latency similar to the local network!
It is another order of magnitude to go beyond that. Meh.
Reliability is, IMHO, the bigger issue.
Right, there are situations where "in RAM on that other computer" is closer than "on my disk".
In many cases we just don't care, because a CPU hooked up to RAM is still pretty fast for many use cases. When you do care, this abstraction is actually a huge problem!
I think this demonstrates my point, not refutes it.
Which is a BAD thing, because it's one hell of a leaky abstraction.
http://en.wikipedia.org/wiki/Fallacies_of_Distributed_Comput...
> 1.The network is reliable.
I don't assume my file system is reliable. Flash fails.
> 2.Latency is zero.
Latency is non-0 even on local access! My team's requirements is that anything that may take more than ~1ms is done async. This includes memcopy!
> 3.Bandwidth is infinite.
Never has been, even locally.
> 4.The network is secure.
Local busses are not secure either.
> 5.Topology doesn't change.
I'll give'em that, although this is hopefully less of a problem now days, ignoring NATs...
> 6.There is one administrator.
Again, the industry has hopefully evolved to understand finer grained access controls.
> 7.Transport cost is zero.
Nope, never has been even locally. You doing something consumes resources from someone else.
> 8.The network is homogeneous.
Half the fun is in things being heterogeneous! Put work where it is best done at.
Well, it'd certainly be a new golden era for DRAM manufacturers as every pointer in the system bloats up to 8x original size just to support a 0.1% use case...
Structuring a kernel like this makes the micro-kernel idea much more palatable as context switch overheads drop dramatically.
Couldnt' help but smile when I read this.
Maybe it doesn't count because there was no protection against intentional reading or writing of memory belonging to other apps or the OS. But the protections against unintentional writing were good enough to make for a remarkably robust system, in a time when nobody cared about security.
http://en.wikipedia.org/wiki/Genera_%28operating_system%29
Fascinating thing.
Fun fact, the most reliable indicator that you have this kind of setup is whether the Unix emulation layer (if present) offers fork() - if only one process can access a given address then you obviously can't create a copy of a process that uses pointers.
The traditional approach is to flush the tlb and load new a new memory map on a context switch in order implement isolation , though what you're talking about sounds like something else.
Think about it like IPv4 vs. IPv6, i.e. hacks like NAT, vs. "everything has its own IP address in a single flat address space of IPs".
It's the same, but with computer memory. And it has the same benefits.
Ironically, VxWorks's latest major rev was all about turning memory protection on since overwhelmingly people prefer the performance hit of kernel calls over the heisenbugs that come from stomping on the kernel's code and data structures.
Edit: Oh, I see from your other comment that you're talking about the benefits to people who don't feel this need.
What, specifically, is bad/wrong about the traditional way of doing process isolation, and what does this approach bring to the table ?
http://webcourse.cs.technion.ac.il/236376/Spring2013/ho/WCFi...
One bonus not mentioned in the article is context switches no longer need to flush the TLB (the MMU's cache which is indexed by virtual address). Thus you don't lose the cache entries for shared libraries or kernel space.
I still miss Marble Madness and Hole-in-one Miniature Golf.
And Tom Rokicki was a god.
Kind of an interesting idea. Seems like it would pair well with the NixOS way of doing things…
I mean, how are you going to write your own interrupt handlers and schedule your own DMA transfers if you can access neither the CPU's interrupt vector nor the custom chip registers from your process's address space?