File Write Lock Bypass via Temporary File Segmentation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing file access systems require write requests to wait for previous requests to release locks before proceeding, leading to substantial delays in job completion due to sequential file locking mechanisms.

Innovation Solution

Implementing a system where write requests can complete by writing to temporary files without obtaining a write lock, allowing data to be copied to the main file in the order received, while maintaining read and write order and ensuring data integrity.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a write lock is obtained before writing to a sequential file, then data consistency is ensured, but write requests are substantially delayed while waiting for previous requests to release the lock

Engineering Contradiction:
Improvedata consistencyVSAvoidwrite request delay
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent segments the file writing process into two independent parts: (1) writing data to a temporary file without requiring a lock, and (2) copying data from the temporary file to the main file when the lock is available. This segmentation allows write requests to proceed without waiting for locks, eliminating delays while maintaining data consistency through the copy operation.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a temporary file as an intermediary between the write request and the main file. Write requests write to this intermediary temporary file without needing a lock on the main file. The temporary file acts as a buffer that decouples the write operation from the lock acquisition, allowing concurrent writes while ensuring eventual consistency when data is copied to the main file.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If multiple write requests are queued to obtain locks sequentially, then data integrity is maintained, but job completion time is substantially increased

Engineering Contradiction:
Improvedata integrityVSAvoidjob completion rate
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent divides the file access operation into two independent segments: writing to a temporary file (no lock needed) and copying to the main file (lock required). This allows multiple write requests to proceed in parallel to their respective temporary files simultaneously, dramatically improving job completion rate while maintaining data integrity through the ordered copy operation.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs the write operation to a temporary file as a preliminary action before acquiring the lock on the main file. This preliminary write completes immediately without waiting for lock availability, and the actual file update is performed later when the lock is obtained, ensuring both high productivity and data integrity.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If a lock is held during read and write operations, then concurrent access is prevented, but subsequent write requests must wait for lock release

Engineering Contradiction:
Improveconcurrent access controlVSAvoidlock holding time
Core Design Contradiction:
ReliabilityVSDuration of action of moving object

Solution Approach 1:

The patent segments the access control mechanism so that the lock is only held during the brief copy operation from temporary file to main file, not during the write operation itself. This segmentation reduces lock holding time from the entire write duration to only the copy duration, improving throughput while maintaining concurrent access control during actual file modifications.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The temporary file serves as an intermediary that eliminates the need to hold locks during write operations. By writing to the temporary file first (without lock) and then copying to the main file (with brief lock), the system reduces lock holding time while maintaining proper access control, allowing other requests to proceed concurrently.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS8954408B2Allowing writes to complete without obtaining a write lock to a file
Publication Date: 2015.02.10 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US8954408B2 patent drawing
  • US8954408B2 patent drawing
  • US8954408B2 patent drawing

AI summary

Provided are a computer program product, system, and method for allowing writes to complete without obtaining a write lock to a file. A lock is provided to a first request, comprising a read or write request, to access the file. A second write request is received while the first request maintains the lock. A temporary file associated with the file for the second write request is created. The second write request is controlled to write to the temporary file while the lock is held by the first request. In response to completing the first request, the lock is granted to the second write request to write the data in the temporary file to the file.