3 ms·
What's so wrong with the context switch? You need to have some anyway if you want threads in your unikernel.
by ahoka 7y ago
What's so wrong with the context switch? You need to have some anyway if you want threads in your unikernel.
- eyberg 7y agoThis is a common misunderstanding. There are many different types of context switching and you need the context (heh!) To compare apples to apples. Kernel to userland, thread to thread, process to process, kernel thread vs user thread, etc. It's conflated because different threading models and different kernel/userland separations exist. Generally speaking (in linux) threads perform much much faster than switching processes.
- rwmj 7y agoThis is right, and the other mistake people make is measuring just the context switch, and not the many hundreds of thousands of cycles after the context switch spent repopulating the cache.