Priority Queue for Exclusive Locks in Database Systems

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Database systems face inefficiencies in managing concurrent lock requests, where a process waiting for a lock may expire due to prolonged waiting times, leading to unnecessary errors and delays, especially when multiple requests are made simultaneously or when a new request is more recent than an existing one.

Innovation Solution

Implementing a priority queue mechanism that manages lock requests by activating a queue for lock objects, allowing requests to be prioritized and ensuring that more recent requests are granted the lock efficiently, while expiring and removing unnecessary lock requests to prevent interminable waiting.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a fixed waiting time mechanism is used for lock requests, then processes can retry after a standardized interval, but more recent requests may be unfairly granted locks over older requests, causing inefficiency

Engineering Contradiction:
Improvelock request fairnessVSAvoidlock acquisition efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent implements a dynamic priority queue system where lock requests are assigned priorities based on recency and other factors. The priority queue dynamically reorders requests, allowing the system to adapt to changing conditions and ensure that the most relevant requests are serviced first, resolving the contradiction between fairness and efficiency.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes the parameter of request ordering from fixed temporal sequencing to priority-based sequencing. By introducing priority as a variable parameter that can be adjusted based on request characteristics, the system achieves both fairness (all requests are considered) and efficiency (appropriate requests are granted locks first).

Inventive Principle:
Principle #35Parameter changes

2Reliability

If lock requests are held indefinitely in the queue, then all requests are eventually serviced, but processes experience interminable waiting times leading to errors and system inefficiency

Engineering Contradiction:
Improverequest completion guaranteeVSAvoidprocess waiting time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs preliminary actions by setting maximum wait time thresholds and priority levels before requests are fully processed. This allows the system to proactively expire low-priority or stale requests before they cause problems, ensuring that processes don't wait indefinitely while still giving reasonable requests a chance to be fulfilled.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements a mechanism to discard expired or low-priority lock requests from the queue when higher-priority requests are waiting. This prevents indefinite waiting by selectively removing requests that are no longer relevant, while the system can recover by allowing new requests to enter the queue and maintain overall lock management functionality.

Inventive Principle:
Principle #34Discarding and recovering

Data Source

PatentUS11474990B2Priority queue for exclusive locks
Publication Date: 2022.10.18 SAP SE
  • US11474990B2 patent drawing
  • US11474990B2 patent drawing
  • US11474990B2 patent drawing

AI summary

A system includes reception of a first request for a lock on a lock object, storage of a first entry associated with the first request and the lock object in a queue, determination of a first queue position associated with the first entry based on a first priority level of the first request and on a priority level of each of a plurality of entries in the queue associated with the lock object, determination of whether a predetermined expiration time associated with the first request has expired, and, if it is determined that the predetermined expiration time has expired, deletion of the first entry from the queue.