Fine-Grained Locking for Data Storage I/O Synchronization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Data corruption occurs in data storage systems with concurrent I/O operations that lack synchronization or locking, particularly in systems using snapshots, leading to inconsistent chunk writes and metadata corruption.

Innovation Solution

Implementing a method that uses reader and writer locks to synchronize I/O operations, allocating locks only when needed with minimal granularity, and utilizing a lock data structure that includes wait and dispatch queues to manage lock requests, ensuring that writer locks are exclusive and reader locks can be shared among readers but not with writers.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If concurrent I/O operations are allowed without synchronization, then system throughput and productivity are improved, but data corruption and metadata consistency are compromised

Engineering Contradiction:
ImproveI/O operation throughputVSAvoiddata integrity
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent segments the storage space into provisions and chunks, and implements fine-grained locking at the chunk level rather than locking entire provisions. This segmentation allows multiple I/O operations to proceed concurrently on different chunks while maintaining data integrity through targeted synchronization only where needed.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies different locking strategies to different regions: reader locks for read operations that can be shared, and writer locks for write operations that require exclusivity. This local differentiation of lock types allows maximum concurrency for reads while ensuring data integrity for writes, resolving the contradiction between throughput and reliability.

Inventive Principle:
Principle #3Local quality

2Reliability

If fine-grained locking is implemented to prevent data corruption, then data integrity is improved, but system complexity and overhead increase

Engineering Contradiction:
Improvedata integrityVSAvoidlocking mechanism complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The lock data structure is segmented into multiple chunks, each with its own lock state. This allows the system to track and manage locks at a granular level without requiring a monolithic complex locking mechanism. Each chunk's lock state is independently managed, simplifying the overall structure while enabling fine-grained control.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The locking mechanism automatically manages its own state through the lock data structure, which tracks reader/writer lock states for each chunk. The system self-regulates concurrency by checking lock states before allowing operations, eliminating the need for external complex coordination mechanisms.

Inventive Principle:
Principle #25Self-service

3Productivity

If reader locks are shared among multiple readers, then read throughput is improved, but consistency with concurrent writers may be compromised

Engineering Contradiction:
Improveread operation throughputVSAvoidmetadata consistency
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent implements different lock semantics for different operation types: reader locks allow multiple concurrent readers but block writers, while writer locks provide exclusive access. This local differentiation ensures that read throughput is maximized through sharing, while metadata consistency is maintained by preventing concurrent writes during reads and vice versa.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The lock data structure provides feedback about the current lock state (reader lock held, writer lock held, or no lock) before allowing new operations. This feedback mechanism ensures that readers can proceed concurrently when safe, while automatically blocking operations that would compromise metadata consistency, thus resolving the contradiction between throughput and reliability.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS7774569B1Locking and synchronizing input/output operations in a data storage system
Publication Date: 2010.08.10 AMZETTA TECH LLC
  • US7774569B1 patent drawing
  • US7774569B1 patent drawing
  • US7774569B1 patent drawing

AI summary

Technologies are presented herein for synchronization of I/O operations in a data storage system. Multiple reader and writer locks may be acquired by calling processes at two different granularities. Locks may be acquired for an area of storage equivalent to the logical unit of allocation or for a sub-provision area equivalent to a unit of snapshot read-modify-write. Each lock may be represented by a lock data structure that represents the same amount of logical address space as the logical unit of allocation. A request that arrives to the lock data structure may be placed in a lock wait queue until the request can be honored. A round robin technique may be utilized to respond to requests for locks so that one lock does not starve out other locks.