by mee_too · 9y ago · 0 comments
But in practice, I guess this legacy architecture adds a nanosecond or two to a thread switch. Is that a big deal? How many switches does a desktop PC do in a second? How about an AWS/Azure/GCP server?
I've never experienced lag in a game or app or web server due to slow thread switch. Server side async is on the rise anyway, minimizing number of threads and switches.
I would guess the total wasted time is more like 500 cycles. This won't make your game lag, but it does mean that extremely low overhead synchronous IPC can't happen on x86.
On Windows, a lot of the windowing system is in the kernel in win32k.sys. Microsoft didn't do this for fun -- they did it because the old way (NT3.5?) was too slow.