KR20050111885A - Mechanism for detecting/recovering deadlocks caused by lock and latch in data storage system - Google Patents

Mechanism for detecting/recovering deadlocks caused by lock and latch in data storage system Download PDF

Info

Publication number
KR20050111885A
KR20050111885A KR1020040036809A KR20040036809A KR20050111885A KR 20050111885 A KR20050111885 A KR 20050111885A KR 1020040036809 A KR1020040036809 A KR 1020040036809A KR 20040036809 A KR20040036809 A KR 20040036809A KR 20050111885 A KR20050111885 A KR 20050111885A
Authority
KR
South Korea
Prior art keywords
data
lock
storage system
transaction
locks
Prior art date
Application number
KR1020040036809A
Other languages
Korean (ko)
Inventor
황규영
김원영
임효상
김민수
Original Assignee
한국과학기술원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 한국과학기술원 filed Critical 한국과학기술원
Priority to KR1020040036809A priority Critical patent/KR20050111885A/en
Publication of KR20050111885A publication Critical patent/KR20050111885A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
    • G06F11/1048Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices using arrangements adapted for a specific error detection or correction feature
    • G06F11/106Correcting systematically all correctable errors, i.e. scrubbing

Abstract

본 발명은 데이터 저장 시스템에서 동시에 2개 이상의 트랜잭션이 수행될 때 데이터의 일관성과 무결성을 제공하기 위해 사용되는 동시성 제어에서 로크와 래치간에 발생하는 교착상태를 처리하는 기법에 관한 것이다. 로크와 래치는 데이터 저장 시스템의 동시성 제어에서 데이터에 대한 접근을 통제하기 위하여 사용되는 기법으로, 각각 별도로 관리되고 사용되기 때문에 로크와 래치에 걸친 교착상태가 발생하였을 때 이를 검출하기 어렵다는 문제점이 있다. 본 발명에서는 래치를 그와 동일한 역할을 수행하는 매뉴얼 듀레이션 로크로 대체함으로써 동시성 제어를 위한 기법으로 로크만을 사용하였다. 이렇게 래치 대신 매뉴얼 듀레이션 로크를 사용하게 되면, 로크에 대해서만 감시만을 수행하는 기존의 교착상태 검출/회복 관리자를 활용하여 기존 시스템에서 로크와 래치에 걸쳐서 발생하는 교착상태를 데이터 저장 시스템의 큰 수정 없이 검출하고 해결할 수 있다. The present invention relates to a technique for handling deadlocks between locks and latches in concurrency control used to provide consistency and integrity of data when two or more transactions are performed simultaneously in a data storage system. Locks and latches are a technique used to control access to data in concurrency control of a data storage system. Since locks and latches are managed and used separately, it is difficult to detect when a deadlock occurs between locks and latches. In the present invention, only the lock is used as a technique for concurrency control by replacing the latch with a manual duration lock which performs the same role. If manual duration lock is used instead of latch, the existing deadlock detection / recovery manager that monitors only the lock can be used to detect deadlocks occurring across locks and latches in the existing system without significant modification of the data storage system. Can be solved.

Description

데이터 저장 시스템에서의 로크와 래치로 인한 교착상태 검출/회복 기법{Mechanism for Detecting/Recovering Deadlocks Caused by Lock and Latch in Data Storage System} Mechanism for Detecting / Recovering Deadlocks Caused by Lock and Latch in Data Storage System}

본 발명은 데이터 저장 시스템에서의 로크와 래치로 인한 교착상태 검출/회복 기법에 관한 것으로, 특히 데이터 저장시스템을 위한 동시성 제어에서 로크와 래치의 사용으로 인하여 발생하는 교착상태를 검출/회복시키는 데이터 저장 시스템에서의 로크와 래치로 인한 교착상태 검출/회복 기법에 관한 것이다. FIELD OF THE INVENTION The present invention relates to deadlock detection / recovery techniques due to locks and latches in data storage systems, and more particularly to data storage that detects / recovers deadlocks caused by the use of locks and latches in concurrency control for data storage systems. A deadlock detection / recovery technique due to locks and latches in a system.

근래 컴퓨터 기술 발전과 더불어 디지탈 형태로 저장, 관리되는 데이터의 양이 기하급수적으로 증가하고 있다. 따라서 대용량의 데이터를 효율적으로 저장하고 관리할 수 있는 데이터베이스 시스템들이 여러 분야에서 필요하게 되었고 널리 사용되게 되었다. Recently, with the development of computer technology, the amount of data stored and managed in digital form is increasing exponentially. Therefore, database systems that can efficiently store and manage large amounts of data are needed in various fields and are widely used.

데이터 저장 시스템이란 데이터베이스의 하부 구조에 해당하는 소프트웨어의 일종으로, 데이터를 디스크에 저장하고 관리하는 기능, 트랜잭션 관리 기능, 동시성 제어 기능 및 파손 회복 기능을 담당한다. 저장 시스템은 데이터베이스 기술의 핵심 기술로서 데이터베이스 응용 프로그램의 성능에 직접적인 영향을 주는 중요한 역할을 한다. A data storage system is a piece of software that corresponds to the infrastructure of a database. It is responsible for storing and managing data on disk, transaction management, concurrency control and crash recovery. Storage systems are the core technology of database technology and play an important role in directly affecting the performance of database applications.

데이터 저장 시스템은 한 번에 2개 이상의 트랜잭션을 동시에 수행하는 기능을 제공한다. 하지만, 동일한 데이터를 액세스하고 갱신하는 연산을 포함한 트랜잭션이 동시에 수행될 경우, 각각의 트랜잭션이 상대 트랜잭션에 의해 갱신된 데이터를 덮어쓰거나 아직 상대 트랜잭션에 의해 갱신이 완료되지 않은 데이터를 읽는 등의 의도하지 않은 문제가 발생할 수 있다. 이렇게 여러 사용자의 검색 요구와 갱신 요구가 동시 다발적으로 발생하는 상황에서도 데이터를 일관성 있는 상태로 유지하고 정확한 처리를 보장해 주기 위하여 데이터 저장 시스템은 동시성 제어를 주요한 기능으로 제공한다. Data storage systems provide the ability to execute more than one transaction at a time. However, if transactions involving operations that access and update the same data are performed concurrently, then each transaction does not intend to overwrite the data updated by the counterpart transaction or read data that has not yet been updated by the counterpart transaction. May cause problems. The data storage system provides concurrency control as a key function to keep data consistent and ensure accurate processing even when multiple search and update requests occur simultaneously.

데이터 저장 시스템은 동시성 제어를 위하여 로크를 사용한다. 로크는 특정 트랜잭션이 액세스하거나 변경하는 데이터를 그 트랜잭션이 끝날 때까지 다른 트랜잭션이 액세스하거나 변경하지 못하도록 통제하는 방법이다. 데이터 저장 시스템은 로크를 통하여 데이터의 일관성을 유지하고, 동시 다발적인 트랜잭션 수행 요청을 직렬화 함으로서 데이터에 발생한 변경사항이 정확한 순서로 반영되도록 하는 무결성을 제공한다. The data storage system uses locks for concurrency control. Locking is a way to control the data that one transaction accesses or changes so that no other transaction can access or change it until the transaction ends. The data storage system maintains data consistency through locks and provides integrity to ensure that changes in data are reflected in the correct order by serializing multiple concurrent transaction requests.

데이터 저장 시스템은 데이터뿐만 아니라 데이터를 관리하기 위해 사용되는 데이터 구조에 대해서도 동시성 제어를 수행해야 한다. 데이터 구조에 대한 동시성 제어를 위하여 데이터 저장 시스템은 래치를 사용한다. 래치는 저수준의 직렬화 기법으로, 로크가 트랜잭션이 끝날 때까지 데이터에 대한 접근을 통제하는 것과는 달리 트랜잭션 내에서 필요에 따라 자료구조에 대한 접근 통제를 빠르게 설정하고 풀 수 있도록 되어 있다. The data storage system must perform concurrency control not only on the data but also on the data structures used to manage the data. For concurrency control of data structures, data storage systems use latches. Latch is a low-level serialization technique that allows locks to quickly set and unlock access to data structures as needed within a transaction, unlike locks to control access to data until the end of the transaction.

로크와 래치는 동일한 데이터 혹은 데이터 구조를 액세스하는 두 트랜잭션이 서로 상대방이 데이터 혹은 데이터 구조에 접근하는 것을 방해함으로써 두 트랜잭션 모두 수행이 중지되는 교착상태를 초래할 수 있다. 교착상태가 발생하면 트랜잭션 요청을 정상적으로 수행할 수 없기 때문에 데이터 저장 시스템은 교착상태가 발생하는지 감시하고 이를 해결하는 교착상태 검출/회복 기능을 제공한다. Locks and latches can lead to deadlocks where both transactions stop running because two transactions accessing the same data or data structure prevent each other from accessing the data or data structure. If a deadlock occurs, the transaction request cannot be executed normally. Therefore, the data storage system provides a deadlock detection / recovery function to monitor and resolve the deadlock.

하지만 데이터 저장 시스템 내에서 로크와 래치는 따로 관리되고 사용되기 때문에 로크와 래치에 걸친 교착상태가 발생하면 이를 검출하기 어렵다는 문제가 있다. 따라서 데이터 저장 시스템에서 트랜잭션간의 로크와 래치에 걸친 교착상태를 방지하는 방법이 필요하다. However, since locks and latches are managed and used separately in a data storage system, it is difficult to detect when a deadlock occurs between locks and latches. Thus, there is a need for a method of preventing deadlocks across locks and latches between transactions in a data storage system.

데이터 관리 시스템에서 로크와 래치에 걸친 교착상태가 발생하는 경우에 대한 예시를 도 1에 도시하였다. 도 1의 내용을 살펴보면, 스텝 101에서 트랜잭션1은 데이터 D1을 액세스하기 위하여 해당 데이터에 대한 정보를 가지고 있는 데이터 구조 DS1의 내용을 참조한다. 이 때 다른 트랜잭션에 의해서 데이터 구조 DS1이 액세스되는 것을 막기 위하여 동시성 제어를 위한 래치를 해당 데이터 구조에 설정한다. 액세스되는 데이터 구조 DS1에 래치가 설정됨에 따라 다른 트랜잭션은 그 데이터 구조에 접근하기 위하여 트랜잭션1이 래치를 풀 때까지 기다려야만 한다.An example of a deadlock across locks and latches in a data management system is shown in FIG. 1. Referring to the contents of FIG. 1, in step 101, transaction 1 refers to the contents of data structure DS 1 having information about the data in order to access data D 1 . At this time, in order to prevent the data structure DS 1 from being accessed by another transaction, a latch for concurrency control is set in the data structure. As a latch is set on the data structure DS 1 being accessed, another transaction must wait until transaction 1 releases the latch to access the data structure.

스텝 102에서 트랜잭션1과 동시에 수행되는 트랜잭션2는 요청된 연산을 수행하기 위하여 데이터 D1을 액세스한다. 이 때, 다른 트랜잭션에 의해서 데이터 D1이 액세스되는 것을 막기 위하여 동시성 제어를 위한 로크를 해당 데이터에 설정한다. 액세스되는 데이터 D1에 로크가 설정됨에 따라 다른 트랜잭션은 그 데이터에 접근하기 위하여 트랜잭션2가 완료될 때까지 기다려야만 한다.In step 102, transaction 2 executed concurrently with transaction 1 accesses data D 1 to perform the requested operation. At this time, in order to prevent data D 1 from being accessed by another transaction, a lock for concurrency control is set to the corresponding data. As a lock is set on data D 1 being accessed, another transaction must wait until transaction 2 completes to access that data.

스텝 103에서 트랜잭션1은 스텝 101에서 데이터 구조 DS1을 참조하여 얻은 정보를 사용하여 원하는 데이터 D1을 액세스 하고자 한다. 하지만 액세스 하고자 하는 데이터 D1에 동시에 수행되고 있는 트랜잭션2에 의하여 로크가 설정되어 있기 때문에 트랜잭션2가 완료될 때까지 데이터 D1을 액세스하지 못하고 기다려야만 한다.In step 103 transaction 1 wishes to access the desired data D 1 using the information obtained with reference to data structure DS 1 in step 101. However, since by the second transaction that is being performed at the same time, the data D 1 to access the lock is set does not have access to the data D 1 until the transaction is completed, 2 to wait.

스텝 104에서 트랜잭션2는 스텝 102에서 액세스한 데이터 D1에 대한 정보를 저장하기 위하여 해당 데이터 구조 DS1을 액세스 하고자 한다. 하지만 액세스 하고자 하는 데이터 구조 DS1이 동시에 수행되고 있는 트랜잭션1에 의하여 래치가 설정되어 있기 때문에 트랜잭션1이 해당 데이터 구조에 대한 래치를 풀 때까지 기다려야만 한다.In step 104 transaction 2 wishes to access the corresponding data structure DS 1 in order to store information about the data D 1 accessed in step 102. However, because the latch is set by transaction 1 in which the data structure DS 1 to be accessed is being executed at the same time, it must wait until transaction 1 releases the latch for the data structure.

위와 같은 과정에 따라서 트랜잭션1은 스텝 102에서 더 이상 진행할 수 없어서 완료될 수 없고, 트랜잭션2도 스텝 104에서 더 이상 진행할 수 없어서 완료될 수 없기 때문에 교착상태가 발생하게 된다. 하지만 래치와 로크가 각각 따로 관리되고 있기 때문에 교착상태 검출/회복 관리자는 교착상태가 발생했다는 것을 검출할 수 없다. 따라서 트랜잭션1과 트랜잭션2는 영구히 교착상태에서 벗어날 수 없다. According to the above process, transaction 1 cannot be completed because it cannot proceed any further in step 102, and because a transaction 2 cannot be completed because it cannot proceed further in step 104, a deadlock occurs. However, because the latch and lock are managed separately, the deadlock detection / recovery manager cannot detect that a deadlock has occurred. Thus, transaction 1 and transaction 2 can never be deadlocked permanently.

따라서, 본 발명의 목적은 상술한 문제점을 해결할 수 있도록 데이터 저장 시스템에서 데이터 구조의 동시성 제어를 위해 사용하는 래치를 그와 동일한 역할을 수행하는 매뉴얼 듀레이션 로크로 대체함으로써 동시성 제어를 위한 기법으로 로크만을 사용하여 로크와 래치에 걸친 교착상태를 방지하는 데이터 저장 시스템에서의 로크와 래치로 인한 교착상태 검출/회복 기법을 제공하는데 있다. Accordingly, an object of the present invention is to provide a locking mechanism as a technique for concurrency control by replacing a latch used for concurrency control of a data structure in a data storage system with a manual duration lock which performs the same role. To provide a deadlock detection / recovery technique due to locks and latches in a data storage system that prevents deadlocks across locks and latches.

상기 목적을 달성하기 위한 본 발명의 특징은, 데이터 저장 시스템에서 동시성 제어를 위하여 사용하는 래치를 매뉴얼 듀레이션 로크(manual duration lock)로 대체하여 래치의 사용을 원천적으로 방지하는데 있다. 매뉴얼 듀레이션 로크는 하나의 트랜잭션에서 액세스하는 데이터에 대하여 다른 트랜잭션들이 접근하지 못하도록 통제하고 트랜잭션이 끝남과 동시에 이러한 접근 통제를 푸는 일반적인 로크와는 달리, 트랜잭션 내에서 더 이상 접근을 통제할 필요가 없어지는 시점에서 자유롭게 통제를 풀 수 있는 로크이다. A feature of the present invention for achieving the above object is to prevent the use of the latch by replacing the latch used for the concurrency control in the data storage system with a manual duration lock. Manual duration locks do not require access control within a transaction, as opposed to normal locks that prevent other transactions from accessing data accessed by one transaction and release this access control at the end of the transaction. It is a lock that can be freely released at this point.

상기 목적을 달성하기 위한 본 발명의 부가적인 특징은, 래치를 대신하여 매뉴얼 듀레이션 로크를 사용함으로서 데이터와 데이터 구조에 대한 접근 통제 수단을 로크 하나로 통일하여 관리하여 교착상태 검출을 용이하게 한다는데 있다. An additional feature of the present invention for achieving the above object is to facilitate the detection of deadlocks by unifying and managing access control means for data and data structures by using manual duration locks instead of latches.

상기 목적을 달성하기 위한 본 발명의 부가적인 특징은, 동시성 제어를 위하여 로크만을 사용함으로서 데이터 저장 시스템의 변경 없이 기존의 로크 관리 기능과 교착상태 검출 및 회복 기능을 그대로 사용할 수 있다는 것이다. An additional feature of the present invention for achieving the above object is that by using only lock for concurrency control, the existing lock management function and the deadlock detection and recovery function can be used without change of the data storage system.

이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시예에 대해 설명한다. Hereinafter, with reference to the accompanying drawings will be described a preferred embodiment of the present invention.

우선, 본 발명에서 달성하고자 하는 기술적 요지를 간단히 설명하면, 데이터 저장 시스템에서 동시에 발생하는 여러 개의 트랜잭션들간의 일관성과 무결성을 제공하는 동시성 제어 기능은 필수적이며, 이러한 동시성 제어를 위하여 데이터 저장 시스템은 데이터의 접근 통제를 위하여 로크를 사용하고 데이터 구조에 대한 접근 통제를 위하여 래치를 사용한다. 이러한 접근 통제는 결과적으로 트랜잭션들간의 교착상태를 유발할 수 있고, 데이터 저장 시스템은 교착상태의 검출과 회복을 제공해야 한다. 하지만 로크와 래치는 별도로 관리되기 때문에 로크와 래치에 걸친 교착상태가 발생했을 때, 이것을 검출하기가 어렵다는 문제점이 있다. First, to briefly describe the technical gist of the present invention, a concurrency control function that provides consistency and integrity among multiple transactions occurring simultaneously in the data storage system is essential. Locks are used to control access to the data, and latches are used to control access to the data structure. This access control can result in deadlocks between transactions, and data storage systems must provide for detection and recovery of deadlocks. However, since the lock and the latch are managed separately, it is difficult to detect this when a deadlock occurs between the lock and the latch.

상술한 바와 같은 문제를 해결하기 위하여 제안되어진 본 발명에 따른 교착상태 처리를 지원하는 데이터 저장 시스템의 구조는 첨부한 도 2에 도시되어 있다. The structure of a data storage system supporting deadlock processing according to the present invention, which has been proposed to solve the above problems, is shown in FIG.

도 2에 도시되어 있는 저장 시스템의 구조, 즉 메모리(10)의 구조는, 참조번호 20의 응용 프로그램, 데이터를 저장하고 관리하는 기능을 수행하는 참조번호 25의 저장 시스템, 동시성 제어를 수행하기 위해 사용되는 로크들에 대한 관리를 수행하는 참조번호 35의 로크 관리자, 로크로 인하여 트랜잭션들 간에 발생하는 교착상태를 검출하고 이를 회복시키는 기능을 수행하는 참조번호 30의 교착상태 검출/회복 관리자를 포함한다. 참조번호 15는 CPU(Central Process Unit)이다. The structure of the storage system shown in FIG. 2, i.e., the structure of the memory 10, is an application of reference number 20, a storage system of reference number 25 for storing and managing data, and for performing concurrency control. Lock manager of reference number 35 which performs management of the locks used, and deadlock detection / recovery manager of reference number 30 which detects and recovers from deadlocks occurring between transactions due to the lock. . Reference numeral 15 is a central process unit (CPU).

첨부한 도 2에 도시되어 있는 데이터 저장 시스템의 구조에서 저장 시스템이 관리하는 데이터들은 참조번호 40의 데이터 볼륨 내에 저장된다. 그리고 트랜잭션의 실행 중 동시성 제어를 위하여 현재 연산을 수행중인 데이터에 대하여 자동으로 로크를 획득하고, 로크 정보를 관리하고, 트랜잭션이 끝나면 자동으로 로크를 풀어주는 기능은 참조번호 35의 로크 관리자에 의해서 수행된다. 참조번호 30의 교착상태 검출/회복 관리자는 참조번호 35의 로크 관리자에 의해서 관리되는 로크의 정보를 사용하여 현재 교착상태가 발생하는지의 여부를 판단하고, 교착상태가 발생하였을 경우 이것을 해결하는 역할을 수행한다. 참조번호 25의 저장 시스템은 데이터의 저장과 관리 및 트랜잭션의 수행을 위하여 다양한 데이터 구조를 사용한다. 동시에 여러 개의 트랜잭션이 요청되는 상황에서 이러한 데이터 구조에 대한 동시성 제어를 위하여 참조번호 25의 저장 시스템은 필요에 따라 설정하고 풀 수 있는 매뉴얼 듀레이션 로크를 사용한다. 매뉴얼 듀레이션 로크는 로크를 설정하는 연산과 로크를 푸는 연산으로 이루어져 있고, 이 연산 사이에서만 다른 트랜잭션에 의한 데이터 구조의 액세스가 통제된다는 특성을 지닌다. 이러한 매뉴얼 듀레이션 로크에 대한 정보는 데이터에 대한 로크와 마찬가지로 참조번호 35의 로크 관리자에서 관리한다. In the structure of the data storage system shown in FIG. 2, the data managed by the storage system are stored in the data volume 40. In addition, the function of automatically acquiring the lock, managing the lock information, and releasing the lock automatically when the transaction is completed is performed by the lock manager at 35 for the concurrency control during the execution of the transaction. do. The deadlock detection / recovery manager at 30 is used to determine whether a deadlock is currently occurring by using the information of the lock managed by the lock manager at 35 and to resolve the deadlock. Perform. The storage system 25 uses various data structures for the storage and management of data and for the conduct of transactions. For concurrency control of these data structures when multiple transactions are requested at the same time, the storage system at reference number 25 uses a manual duration lock that can be set and unlocked as needed. Manual duration locks consist of an operation that sets the lock and an operation that releases the lock, with the only difference being that access to data structures by other transactions is controlled. Information about this manual duration lock is managed by the lock manager at 35 as well as the lock on data.

도 3은 본 발명에서와 같이 데이터 구조에 대한 동시성 제어를 위하여 매뉴얼 듀레이션 로크를 사용했을 때, 앞에서 설명한 도 1의 문제가 어떻게 풀리는지에 대하여 도시한다. FIG. 3 illustrates how the problem of FIG. 1 described above is solved when using the manual duration lock for concurrency control on the data structure as in the present invention.

도 3의 내용을 살펴보면, 스텝 201에서 트랜잭션1은 데이터 D1을 액세스하기 위하여 해당 데이터에 대한 정보를 가지고 있는 데이터 구조 DS1의 내용을 참조한다. 이 때 다른 트랜잭션에 의해서 데이터 구조 DS1이 액세스되는 것을 막기 위하여 동시성 제어를 위한 매뉴얼 듀레이션 로크를 해당 데이터 구조에 설정한다. 액세스되는 데이터 구조 DS1에 매뉴얼 듀레이션 로크가 설정됨에 따라 다른 트랜잭션은 그 데이터 구조에 접근하기 위하여 트랜잭션1이 매뉴얼 듀레이션 로크를 풀 때까지 기다려야만 한다.Referring to the contents of FIG. 3, in step 201, transaction 1 refers to the contents of data structure DS 1 having information about the data in order to access data D 1 . At this time, in order to prevent the data structure DS 1 from being accessed by another transaction, a manual duration lock for concurrency control is set in the data structure. As the manual duration lock is set on the data structure DS 1 being accessed, another transaction must wait until transaction 1 releases the manual duration lock to access the data structure.

스텝 202에서 트랜잭션1과 동시에 수행되는 트랜잭션2는 요청된 연산을 수행하기 위하여 데이터 D1을 액세스한다. 이 때, 다른 트랜잭션에 의해서 데이터 D1이 액세스되는 것을 막기 위하여 동시성 제어를 위한 로크를 해당 데이터에 설정한다. 액세스되는 데이터 D1에 로크가 설정됨에 따라 다른 트랜잭션은 그 데이터에 접근하기 위하여 트랜잭션2가 완료될 때까지 기다려야만 한다.In step 202, transaction 2 performed concurrently with transaction 1 accesses data D 1 to perform the requested operation. At this time, in order to prevent data D 1 from being accessed by another transaction, a lock for concurrency control is set to the corresponding data. As a lock is set on data D 1 being accessed, another transaction must wait until transaction 2 completes to access that data.

스텝 203에서 트랜잭션1은 스텝 201에서 데이터 구조 DS1을 참조하여 얻은 정보를 사용하여 원하는 데이터 D1을 액세스 하고자 한다. 하지만 액세스 하고자 하는 데이터 D1이 동시에 수행되고 있는 트랜잭션2에 의하여 로크가 설정되어 있기 때문에 트랜잭션2가 완료될 때까지 데이터 D1을 액세스하지 못하고 기다려야만 한다.Transaction 1 in step 203 attempts to access the desired data D 1 using the information obtained with reference to data structure DS 1 in step 201. However, since by the second transaction with the data D 1 is performed at the same time to access the lock is set does not have access to the data D 1 until the transaction is complete, two should wait.

스텝 204에서 트랜잭션2는 스텝 202에서 액세스한 데이터 D1에 대한 정보를 저장하기 위하여 해당 데이터 구조 DS1을 액세스 하고자 한다. 하지만 액세스 하고자 하는 데이터 구조 DS1이 동시에 수행되고 있는 트랜잭션1에 의하여 매뉴얼 듀레이션 로크가 설정되어 있기 때문에 트랜잭션1이 해당 데이터 구조에 대한 로크를 풀 때까지 기다려야만 한다.In step 204 transaction 2 wishes to access the data structure DS 1 in order to store information about the data D 1 accessed in step 202. However, because the manual duration lock is set by transaction 1, where the data structure DS 1 to be accessed is being executed at the same time, it must wait until transaction 1 releases the lock on the data structure.

위와 같은 과정에 따라서 트랜잭션1은 스텝 202에서 더 이상 진행할 수 없어서 완료될 수 없고, 트랜잭션2도 스텝 204에서 더 이상 진행할 수 없어서 완료될 수 없기 때문에 교착상태가 발생하게 된다. 이 때, 도 1에서와는 달리 데이터와 데이터 구조를 위하여 트랜잭션1과 트랜잭션2에서 매뉴얼 듀레이션 로크를 사용했기 때문에 도 2의 참조번호 30의 교착상태 검출/회복 관리자는 교착상태가 발생했다는 것을 검출할 수 있다. 따라서 도 2의 참조번호 30의 교착상태 검출/회복 관리자는 트랜잭션1과 트랜잭션2가 교착상태에서 벗어날 수 있도록 회복 기능을 수행하게 되어 데이터 저장 시스템이 교착상태에 빠지지 않도록 유지한다. According to the above process, transaction 1 cannot be completed because it cannot proceed any further in step 202, and deadlock occurs because transaction 2 cannot be completed because it cannot proceed further in step 204. At this time, unlike in FIG. 1, since the manual duration lock is used in transactions 1 and 2 for data and data structures, the deadlock detection / recovery manager 30 of FIG. 2 may detect that a deadlock has occurred. . Accordingly, the deadlock detection / recovery manager 30 of FIG. 2 performs a recovery function so that the transaction 1 and the transaction 2 can be released from the deadlock state, thereby maintaining the data storage system not to fall into the deadlock state.

본 발명은 상술한 실시예에 한정되지 않으며, 본 발명의 기술적 사상 내에서 당 분야의 통상의 지식을 가진 자에 의하여 많은 변형이 가능함은 명백할 것이다. The present invention is not limited to the above-described embodiments, and it will be apparent that many modifications are possible by those skilled in the art within the technical spirit of the present invention.

상술한 바와 같이, 본 발명에 따른 데이터 저장 시스템에서의 로크와 래치로 인한 교착상태 검출/회복 기법은 다음과 같은 장점을 얻을 수 있다. As described above, the deadlock detection / recovery technique due to lock and latch in the data storage system according to the present invention can obtain the following advantages.

첫째, 동시에 2개 이상의 트랜잭션이 수행되는 데이터 저장 시스템 환경에서 데이터의 동시성 제어를 위한 로크와 데이터 구조의 동시성 제어를 위한 래치 사이에 발생하는 교착상태를 검출하지 못하는 문제를 해결할 수 있다. First, in a data storage system environment in which two or more transactions are performed at the same time, it is possible to solve the problem of not detecting a deadlock occurring between a lock for controlling concurrency of data and a latch for controlling concurrency of a data structure.

둘째, 데이터 구조의 동시성 제어에 사용되는 래치를 매뉴얼 듀레이션 로크로 대체함으로써 데이터 저장 시스템에서 동시성 제어를 위해 사용되는 방법을 로크로 단일화 할 수 있다. 이렇게 로크로 단일화함으로써 기존 데이터 저장 시스템의 교착상태 검출/회복 관리자를 활용하여 교착상태를 해결할 수 있다. Second, by replacing the latches used for concurrency control of data structures with manual duration locks, the method used for concurrency control in data storage systems can be unified with locks. By unifying with locks, deadlocks can be resolved using the deadlock detection / recovery manager of the existing data storage system.

도 1은 동시에 2개 이상의 트랜잭션이 수행되는 환경에서 교착상태가 발생하는 경우의 흐름도, 1 is a flowchart when a deadlock occurs in an environment in which two or more transactions are performed at the same time;

도 2는 본 발명의 기반이 되는 데이터 저장 시스템의 개략 구성도, 2 is a schematic structural diagram of a data storage system to which the present invention is based;

도 3은 본 발명에 따른 교착상태 처리 기법에 따른 트랜잭션의 수행 흐름도이다. 3 is a flowchart illustrating a transaction according to the deadlock processing scheme according to the present invention.

* 도면의 주요 부분에 대한 부호의 설명 *Explanation of symbols on the main parts of the drawings

10 : 메모리 15 : CPU 10: memory 15: CPU

20 : 응용 프로그램 25 : 저장 시스템 20: Application 25: Storage System

30 : 교착상태 검출/회복 관리자 35 : 로크 관리자 30: deadlock detection / recovery manager 35: lock manager

40 : 데이터 볼륨 40: data volume

Claims (2)

적어도 2개 이상의 트랜잭션이 동시에 수행되는 데이터 저장 시스템에서의 로크와 래치로 인한 교착상태 검출/회복 기법에 있어서, In a deadlock detection / recovery technique due to locks and latches in a data storage system in which at least two transactions are executed simultaneously, 트랜잭션들 간의 동시성 제어를 위하여 데이터 구조 접근 제어에 사용하는 래치를 트랜잭션 내에서 더 이상 접근을 통제할 필요가 없어지는 시점에서 통제를 풀 수 있는 매뉴얼 듀레이션 로크로 대체하고, 데이터와 데이터 구조에 대한 접근 통제 수단을 로크 하나로 통일하여 관리하여 교착상태 검출을 수행하는 것을 특징으로 하는 데이터 저장 시스템에서의 로크와 래치로 인한 교착상태 검출/회복 기법. For concurrency control between transactions, replace the latch used to control data structure access with a manual duration lock that can be released at the point where it no longer needs to control access within the transaction, and access to data and data structures. A deadlock detection / recovery technique due to locks and latches in a data storage system, characterized in that the control means are managed with a single lock to perform deadlock detection. 제 1 항에 있어서, 상기 매뉴얼 듀레이션 로크에 의해 교착상태를 검출한 후, 트랜잭션들이 교착상태를 벗어날 수 있도록 회복 기능을 더 수행하는 것을 특징으로 하는 데이터 저장 시스템에서의 로크와 래치로 인한 교착상태 검출/회복 기법. The method of claim 1, wherein after detecting the deadlock by the manual duration lock, the deadlock detection by the lock and the latch in the data storage system further performs a recovery function to allow transactions to exit the deadlock. / Recovery techniques.
KR1020040036809A 2004-05-24 2004-05-24 Mechanism for detecting/recovering deadlocks caused by lock and latch in data storage system KR20050111885A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020040036809A KR20050111885A (en) 2004-05-24 2004-05-24 Mechanism for detecting/recovering deadlocks caused by lock and latch in data storage system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020040036809A KR20050111885A (en) 2004-05-24 2004-05-24 Mechanism for detecting/recovering deadlocks caused by lock and latch in data storage system

Publications (1)

Publication Number Publication Date
KR20050111885A true KR20050111885A (en) 2005-11-29

Family

ID=37286911

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020040036809A KR20050111885A (en) 2004-05-24 2004-05-24 Mechanism for detecting/recovering deadlocks caused by lock and latch in data storage system

Country Status (1)

Country Link
KR (1) KR20050111885A (en)

Similar Documents

Publication Publication Date Title
JP2721780B2 (en) Database access method and system
US8417897B2 (en) System and method for providing locale-based optimizations in a transactional memory
US8266122B1 (en) System and method for versioning data in a distributed data store
US7856537B2 (en) Hybrid hardware and software implementation of transactional memory access
US5455944A (en) Method for managing logging and locking of page free space information in a transaction processing system
US8099538B2 (en) Increasing functionality of a reader-writer lock
US8539465B2 (en) Accelerating unbounded memory transactions using nested cache resident transactions
US7599908B2 (en) Logical locking for Java Data Objects
US7392335B2 (en) Anticipatory changes to resources managed by locks
US20090132535A1 (en) Multiversion concurrency control in in-memory tree-based data structures
US20110125973A1 (en) System and Method for Performing Dynamic Mixed Mode Read Validation In a Software Transactional Memory
US20140181821A1 (en) Methods and Systems for Enhancing Hardware Transactions Using Hardware Transactions in Software Slow-Path
US20120215986A1 (en) Wait-Free Parallel Data Cache
US9672077B2 (en) Reentrant read-write lock algorithm
US20100325630A1 (en) Parallel nested transactions
JPH056297A (en) Method of transaction processing and system
US7861093B2 (en) Managing data access via a loop only if changed locking facility
US10970273B2 (en) Aiding resolution of a transaction
US6625601B1 (en) Escrow-locking multithreaded process-pair resource manager dictionary
US20080077591A1 (en) Computer program product for conducting a lock free read
US7353342B1 (en) Shared lease instruction support for transient blocking synchronization
US20090198920A1 (en) Processing Units Within a Multiprocessor System Adapted to Support Memory Locks
US8095731B2 (en) Mutable object caching
US20090198695A1 (en) Method and Apparatus for Supporting Distributed Computing Within a Multiprocessor System
JP2685530B2 (en) How to manage shared data

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E601 Decision to refuse application