Pype.Clicker wrote:
note that if all the process manager does is to maintain
other's address space, it doesn't necessarily need to access TLBs itself: the TLB will actually be flushed when returning to the calling process
Now, when I read this, I see two possibilities:
1. The process managers lives in a totally separate address space. Hence, to return, a context switch happens, which flushes the TLBs.
2. The kernel implements some scheme that 'diffs' the old and the new mappings, and invalidates the relevant TLBs.
Now, what about the kernel mappings? Do we only let the process manager touch the page tables, and only map those page tables that don't contain kernel pages? (This actually doesn't sound like an awful idea.)
Or if we use some kind of tricky diffing scheme then ofcourse we can just as well protect the kernel part once we've there.
Finally, in QNX specifically the process manager lives in the system process, and is therefore present in every address space.
As a result, one could make a level-3 process manager for roughly the same cost as a level-0-in-a-separate-address-space manager.
Eh, yeah, but it'd still be slower than a level-0-in-every-address-space manager.