Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.
1695 Discussions

Q&A: Implementing Scalable Atomic Locks for Multi-Core Intel EM64T and IA32 Architectures


This is a question received by Intel Software Network Support related to the article Implementing Scalable Atomic Locks for Multi-Core IntelEM64T and IA32 Architectures, by Michael Chynoweth and Mary R. Lee, along with an answer supplied by the authors:

Q. In the article you said "The OS timing has been changed for Windows XPfrom 10 ms to 1 ms for these experiments." But you did not explain how. I need to change the time slice to 1mS. Please advise.

A. The OS timer on client Windows* XP is 10ms by default. It can be changed to another time utilizing the timeBeginPeriod API. This is a naughty little trick done by many multimedia applications. Here is the link for the API lookup:

WARNING: This API is not for the faint of heart since it has some serious repercussions:
1)It will increase your interrupt rate, which drains your power faster
2)It will increase your CPU utilization slightly

Windows Vista* has a new thread scheduler, so many of the reasons where timeBeginPeriod is necessary will not hold true. If this is for locking andyou are having issues with the OS lock reacting quickly enough, look at some user-land non-blocking locks such as TryEnterCriticalSection.We like to try and time the lock hold-times with theRDTSC and use this to decide what type of lock is needed.


Lexi S.

IntelSoftware NetworkSupport

Contact us

0 Kudos
0 Replies