4 ms·
What are the benefits of doing so?
by codetrotter 8y ago
What are the benefits of doing so?
- naasking 8y agoThe cost of context switching is near zero. No need for expensive TLB flushes, for instance. No need for paged memory whose overhead sometimes accounts for up to 50% of program runtimes. Better isolation properties, since you can sandbox individual objects instead of whole processes.
- lkurusa 8y ago> expensive TLB flushes Note that modern CPUs store a tag of the current "address space ID" next to the TLB line, thus the cost of the flushing is heavily reduced. > No need for paged memory Unless you mean swapping, this doesn't apply as x86_64 long mode requires paging to be enabled.
- naasking 8y ago> Note that modern CPUs store a tag of the current "address space ID" next to the TLB line, thus the cost of the flushing is heavily reduced. Yes, tagged TLBs are much better, but the overhead is still not negligible. You can check the microkernel literature for all of the inefficiencies encountered in modern CPUs, and a language-based OS would eliminate most of them because protection is moved into the language itself. > Unless you mean swapping, this doesn't apply as x86_64 long mode requires paging to be enabled. a) This benefits from better caching since there's only one set of page tables, and b) CPUs are designed around the common uses, so if this OS design catches on, you'll start seeing CPUs that don't require page tables.
- monocasa 8y ago> Note that modern CPUs store a tag of the current "address space ID" next to the TLB line, thus the cost of the flushing is heavily reduced. Except you flush the TLBs as part of the meltdown mitigation.