- Extending Xen* with Intel® Virtualization Technology
- ENERGY STAR* System Implementation
- Competitive Comparison: Dual-Core Intel® Xeon®: Processor-based Platforms vs. AMD Opteron*
- CMP Implementation in Systems Based on the Intel® Core™ Duo processor
- Software Company Plans for Multi-Core: How Epic Games, Adobe Systems, and IBM use Multi-Core Capability
- How to use all of CPUID for x64 platforms under Microsoft Visual Studio .NET 2005
- Flash and .NET Integration using ASP.NET
- Build and consume an ASP.NET Web service
- Multithreaded .NET Web service clients: threads and responsiveness
- High performance image processing and visualization in .NET client applications: Intel Integrated Performance Primitives (IPP)
Welcome to the Intel® Software Dispatch Subscription Program
by Sergey N. Zheltov, project manager, and Stanislav V. Bratanov, software engineer, Microprocessor Research, Intel Labs. Intel Corp.
Anyone designing multithreaded applications will agree: the problem of efficient synchronization is among the most difficult tasks of parallel programming. Modern operating systems provide a multitude of synchronization objects, which determine a variety of synchronization methods and schemes.
This article addresses some of the issues of parallel program synchronization and tries to clarify at least a few of them.
Below, several synchronization schemes are discussed; synchronization object behavior is described; internal system implementation of user-visible synchronization objects or functions is also explained where applicable. Hidden timings and latencies are provided; execution thread layout is shown over time, and non-obvious thread time shifts are pointed out.
Readers will also find code examples illustrating important points of the synchronization problem.
All discussions of synchronization objects and algorithms appearing in this article pertain to Microsoft Windows* implementations of such objects and algorithms.
Definitions
Several abbreviations are used throughout the article to denote the following terms:
IPI stands for Inter-Processor Interrupt, an interruption signal sent by one processor to another.
APC, Asynchronous Procedure Call, which is a Microsoft Windows notification scheme enabling the execution of a specified procedure within the context of a specified thread.
Internal Implementation
This article addresses wake-up and signaling schemes which are used to directly control the execution of threads. Schemes of mutual exclusion, which are mostly employed to synchronize resource usage (granting access to a resource to only one thread), are beyond the scope of the article.
Also, in this article we assume that all necessary resources have been already divided between threads; the task is to wake up the thread and load each of them with an appropriate amount of work.
As various mutual exclusion constructions are not within the scope of this article, only two sorts of synchronization objects typically used for signaling are considered: events and semaphores.
From an operating system kernel point of view, all objects involved in synchronization (those whose handles may be specified as arguments of WaitForSingleObject / WaitForMultipleObjects functions) are derived from one basic structure DISPATCHER_HEADER declared in Microsoft Driver Development Kit in the following form:
The most important fields of which are SignalState, and WaitListHead that let the system differentiate between synchronization objects and organize a list of waiting threads which are to be woken up when the SignalState becomes Signaled.
So event, semaphore, mutex, timer, and thread objects look similar to the kernel.
Read the rest of this tutorial: click download, below.
© 2005 Intel Corp.
![]()
![]() | Building Web services using Visual Studio .NET by Soumya Guptha, technical marketing engineer Intel Corp. Softwa... |
If you're interested in this topic, these articles may be helpful:
![]() | Getting ready for hyper-threading technology, part I: changing the mindset by Andrew Binstock, principal analyst, Pacific Data Works LLC. Intel C... |
![]() | Detecting Hyper-Threading Technology and dual cores by Jeff Andrews. Intel Corp. Intel has always continued to improve ... |
![]() | Platform 2015 Software: Enabling Innovation in Parallelism Without a doubt, computing has made great strides in recent years. But... |
![]() | Parallel computing for imaging applications from Intel Corp. Desktop developers, it's time to thread your apps.... |
![]() | Multi-Core: Intel's new processor architecture explained by Andrew Binstock, principal analyst, Pacific Data Works LLC. L... |
![]()
Related Jobs:


