3 ms·
I don’t get this. Any software implementation of virtual address space is going to need translation tables and “lookaside” caches. But now those structures are
by twoodfin 3y ago
I don’t get this. Any software implementation of virtual address space is going to need translation tables and “lookaside” caches. But now those structures are competing with real application data for L1 space and bandwidth, not to mention the integer execution units when you use them.
As I understand, the Smalltalk world put a lot of engineering effort into making the software-based model work with performance and efficiency. I don’t think the results were encouraging.
- jacobgorm 3y agoThe software-implementation would not have to be a direct emulation of what the hardware does. You are working with the type-system of whatever sandboxed language you are running, and can make much more high-level decisions about what accesses would be legal or not, or how they should get translated, instead of having to go through table lookups on each and every memory access. If you trust the JIT or the compiler you can even make many of the decisions ahead of time, or hoist them outside of loops to virtually eliminate any overhead. A lot has happened since Smalltalk.
- gpderetta 3y agoPaging and lookaside tables are needed for virtual->physical translation. The idea is that a pure software based implementation wouldn't need it at all, at most it would use something segment-like (with just a base offset and segment bound) that it is much easier to handle. Then again, that's the theory, in practice there are many reasons why hardware moved from early segment based architectures to paging, and memory isolation is only one of them.
- insanitybit 3y agoI guess we'd end up with hardware implementations returning to segmentation registers.
- dathinab 3y agono we will never segmentation was an evil everyone both from the hardware and software side was very happy to get ride of whoever reintroduced segmentation will probably be burned on a stick by computer developers in the afterlife (/j)
- gpderetta 3y agoYet CHERI is gaining some ground.
- insanitybit 3y agoWhat makes you say that? I know Grsecurity made solid use of the segmentation registers for quite a long time.
- candiodari 3y agoReal answer: because software implementation works by proving mathematically (without running the code) that it won't violate the virutal address space reserved for it by the kernel. Then, at runtime, it then does nothing at all. Which is very fast.