3 ms·
> avoiding expensive kernel<-->user-space switching And replacing it with expensive userspace<--->userspace switching. But because the kernel is still doing t
by ori_b 7y ago
> avoiding expensive kernel<-->user-space switching
And replacing it with expensive userspace<--->userspace switching.
But because the kernel is still doing the context switch between the processes, now you're doing userspace<-->kernel<--->userspace switching.
- nybble41 7y agoIn the ideal case the IPC mechanism is just a block of memory shared between processes running simultaneously on separate cores, so there is no need to context-switch. You still want some sort of kernel-based blocking semaphore to avoid busy-waiting when the IPC queue is empty, but since it's only used when the queue is empty it isn't part of the performance-critical path.