Implementing Scalable Atomic Locks for Multi-Core Intel® EM64T and IA32 Architectures
Windows File Locking ASP.NET Semaphore C++ Example Code: There are several different methods of atomically locking code and data on a Microsoft Windows platform. The primary purpose of this whitepaper is to give developers a brief introduction to the different methods of locking in Windows and the associated performance costs associated with those locks. This information is particularly applicable since future architectures will be multi-core.

by Michael Chynoweth and Mary R Lee

Abstract

There are several different methods of atomically locking code and data on a Microsoft Windows platform. The primary purpose of this whitepaper is to give developers a brief introduction to the different methods of locking in Windows and the associated performance costs associated with those locks. This information is particularly applicable since future architectures will be multi-core.

Introduction

Multi-threading software applications is critical for increasing performance for Intel’s Core Architecture. Locking code can frequently be the most frequently run code in a multi-threaded application. Determining which methodology of locking to utilize can be as critical as identification of parallelism within an application. The primary purpose of this whitepaper is to give developers a brief introduction to the different methods of locking in Windows and the associated performance costs associated with those locks. Some Window’s locking APIs have the possibility of jumping into the operating system kernel. This white-paper will detail which ones jump into the kernel and under which conditions.

Two different locking kernels are used to demonstrate the impact of locks representing different granularities. The first locking kernel emulates a scenario of locking and unlocking a dynamically linked list which would commonly be used to maintain a freelist by a memory manager. For a multi-threaded application, it would be necessary to first lock the list before a thread attempts to malloc or free memory. The second locking kernel represents a more granular lock in that it simply obtains the ThreadID of the thread which has obtained the lock, updates a global variable, and then releases the lock. The performance of the different locks under low and high contention scenarios is tested through scaling the number from 1 to 64 threads. Each thread obtains the lock 10,000,000 times performs an operation and then releases the lock. The OS timing has been changed for Windows XP from 10 ms to 1 ms for these experiments.

If you're interested in this topic, these articles may be helpful:

Intel® Visual Fortran Compiler 8.1 for Windows
Achieve outstanding application performance with advanced optimization...
Getting started with SSE/SSE2 for the Intel Pentium 4 Processor
Intel Corp. This paper teaches the programmer how to get started ...
Intel Extended Memory 64 Technology (EM64T)
from Intel Corp. With the latest Intel® Xeon™ processor p...
Tuning IBM DB2 databases for Intel Itanium 2-based systems
See complete article by Guojian Cai, IBM software developer, DB2 UD...
Intel Mobile Application Architecture Guide
Intel Corp. Companies are recognizing the potential for mobilized s...

Related Jobs:

Lead Systems Administrator 0377 #Q08720 - DC - Washington - BAE Systems
* Description: o A candidate must be able to perform t...
System Analyst #2007RSA-BLAUTH13365IL33 - CA - San Diego - Computer Sciences Corporation
Principal Duties and Essential Job Functions: The application packagi...
Web Content Manager #9x5DhAAI - CA - San Francisco - Salesforce.com, Inc.
Web Content Manager Location(s): San Francisco, CA - HQ Apply Now ...
Engineer-Network #57599 - GA - Alpharetta - Siemens AG
Engineer-Network Company Siemens IT Solutions and Services, Inc. ...
Software Engineer V #761645 - MA - Boxborough - Cisco Systems, Inc.
Description Software technical lead position for next generation car...
Field Engineer II - Solaris Servers #FCS00356 - NY - New York - Fujitsu Computer Systems Corporation
Field Engineer II - Solaris Servers - FCS – FCS00356 Descr...
Senior Database Programmer Analyst #188099 - CT - Hartford - UnitedHealth Group
Senior Database Programmer Analyst - Plymouth, MN or Hartford, CT – ...
Mgr, Sr. Project #5429 - CA - Sunnyvale - St. Jude Medical, Inc.
Job Title: Mgr, Sr. Project Location: Sunnyvale - CA Job Function:...
Information Security Engineer #2007RSA-PJJLM113022IL33 - DC - Washington - Computer Sciences Corporation
Principal Duties and Essential Job Functions: *Provides expert guidan...
Project Manager #5019 - CA - Los Angeles - Tribune Company
Project Manager Los Angeles Times « Back to Search Form Details ...