Automated Lock Management via Accessor Objects

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In multi-threaded computing environments, improper lock management leads to inefficiencies, errors, and high maintenance costs due to issues like deadlocks, race conditions, and performance degradation, especially in complex software projects where developers often adopt a pessimistic locking approach to avoid costly support and maintenance.

Innovation Solution

A system and method for automated consistent lock management using accessor objects that obtain read or write locks on shared resources, promoting locks as needed and ensuring correct lock types are applied, with a resource access manager tracking and managing these objects to minimize write-lock time and optimize access.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If developers use pessimistic locking approach to avoid deadlocks and race conditions, then reliability is improved, but productivity deteriorates due to excessive locking and performance degradation

Engineering Contradiction:
Improveconsistency of shared resource accessVSAvoidsystem performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system dynamically adjusts locking strategies based on actual runtime conditions rather than using static pessimistic locking. The lock manager monitors resource access patterns and automatically selects between optimistic and pessimistic locking approaches, allowing the system to adapt to changing workloads and maintain high performance while ensuring consistency when needed.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes locking parameters dynamically based on resource access characteristics. It monitors factors such as contention levels, transaction frequencies, and resource criticality to adjust lock granularity, timeout values, and locking modes, thereby optimizing the balance between reliability and productivity for different operational scenarios.

Inventive Principle:
Principle #35Parameter changes

2Productivity

If fine-grained locking is implemented to improve productivity, then device complexity increases due to managing multiple lock granularities

Engineering Contradiction:
Improveconcurrent access efficiencyVSAvoidlock management system complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The lock manager automatically performs fine-grained lock management without requiring explicit programmer intervention. It autonomously identifies appropriate lock granularities, acquires and releases locks, and handles lock conflicts based on the resource access patterns detected during execution, thereby providing fine-grained locking benefits while keeping the system simple for developers.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system segments the lock management functionality into hierarchical levels, with a central lock manager coordinating fine-grained locks on individual resources while maintaining coarse-grained locks on parent resources. This segmentation allows efficient concurrent access at the fine level while providing simplified coordination at higher levels, reducing overall system complexity.

Inventive Principle:
Principle #1Segmentation

3Ease of operation

If lock escalation is used to broaden resource access, then ease of operation improves, but reliability deteriorates due to potential consistency issues

Engineering Contradiction:
Improveresource accessibilityVSAvoiddata consistency
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The lock manager implements continuous feedback monitoring of resource access patterns and lock contention levels. When escalation is considered, it evaluates real-time system state including transaction priorities, resource criticality, and current lock holdings to determine whether escalation would maintain consistency. This feedback mechanism ensures that lock escalation occurs only when it will not compromise data integrity.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system performs preliminary validation and planning before executing lock escalation. It pre-checks whether escalation would violate consistency constraints, prepares alternative access plans if needed, and coordinates with affected transactions in advance, thereby broadening resource access while maintaining reliability through proactive consistency management.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS8849780B2System and method for automation of consistent lock management
Publication Date: 2014.09.30 SAP SE
  • US8849780B2 patent drawing
  • US8849780B2 patent drawing
  • US8849780B2 patent drawing

AI summary

A system and method for automation of consistent lock management, wherein a shared resource is accessed through an accessor object. An accessor object class includes at least one const read access function and one write access function. A const accessor object is received for read-only access of a shared resource. The compiler is enlisted to enforce lock selection.