Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What's so wrong with the context switch? You need to have some anyway if you want threads in your unikernel.


This 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.


This 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.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: