Kernel Crossing

Asynchronous polling can be a reasonable alternative to synchronous multithreading. Although not as simple a software technique, it can, on some systems, offer significant performance advantages. The issue surrounds the cost of kernel crossings relative to context switches. We have already discussed context switching, so let us now delve into the notion of a kernel crossing.

A kernel crossing occurs when a program explicitly calls a service routine that requires kernel privilege to execute. When this happens, one of two things happens: a fat system call or a thin system call; depending on the mechanism employed by the operating system and depending on the type of service requested.

Fat system calls are, in their worst cases, full ...

Get Efficient C++ Performance Programming Techniques now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.