Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 5. General Development Issues > Synchronizing Multiple CPUs

Synchronizing Multiple CPUs

Modifying the IRQL of one CPU has no effect on other CPUs and multiprocessor systems. Consequently, IRQLs provide only local CPU protection to share data. To prevent corruption of data structures in a multiprocessor environment, Windows 2000 uses synchronization objects called spin locks.

How Spin Locks Work

A spin lock is simply a mutual-exclusion object that is associated with a specific group of data structures. When a piece of kernel-mode code wants to touch any of the guarded data structures, it must first request ownership of the associated spin lock. Since only one CPU at a time can own the spin lock, the data structure is safe from contamination. Any CPU requesting an already-owned spin lock will busy-wait until the spin lock becomes available. Figure 5.2 illustrates the process.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint