3 ms·
In general, a kernel that requires a five transitions (user->kernel->user->kernel->user) for system service calls, will be less performant than one which requir
by ChuckMcM 12y ago
In general, a kernel that requires a five transitions (user->kernel->user->kernel->user) for system service calls, will be less performant than one which requires only three (user->kernel->user) The impact is magnified with multiple services being involved. So if you naively design your disk driver as a user level process, your file system as a user level process, then something like read() from a user's applications goes: read -> kernel -> user(fs) -> kernel -> user(disk) -> kernel -> user(fs) -> kernel -> read(app). It was really really slow when things had different page mappings but it gets better if you have an alloc area where everyone shares the same virtual address space (keeps TLB thrashing down).
Per another comment on this thread the Docker as P9 process is pretty close. But it doesn't share services per se across users in the space. Spring (Sun's research OS) looked at cutting the penalties down for moving kernel/user with some nice 'doors' kinds of things. At the time there was discussion that with enough address space (so that you're VM system got the benefit of warm caches and no page remapping) you could really do some interesting things. Were I retired I would probably spend some time playing with that stuff on a modern 64 bit architecture :-)
- wolfgke 12y agofive transitions (user->kernel->user->kernel->user) three (user->kernel->user) Aren't these 4 vs. 2 transitions?
- ChuckMcM 12y agoYou are correct 5 contexts, four transitions.
- rbanffy 12y ago> In general, a kernel that requires a five transitions I wonder if it couldn't be accelerated with hardware support...