首页>
外国专利>
Partitioned Ticket Locks With Semi-Local Spinning
Partitioned Ticket Locks With Semi-Local Spinning
展开▼
机译:具有半本地旋转功能的分区票证锁
展开▼
页面导航
摘要
著录项
相似文献
摘要
A partitioned ticket lock may control access to a shared resource, and may include a single ticket value field and multiple grant value fields. Each grant value may be the sole occupant of a respective cache line, an event count or sequencer instance, or a sub-lock. The number of grant values may be configurable and/or adaptable during runtime. To acquire the lock, a thread may obtain a value from the ticket value field using a fetch-and-increment type operation, and generate an identifier of a particular grant value field by applying a mathematical or logical function to the obtained ticket value. The thread may be granted the lock when the value of that grant value field matches the obtained ticket value. Releasing the lock may include computing a new ticket value, generating an identifier of another grant value field, and storing the new ticket value in the other grant value field.
展开▼