Atomic execution?
While seeing the preceding code flow diagrams, you can be misled into believing that once the process starts executing its code, it continues undisturbed until it finishes. This is certainly not necessarily going to happen; in reality, the process will often get context switched out of and back into the CPU as they run.
This leads us to an important point: atomic execution. A piece of code is considered to be atomic IFF (if and only if) it always runs to completion without interruption. Atomicity, especially in userspace, is not guaranteed: often, the process (or thread) execution is interrupted or preempted (sources of interruption/preemption include hardware interrupts, faults, or exceptions, and scheduler context switching). ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access