6 Data and Control Synchronization

IN THE LAST CHAPTER, we saw that the Windows kernel intrinsically supports several kinds of synchronization through kernel objects. What wasn’t emphasized, however, was that you seldom want to use kernel objects directly as your primary synchronization mechanism. The simplest reason for this is cost. They cost a lot in time due to the kernel transitions required to access and manipulate them, and in space due to the various auxiliary OS data structures that are required to manage instances, such as the process handle table, kernel memory, and so forth. At the same time, if your program must truly wait for some event of interest to occur, you ultimately have no choice but to use a kernel object in one form ...

Get Concurrent Programming on Windows now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.