Lock File Deadlock Detection via Temporary Process Verification

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for synchronizing access to shared resources in computing systems are prone to deadlocks, particularly when a process fails to release a lock file, leading to performance deterioration and unreliable deadlock detection.

Innovation Solution

The method involves creating a temporary file with a unique name, linking it to the lock file, and checking for the existence of the process specified in the lock file, allowing for safe access and removal of the lock if the process is no longer active, thus preventing deadlocks and enhancing reliability.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a lock file is created to synchronize access to a shared resource, then access control is improved, but the system becomes vulnerable to deadlocks when processes fail to release locks

Engineering Contradiction:
Improveaccess control reliabilityVSAvoiddeadlock detection complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent introduces a temporary file as an intermediary between the locking process and the lock file. This temporary file stores process information and serves as a verification mechanism. When a process fails to release a lock, the system can check the temporary file to verify whether the locking process still exists, thereby detecting deadlocks without adding complex monitoring infrastructure.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent performs preliminary actions by creating a temporary file with process information before actually creating the lock file. This preliminary step establishes a verification mechanism in advance, allowing the system to later check whether the locking process is still active before granting access, thus preventing deadlocks before they occur.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If deadlock detection mechanisms are added to the lock file system, then deadlock reliability is improved, but system performance deteriorates due to additional checks

Engineering Contradiction:
Improvedeadlock detection reliabilityVSAvoidsystem access speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent implements a self-service mechanism where the lock file system automatically verifies process existence using the temporary file without requiring external monitoring or complex detection algorithms. The system serves itself by checking the temporary file's process information, eliminating the need for additional performance-heavy deadlock detection infrastructure.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent uses a simple temporary file as a disposable verification object. This temporary file is created, used for verification, and then discarded. The approach uses a simple, low-cost mechanism (a basic file with process information) rather than expensive, complex monitoring systems, maintaining high performance while providing reliable deadlock detection.

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

3Reliability

If process verification is performed before granting access, then deadlock prevention is improved, but the ease of operation deteriorates due to additional verification steps

Engineering Contradiction:
Improvedeadlock preventionVSAvoidresource access simplicity
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The patent merges the verification step with the lock acquisition process itself. Instead of separating verification from locking, the system combines them into a single atomic operation where the temporary file is created and checked in one flow. This integration maintains simplicity while ensuring deadlock prevention.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS9507817B2Method for synchronizing access to shared resources of a computing system and detecting and eliminating deadlocks using lock files
Publication Date: 2016.11.29 OTKRYTOE AKTSIONERNOE OBSHCHESTVO INFORMATSIONNYE TEKHNOLOGII I KOMMUNIKATSIONNYE SISTEMY
  • US9507817B2 patent drawing
  • US9507817B2 patent drawing

AI summary

The disclosure generally relates to computer engineering, in particular, to a method for synchronizing access to shared resources of a computing system, and for detecting and eliminating deadlocks using lock files. The disclosure advantageously improves reliability of detection and elimination of deadlocks. The method grants access to a shared resource to other processes and ensures that there will be no deadlock in cases where the process, whose data is indicated in the lock file, does not currently exist in the computing system (for example, an application was aborted from RAM by the operating system due to an internal software failure). The method can be preferably implemented in POSIX-compatible operating systems, in particular, the GNU/Linux operating system.