Method and system for low overhead spin lock instrumentation
US6622189B2 · kind B2 · utility
Assignee
Inventors
Key dates
| Filing date | Nov 30, 2000 |
| Grant date | Sep 16, 2003 |
| Priority date | — |
| Expiry date | Feb 27, 2022 |
Classification
- Technology area (CPC G)Physics
- CPC primaryG06F2201/885
- WIPO fieldComputer technology
- WIPO sectorElectrical engineering
Abstract
A method and apparatus is presented for controlling spin lock instrumentation for a spin lock in a system with a cache. A lock flag represents a busy state for the spin lock; a first instrumentation flag is a global variable representing an enablement state for the spin lock instrumentation. A second instrumentation flag, stored within the same cache line as the lock flag, is also maintained as an updateable indication of the first instrumentation flag. Prior to each acquirement of the spin lock, the second instrumentation flag is checked for an indication that spin lock instrumentation is enabled. Although a reading of the lock flag may generate a cache miss, the lock flag is necessarily checked upon attempting to acquire the lock; the check of the second instrumentation flag cannot generate a superfluous cache miss because the second instrumentation flag is in the same cache line as the lock flag.
Source: USPTO / EPO open patent data. Objective bibliographic and citation counts.