Method for implementing spin lock in database
Patent Information
- Authority / Receiving Office
- CN ยท China
- Current Assignee / Owner
- HUAZHONG UNIV OF SCI & TECH
- Publication Date
- 2011-07-20
- Estimated Expiration
- Not applicable ยท inactive patent
Smart Images
Figure 1 Figure 2 Figure 3
Abstract
Description
technical field
[0001] The invention relates to the technical field of databases, in particular to an improved implementation method for spin locks in the concurrency control process. Background technique
[0002] In lock-based transaction concurrency control technology, databases often use spin locks to protect data structures and operations on them. The spin lock overhead is extremely small, but the spin lock can only protect light access to the data structure. During the spin lock protection period, there cannot be system calls or system interruptions. The protection time is very short, generally only for dozens of processors cycle. Because the principle of the spin lock is simple, the solution to the deadlock is also very simple. Usually, a timer with a fixed duration is used to time the task. Once the timing of the task is up, the subsequent task will be automatically unlocked directly. It is precisely because of this principle that when there are multiple tasks compe...