KR20000033403A - Mutual exclusion method of lock waiting information for deadlock detector - Google Patents

Mutual exclusion method of lock waiting information for deadlock detector Download PDF

Info

Publication number
KR20000033403A
KR20000033403A KR1019980050248A KR19980050248A KR20000033403A KR 20000033403 A KR20000033403 A KR 20000033403A KR 1019980050248 A KR1019980050248 A KR 1019980050248A KR 19980050248 A KR19980050248 A KR 19980050248A KR 20000033403 A KR20000033403 A KR 20000033403A
Authority
KR
South Korea
Prior art keywords
lock
transaction
wait information
pool
lockwaiting
Prior art date
Application number
KR1019980050248A
Other languages
Korean (ko)
Other versions
KR100317229B1 (en
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 KR1019980050248A priority Critical patent/KR100317229B1/en
Publication of KR20000033403A publication Critical patent/KR20000033403A/en
Application granted granted Critical
Publication of KR100317229B1 publication Critical patent/KR100317229B1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/466Transaction processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Multi Processors (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE: A mutual exclusion method of a lock waiting information is provided to detect a deadlock occurred when a lock waiting information is commonly accessed by a deadlock detector and transactions in a DBMS by using a transaction table and the lock waiting information. The method can make the lock waiting information just by a static assignment of many transaction elements by setting properly the number of the static elements according to the system characteristics. CONSTITUTION: A mutual exclusion method of a lock waiting information comprises steps of using a latch on the lock waiting information pool as the mutual exclusion means, initializing the system, performing a lock waiting process in the case that a waiting lock is obtained by other transaction when a transaction requests a lock, performing a lock acquisition process, performing a lock return process, and performing a deadlock detection process with one of the above processes.

Description

교착 상태 검출을 위한 락 대기 정보의 상호 배제방법Mutual Exclusion of Lock Waiting Information for Deadlock Detection

본 발명은 데이타베이스 관리 시스템(database management system: 이하, 'DBMS')내에서 교착상태 검출기와 트랜잭션들이 공통으로 액세스하는 락 대기 정보의 상호 배제를 효과적으로 지원하기 위한 방법에 관한 것이다.The present invention relates to a method for effectively supporting mutual exclusion of lock wait information commonly accessed by deadlock detectors and transactions in a database management system (DBMS).

DBMS에서는 다수의 트랜잭션(transaction)들이 동시에 수행된다. 여러 트랜잭션들에 의하여 동시에 액세스되는 데이타베이스의 논리적인 일관성(logical consistency)을 보장하기 위하여 DBMS에서는 이단계 라킹 기법(two-phase locking protocol)이 널리 사용된다. 이단계 라킹 기법에서는 두 개 이상의 트랜잭션이 락을 잡은 상태에서 다른 트랜잭션이 가진 락을 무한정으로 대기하는 교착 상태(deadlock)가 발생할 수 있다. 트랜잭션은 스스로 이러한 교착 상태로부터 빠져 나올 수 없으므로 DBMS는 주기적으로 락 대기 정보(lock waiting information)를 참조하여 시스템내의 트랜잭션들이 교착 상태에 빠져 있는가를 검출하고, 교착 상태에 빠져 있는 경우 이를 해결해 주어야 한다.In a DBMS, multiple transactions are executed at the same time. Two-phase locking protocols are widely used in DBMSs to ensure the logical consistency of databases accessed simultaneously by multiple transactions. In the two-step locking technique, a deadlock may occur in which two or more transactions are locked while waiting indefinitely for a lock held by another transaction. Since a transaction cannot come out of such a deadlock itself, the DBMS should periodically check the lock waiting information to detect whether the transactions in the system are deadlocked and resolve the deadlock.

교착 상태 검출기(deadlock detector)는 바로 이와 같이 트랜잭션들이 교착 상태에 빠져 있는지를 주기적으로 검출해 주는 DBMS의 서브 컴포넌트이다.The deadlock detector is a subcomponent of the DBMS that periodically detects whether transactions are deadlocked.

이러한 락 대기 정보를 관리하기 위해 본 발명과 연관된 주요 자료 구조를 도 1을 참조하여 설명한다. 도 1에서는 트랜잭션 테이블(transaction table)과 락 대기 정보를 나타낸다.The main data structure associated with the present invention for managing such lock wait information is described with reference to FIG. 1 shows a transaction table and lock wait information.

트랜잭션 테이블은, 트랜잭션 엔트리들의 집합이며, 각각의 트랜잭션 엔트리는 대응되는 트랜잭션에 관한 정보를 유지한다. 여기서는 이러한 정보들 중에서 본 발명과 연관된 정보만을 기술한다. 트랜잭션 식별자(TransID)는, 해당 트랜잭션의 식별자를 의미한다. 래치(Latch)는, 각 트랜잭션들이 공유하는 자원에 대한 물리적인 일관성(physical consistency) 보장을 위하여 DBMS에서 상호 배제를 제공하는 수단으로 사용된다. 락 대기(LockWaiting)는, 트랜잭션이 획득하기를 원하는 락을 이미 획득하고 있는 다른 트랜잭션의 TransID를 가지는 요소(element)들의 리스트를 가리키는 포인터를 의미한다.The transaction table is a collection of transaction entries, each transaction entry holding information about the corresponding transaction. Here, only the information related to the present invention is described. The transaction identifier TransID means an identifier of the transaction. Latch is used as a means to provide mutual exclusion in the DBMS to ensure the physical consistency of the resources shared by each transaction. LockWaiting means a pointer to a list of elements that have a TransID of another transaction that is already acquiring the lock that the transaction wants to acquire.

리스트내에 여러개의 요소가 존재하는 이유는 한 트랜잭션이 쓰기 모드로 락을 요청한 경우, 이미 여러개의 트랜잭션이 읽기 모드로 해당 락을 획득한 경우가 발생하기 때문이다. 예를 들어, 트랜잭션 T1이 락 L1을 쓰기 모드로 획득하려고 할 때, 이미 트랜잭션 T4, T6, T8이 이 락 L1을 읽기 모드로 획득한 상태이면, T1은 해당 트랜잭션 엔트리의 lockWaiting은 세 개의 요소 T4, T6, T8으로 구성되는 리스트를 가리키게 된다. 이러한 락 대기 정보 요소들은 미사용중인 요소들의 집합으로 구성되는 풀(pool)로서 관리되어 트랜잭션의 필요에 따라 풀로부터 할당되어 lockWaiting 리스트에 사용되고, 트랜잭션이 종료됨에 따라 요소들의 사용이 끝난 경우에는 풀로 반환된다.The reason for multiple elements in the list is that when a transaction requests a lock in write mode, several transactions have already acquired the lock in read mode. For example, if transaction T1 attempts to acquire lock L1 in write mode, and if transactions T4, T6, and T8 have already acquired this lock L1 in read mode, then T1 is the lockWaiting of the transaction entry is three elements T4. Will point to a list consisting of T6 and T8. These lock wait information elements are managed as a pool consisting of a set of unused elements, allocated from the pool according to the needs of the transaction, used in the lockWaiting list, and returned to the pool when the elements are finished using the transaction. .

주기적으로 수행되는 교착 상태 검출기는 트랜잭션 테이블내의 lockWaiting이 가리키는 락 대기 정보를 이용하여 교착 상태의 존재 여부를 파악하며, DBMS상에서 트랜잭션들과 함께 수행된다. 락 대기 정보는 트랜잭션과 교착 상태 검출기가 함께 액세스하는 공유 정보에 해당되므로 락 대기 정보의 물리적인 일관성을 보장하기 위해서는 이에 대한 상호 배제(mutual exclusion)가 보장되어야 한다.The deadlock detector, which is executed periodically, checks whether there is a deadlock using lock wait information indicated by lockWaiting in the transaction table, and executes it with the transactions on the DBMS. Since the lock wait information corresponds to shared information accessed by the transaction and the deadlock detector, mutual exclusion must be guaranteed to ensure physical consistency of the lock wait information.

기존의 기법에서는 래치(latch) 혹은 세마포어(semaphore)를 이용하여 이러한 상호 배제를 제공한다. 즉, 교착 상태 검출기가 공유 정보인 락 대기 정보 전체를 액세스할 때와 트랜잭션이 락 대기 정보를 구성할 때, 래치 혹은 세마포어를 이용하여 락 대기 정보를 상호간에 액세스할 수 없도록 함으로써 물리적인 일관성을 보장한다.Conventional techniques provide this mutual exclusion by using latches or semaphores. In other words, when the deadlock detector accesses the entire lock wait information, which is shared information, and when the transaction configures the lock wait information, it is impossible to mutually access the lock wait information by using a latch or semaphore to ensure physical consistency. do.

그러나 이와 같이 교착 상태 검출기가 락 대기 정보 전체를 모두 액세스 하는 동안 다른 트랜잭션들이 락 대기 정보를 액세스 하지 못하게 한다면 동시성(concurrency)가 저하되어 트랜잭션 응답 시간(response time)이 떨어진다. 특히, 주기억 장치 DBMS와 같은 고성능 시스템에서는 이러한 동시성의 저하 문제가 전체 시스템 성능 저하의 직접적인 원인이 될 수 있다.However, if the deadlock detector prevents other transactions from accessing the lock wait information while the deadlock detector accesses the entire lock wait information, concurrency is degraded and transaction response time is reduced. In particular, in a high performance system such as a main memory DBMS, such a problem of concurrency may be a direct cause of overall system performance degradation.

상기와 같은 필요성에 따라 안출된 본 발명에서는 락 대기 정보를 상호 배제하는 효과적인 기법을 제안한다.The present invention devised in accordance with the necessity as described above proposes an effective technique for mutually excluding lock waiting information.

이와 같은 본 발명은, 주 기억장치 데이타베이스 관리 시스템(DBMS)에서 교착 상태 검출기와 트랜잭션들이 락 대기 정보를 공통으로 액세스시에 발생되는 교착상태를 트랜잭션 테이블과 락 대기 정보를 이용하여 검출하기 위해서, 상기 락 대기 정보 풀에 대한 래치를 락 대기 정보 자체를 위한 상호 배제 사용수단으로 사용하고, 시스템 초기화 과정과, 트랜잭션이 락을 요청하였을 때 그 락이 다른 트랜잭션에 의해 이미 획득된 상태인 경우나 대기중인 락을 이미 요청한 다른 트랜잭션이 획득한 경우에 트랜잭션의 락 대기 처리 과정과, 트랜잭션의 락 획득 처리 과정과, 트랜잭션의 락 반환 처리과정과, 상기 각 과정들과 동시에 수행되는 교착상태 검출기의 처리과정을 수행하되, 각 과정을 독립적으로 수행함으로써, 교착 상태 검출기와 트랜잭션들 간의 상호 간섭(mutual interference)를 최소화함으로써 동시성을 극대화할 수 있는 것이다.In the present invention, in order to detect a deadlock that occurs when a deadlock detector and transactions commonly access lock wait information in a main storage database management system (DBMS) using the transaction table and lock wait information, The latch for the lock wait information pool is used as mutual exclusion means for the lock wait information itself, and the system initialization process and the lock is already acquired by another transaction when the transaction is requested or are waiting. When the other transaction that has already requested the lock is acquired, the process of waiting for the lock of the transaction, processing of acquiring the lock of the transaction, processing of returning the lock of the transaction, and processing of a deadlock detector performed simultaneously with each of the above processes By performing each process independently, so that deadlock detectors and transactions By minimizing the mutual interference (mutual interference) it is to maximize concurrency.

도 1은 락 대기 정보 관리를 위한 자료 구조도,1 is a data structure diagram for managing lock wait information;

도 2는 시스템 초기화 흐름도,2 is a system initialization flowchart;

도 3은 트랜잭션의 락 대기 처리 흐름도,3 is a flow chart for processing lock wait processing;

도 4는 트랜잭션의 락 획득 처리 흐름도,4 is a flowchart for processing lock acquisition of a transaction;

도 5는 트랜잭션의 락 반환 처리 흐름도,5 is a flowchart for processing a lock return of a transaction;

도 6은 교착 상태 검출기의 처리 흐름도.6 is a process flow diagram of a deadlock detector.

이하, 본 발명을 첨부된 도면에 의거하여 상세히 설명하면 다음과 같다.Hereinafter, the present invention will be described in detail with reference to the accompanying drawings.

본 발명에서는 교착 상태 검출시의 락 대기 정보에 대한 상호 배제 수단으로서, 락 대기 정보 리스트내의 요소들의 풀에 존재하는 래치를 사용한다. 이 래치는 다수의 트랜잭션들에 의하여 공유되는 풀 자체를 위한 상호 배제 수단으로서의 필요성에 의하여 사용되던 것이다. 이 래치를 사용할 수 있도록 하기 위하여 교착 상태 검출기도 이와 대응되는 엔트리를 트랜잭션 테이블내에 가지도록 한다. 또한, 동시성의 극대화를 위하여 트랜잭션 테이블의 각 엔트리가 정해진 numStaticElements 만큼의 lockWaiting 요소를 시스템 초기화시 미리 할당받도록 한다. 트랜잭션이 락 대기 정보를 구성할 필요가 있을 때, 자신이 대기하는 락을 이미 획득한 다른 트랜잭션들의 수가 numStaticElements(정적할당 요소수) 미만인 경우에는 풀로부터 동적으로 요소를 할당받을 필요가 없다. 반면, 자신이 대기하는 다른 트랜잭션의 수가 numStaticElements를 초과하는 경우에 한하여 풀로부터 요소를 추가적으로 할당받게 된다. 따라서 이러한 동적인 할당과 정적인 할당을 결합한 요소 할당 방식을 사용함으로써 교착 상태 검출기와 트랜잭션들간의 요소 풀에 대한 래치 경쟁을 극소화 할 수 있다. 물론, 교착 상태 검출기와 트랜잭션이 미리 할당되어 있는 대기 정보 리스트를 동시에 액세스하게 된다. 그러나 리스트의 물리적인 형태의 변형없이 내부의 내용만을 액세스 하는 이러한 경우에는 별도의 상호 배제 메카니즘이 불필요하다.In the present invention, latches present in the pool of elements in the lock wait information list are used as mutual exclusion means for lock wait information at the time of deadlock detection. This latch was used by the need as a mutual exclusion means for the pool itself shared by multiple transactions. In order to be able to use this latch, the deadlock detector also has a corresponding entry in the transaction table. In addition, to maximize concurrency, each entry in the transaction table should be pre-assigned as many lockWaiting elements as the number of numStaticElements specified during system initialization. When a transaction needs to configure lock wait information, there is no need to dynamically allocate elements from the pool if the number of other transactions that have already acquired the lock it is waiting for is less than numStaticElements. On the other hand, an additional element is allocated from the pool only if the number of other transactions waiting for it exceeds numStaticElements. Therefore, by using the element allocation method that combines this dynamic allocation and static allocation, the latch contention for the element pool between deadlock detector and transactions can be minimized. Of course, the deadlock detector and the transaction will be accessed at the same time the list of pre-allocated wait information. However, in such cases where only internal content is accessed without altering the physical form of the list, a separate mutual exclusion mechanism is unnecessary.

도 2는 시스템 초기화 방법을 나타낸 것이다.2 shows a system initialization method.

먼저, 시스템의 특성을 고려하여 numStaticElements를 지정한다(1). 트랜잭션 테이블내에 교착 상태 검출기를 위한 엔트리를 하나 할당하고, 각 필드를 초기화 시킨다(2). 그리고, 트랜잭션 테이블내의 모든 엔트리에 대하여 다음을 수행한다(3). numStaticElements 수 만큼의 대기 정보 요소를 풀로부터 할당하여 리스트를 구성하고(4), 각 요소의 값을 NULL로 초기화 시킨다(5). 그리고 엔트리의 lockWaiting 필드가 이 리스트를 가리키도록 한다(6).First, numStaticElements are specified in consideration of system characteristics (1). Allocate one entry for the deadlock detector in the transaction table and initialize each field (2). Then, for every entry in the transaction table, the following is performed (3). Allocate as many waiting information elements as there are numStaticElements from the pool (4), and initialize the values of each element to NULL (5). The lockWaiting field of the entry points to this list (6).

도 3은 트랜잭션의 락 대기 처리 방법을 나타낸 것이다.3 illustrates a lock wait processing method of a transaction.

이러한 락 대기의 처리는, 트랜잭션이 락을 요청하였을 때, 그 락이 다른 트랜잭션에 의하여 이미 획득된 상태인 경우에 필요하다. 또한, 대기중인 락을 앞서 요청한 다른 트랜잭션이 획득한 경우에도 이러한 처리는 필요하다.This handling of lock waits is necessary when the transaction has requested a lock and the lock is already acquired by another transaction. This process is also necessary if another pending transaction has acquired the pending lock.

먼저, 해당 락을 앞서 획득한 트랜잭션의 수를 체크한다(11). 만약, 해당 락을 획득한 트랜잭션 수가 현재 lockWaiting이 가리키는 리스트내의 요소 수를 초과한다면(12), 락 대기 정보 요소 풀에 래치를 걸고(13), 락 대기 정보 요소 풀로부터 초과되는 수 만큼의 요소를 할당받는다(14). 그리고 할당 받은 요소들을 트랜잭션 테이블내 해당 엔트리의 lockWaiting필드가 가리키는 리스트에 연결하고(15), 해당 락을 획득한 트랜잭션들의 TransID를 lockWaiting필드가 가리키는 리스트내의 각 요소에 넣는다(16). 그리고, 대기 정보 요소 풀에 걸었던 래치를 푼다(17). 만약, 해당 락을 획득한 트랜잭션 수가 현재 lockWaiting이 가리키는 리스트내의 요소 수를 초과하지 않는다면(12), 해당 락을 획득한 트랜잭션들의 TransID를 lockWaiting필드가 가리키는 리스트내의 각 요소에 넣는다(18).First, the number of transactions previously obtained the lock is checked (11). If the number of transactions that acquired the lock exceeds the number of elements in the list pointed to by current lockWaiting (12), it latches into the lock wait information element pool (13) and removes as many elements from the lock wait information element pool as possible. Assigned (14). The allocated elements are connected to the list indicated by the lockWaiting field of the corresponding entry in the transaction table (15), and the TransIDs of the transactions that acquire the lock are put into each element of the list indicated by the lockWaiting field (16). Then, the latch that latches on the wait information element pool is released (17). If the number of transactions that acquire the lock does not exceed the number of elements in the list indicated by the current lockWaiting (12), the TransID of the transactions that acquire the lock is put in each element in the list indicated by the lockWaiting field (18).

도 4는 트랜잭션의 락 획득 처리 방법을 나타낸 것이다.4 shows a lock acquisition processing method of a transaction.

대기하는 트랜잭션 엔트리의 lockWaiting이 가리키는 리스트에서 종료된 트랜잭션의 TransID를 찾아 값을 NULL로 리셋시킨다(21).In the list indicated by lockWaiting of the waiting transaction entry, the TransID of the terminated transaction is found and the value is reset to NULL (21).

도 5는 트랜잭션의 락 반환 처리 방법을 나타낸 것이다.5 shows a lock return processing method of a transaction.

만약, 해당 트랜잭션 엔트리의 lockWaiting이 가리키는 리스트내의 요소수가 numStaticElements를 초과한다면(31), 락 대기 정보 요소 풀에 래치를 걸고(32), 초과되는 수 만큼의 요소들을 lockWaiting이 가리키는 리스트에서 떼어낸다(33). 그리고, 떼어낸 요소들을 락 대기 정보 요소 풀에 반환시키고(34), 대기 정보 요소 풀에 걸었던 래치를 푼다(35). 그리고, lockWaiting이 가리키는 리스트내의 모든 요소 값을 NULL로 리셋시킨다(36). 그런데, 만약 해당 트랜잭션 엔트리의 lockWaiting이 가리키는 리스트내의 요소수가 numStaticElements를 초과하지 않는다면(31), lockWaiting이 가리키는 리스트내의 모든 요소 값을 NULL로 리셋시킨다(36).If the number of elements in the list indicated by lockWaiting of the transaction entry exceeds numStaticElements (31), latch the lock wait information element pool (32), and remove as many elements from the list indicated by lockWaiting (33). ). Then, the detached elements are returned to the lock wait information element pool (34), and the latches latched on the wait information element pool are released (35). Then, all element values in the list indicated by lockWaiting are reset to NULL (36). However, if the number of elements in the list indicated by lockWaiting of the transaction entry does not exceed numStaticElements (31), all the element values in the list indicated by lockWaiting are reset to NULL (36).

도 6은 교착 상태 검출기의 처리 방법을 나타낸 것이다.6 shows a method of processing a deadlock detector.

락 대기 정보 요소 풀에 래치를 걸고(41), 트랜잭션 테이블내 각 엔트리의 lockWaiting필드가 가리키는 락 대기 정보들을 이용하여 시스템이 교착 상태에 있는가의 여부를 점검한다(42). 그리고, 대기 정보 요소 풀에 걸었던 래치를 푼다(43).A latch 41 is latched to the lock wait information element pool, and it is checked 42 whether the system is in a deadlock using the lock wait information indicated by the lockWaiting field of each entry in the transaction table. Then, the latch that latches on the waiting information element pool is released (43).

numStaticElements를 시스템의 특성에 맞도록 적절하게 설정함으로써 많은 트랜잭션들은 요소의 동적인 할당 없이 정적인 할당만으로 락 대기 정보를 구성할 수 있다. 이러한 트랜잭션들은 교착 상태 검출기의 수행 여부에 전혀 영향 받지 않고 독립적으로 수행할 수 있도록 해 준다. 따라서, 본 발명은 트랜잭션의 동시성이 개선되며, 이 결과, 전체 시스템의 성능이 개선될 수 있는 효과가 있다.By properly setting numStaticElements to match the characteristics of the system, many transactions can construct lock wait information with only static allocations, without dynamic allocation of elements. These transactions allow you to perform them independently without affecting the deadlock detector. Therefore, the present invention improves the concurrency of transactions, and as a result, there is an effect that the performance of the entire system can be improved.

Claims (8)

주 기억장치 데이타베이스 관리 시스템(DBMS)에서 교착 상태 검출기와 트랜잭션들이 락 대기 정보를 공통으로 액세스시에 발생되는 교착상태를 트랜잭션 테이블과 락 대기 정보를 이용하여 검출하기 위해서, 상기 락 대기 정보 풀에 대한 래치를 락 대기 정보 자체를 위한 상호 배제 사용수단으로 사용하고,In the main storage database management system (DBMS), in order to detect the deadlock that occurs when the deadlock detector and the transactions commonly access the lock wait information using the transaction table and the lock wait information, the lock wait information pool is added to the lock wait information pool. Using the latch for the lock wait information itself as mutual exclusion means, 시스템을 초기화하는 제 1 과정;A first process of initializing the system; 트랜잭션이 락을 요청하였을 때 그 락이 다른 트랜잭션에 의해 이미 획득된 상태인 경우나 대기중인 락을 이미 요청한 다른 트랜잭션이 획득한 경우에 트랜잭션의 락 대기 처리를 수행하는 제 2 과정;A second step of performing a lock wait process of a transaction when the transaction requests a lock, when the lock is already acquired by another transaction or when another transaction that has already requested a pending lock is acquired; 트랜잭션의 락 획득 처리를 수행하는 제 3 과정;A third step of performing lock acquisition processing of a transaction; 트랜잭션의 락 반환 처리를 수행하는 제 4 과정; 및A fourth step of performing lock return processing of the transaction; And 상기 제 2, 제 3 및 제 4 과정중 어느 한 과정과 함께 수행되는 교착상태 검출기의 처리 과정인 제 5 과정을 수행하되, 각 과정을 독립적으로 수행함으로써, 교착상태 검출기와 트랜잭션들간의 상호 간섭을 최소화하는 것을 특징으로 하는 교착상태 검출을 위한 락 대기 정보의 상호 배제방법.By performing a fifth process, which is a process of the deadlock detector performed in conjunction with any one of the second, third and fourth processes, by independently performing each process, mutual interference between the deadlock detector and transactions Mutual exclusion of lock wait information for deadlock detection, characterized in that to minimize. 제 1 항에 있어서,The method of claim 1, 상기 제 1 과정은,The first process, 시스템의 특성을 고려하여 numStaticElements(정적할당 요소수)를 지정하는 제 1 단계;A first step of designating numStaticElements (the number of statically allocated elements) in consideration of characteristics of the system; 상기 트랜잭션 테이블내에 교착 상태 검출기를 위한 엔트리를 하나 할당하고, 각 필드를 초기화 시키는 제 2 단계;Allocating an entry for a deadlock detector in the transaction table and initializing each field; 트랜잭션 테이블내의 모든 엔트리에 대하여 다음을 수행하는 제 3 단계;A third step of performing the following for every entry in the transaction table; 상기 numStaticElements 수 만큼의 대기 정보 요소를 풀로부터 할당하여 리스트를 구성한 후, 각 요소의 값을 NULL로 초기화 시키는 제 4 단계; 및A fourth step of constructing a list by allocating the same number of waiting information elements as the number of numStaticElements from a pool, and then initializing the value of each element to NULL; And 엔트리의 락 대기(lockWaiting) 필드가 이 리스트를 가리키도록 하는 제 5 단계로 이루어진 것을 특징으로 하는 교착상태 검출을 위한 락 대기 정보의 상호 배제방법.And a fifth step of causing the lockWaiting field of the entry to point to this list. 제 1 항에 있어서,The method of claim 1, 상기 제 2 과정은,The second process, 락을 이미 획득한 트랜잭션의 수를 체크하는 제 1 단계;Checking a number of transactions that have already acquired a lock; 상기 락을 획득한 트랜잭션 수가 현재 lockWaiting이 가리키는 리스트내의 요소 수를 초과하는지 판단하는 제 2 단계;A second step of determining whether the number of transactions that acquire the lock exceeds the number of elements in the list indicated by the current lockWaiting; 초과하면 락 대기 정보 요소 풀에 래치를 걸고, 락 대기 정보 요소 풀로부터 초과되는 수 만큼의 요소를 할당받는 제 3 단계;Latching the lock wait information element pool if exceeded, and allocating an excess number of elements from the lock wait information element pool; 그 할당 받은 요소들을 트랜잭션 테이블내 해당 엔트리의 lockWaiting필드가 가리키는 리스트에 연결하고, 해당 락을 획득한 트랜잭션들의 TransID를 lockWaiting필드가 가리키는 리스트내의 각 요소에 넣는 제 4 단계;Linking the allocated elements to a list indicated by the lockWaiting field of the corresponding entry in the transaction table, and inserting the TransIDs of the transactions that acquired the lock into each element in the list indicated by the lockWaiting field; 대기 정보 요소 풀에 걸었던 래치를 푸는 제 5 단계; 및A fifth step of releasing the latch that has latched on the waiting information element pool; And 상기 제 2 단계의 판단에 의해 초과하지 않는다면, 해당 락을 획득한 트랜잭션들의 TransID를 lockWaiting필드가 가리키는 리스트내의 각 요소에 넣는 제 6 단계로 이루어진 것을 특징으로 하는 교착상태 검출을 위한 락 대기 정보의 상호 배제방법.And a sixth step of inserting the TransID of the transactions that have obtained the lock into each element in the list indicated by the lockWaiting field, unless exceeded by the determination of the second step. Exclusion Method. 제 3 항에 있어서,The method of claim 3, wherein 상기 락 대기 정보 요소는, 자신이 대기하는 트랜잭션의 수가 numStaticElements를 초과하면 풀로부터 동적으로 할당 받는 것을 특징으로 하는 교착상태 검출을 위한 락 대기 정보의 상호 배제방법.And the lock wait information element is dynamically allocated from a pool when the number of transactions waiting for it is greater than numStaticElements. 제 3 항에 있어서,The method of claim 3, wherein 상기 락 대기 정보 요소는, 자신이 대기하는 트랜잭션의 수가 numStaticElements 미만이면 풀로 부터 정적으로 할당받는 것을 특징으로 하는 교착상태 검출을 위한 락 대기 정보의 상호 배제방법.And the lock wait information element is statically allocated from the pool if the number of transactions waiting for it is less than numStaticElements. 제 1 항에 있어서,The method of claim 1, 상기 제 3 과정은,The third process, 대기하는 트랜잭션 엔트리의 lockWaiting이 가리키는 리스트에서 종료된 트랜잭션의 TransID를 찾아 값을 NULL로 리셋시키는 것을 특징으로 하는 교착상태 검출을 위한 락 대기 정보의 상호 배제방법.A method of mutual exclusion of lock wait information for detecting deadlocks, characterized by finding a TransID of a completed transaction in a list indicated by lockWaiting of a waiting transaction entry and resetting the value to NULL. 제 1 항에 있어서,The method of claim 1, 상기 제 4 과정은,The fourth process, 해당 트랜잭션 엔트리의 lockWaiting이 가리키는 리스트내의 요소수가 numStaticElements를 초과하는지 판단하는 제 1 단계;A first step of determining whether the number of elements in the list indicated by lockWaiting of the corresponding transaction entry exceeds numStaticElements; 초과하면, 락 대기 정보 요소 풀에 래치를 걸은 후 초과되는 수 만큼의 요소들을 lockWaiting이 가리키는 리스트에서 떼어내는 제 2 단계;If exceeded, latching the lock wait information element pool and then removing the excess number of elements from the list indicated by lockWaiting; 그 떼어낸 요소들을 락 대기 정보 요소 풀에 반환시킨 후 대기 정보 요소 풀에 걸었던 래치를 푸는 제 3 단계;A third step of returning the detached elements to the lock wait information element pool and then releasing the latch that has latched on the wait information element pool; lockWaiting가 가리키는 리스트내의 모든 요소 값을 NULL로 리셋시키는 제 4 단계; 및a fourth step of resetting all element values in the list indicated by lockWaiting to NULL; And 상기 제 1 단계의 판단에 의해 초과하지 않는다면, lockWaiting이 가리키는 리스트내의 모든 요소 값을 NULL로 리셋시키는 제 5 단계로 이루어진 것을 특징으로 하는 교착상태 검출을 위한 락 대기 정보의 상호 배제방법.And a fifth step of resetting all element values in the list pointed to by lockWaiting to NULL, unless exceeded by the determination of the first step. 제 1 항에 있어서,The method of claim 1, 상기 제 5 과정은,The fifth process, 락 대기 정보 요소 풀에 래치를 걸은 후, 트랜잭션 테이블내 각 엔트리의 lockWaiting필드가 가리키는 락 대기 정보들을 이용하여 시스템이 교착 상태에 있는가의 여부를 점검하고서, 대기 정보 요소 풀에 걸었던 래치를 푸는 단계로 이루어진 것을 특징으로 하는 교착상태 검출을 위한 락 대기 정보의 상호 배제방법.After latching the lock wait information element pool, using the lock wait information indicated by the lockWaiting field of each entry in the transaction table, checking whether the system is in a deadlock state, and then unlatching the latch that has waited on the wait information element pool. Mutual exclusion method of lock wait information for detecting a deadlock.
KR1019980050248A 1998-11-23 1998-11-23 Mutual Exclusion of Locked Standby Information for Deadlock Detection KR100317229B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019980050248A KR100317229B1 (en) 1998-11-23 1998-11-23 Mutual Exclusion of Locked Standby Information for Deadlock Detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019980050248A KR100317229B1 (en) 1998-11-23 1998-11-23 Mutual Exclusion of Locked Standby Information for Deadlock Detection

Publications (2)

Publication Number Publication Date
KR20000033403A true KR20000033403A (en) 2000-06-15
KR100317229B1 KR100317229B1 (en) 2002-02-28

Family

ID=19559347

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019980050248A KR100317229B1 (en) 1998-11-23 1998-11-23 Mutual Exclusion of Locked Standby Information for Deadlock Detection

Country Status (1)

Country Link
KR (1) KR100317229B1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100399579B1 (en) * 2000-12-04 2003-09-26 한국전자통신연구원 An Asynchronous Deadlock Detection Method In Transaction Processing System
KR20170084969A (en) * 2016-01-13 2017-07-21 삼성전자주식회사 System on chip, mobile terminal, and method for operating the system on chip
CN111400330A (en) * 2020-03-13 2020-07-10 深圳前海微众银行股份有限公司 Task processing method, device, equipment and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2621777B2 (en) * 1993-12-20 1997-06-18 日本電気株式会社 Deadlock avoidance method in distributed system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100399579B1 (en) * 2000-12-04 2003-09-26 한국전자통신연구원 An Asynchronous Deadlock Detection Method In Transaction Processing System
KR20170084969A (en) * 2016-01-13 2017-07-21 삼성전자주식회사 System on chip, mobile terminal, and method for operating the system on chip
CN111400330A (en) * 2020-03-13 2020-07-10 深圳前海微众银行股份有限公司 Task processing method, device, equipment and computer readable storage medium
CN111400330B (en) * 2020-03-13 2024-04-09 深圳前海微众银行股份有限公司 Task processing method, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
KR100317229B1 (en) 2002-02-28

Similar Documents

Publication Publication Date Title
US5522077A (en) Object oriented network system for allocating ranges of globally unique object identifiers from a server process to client processes which release unused identifiers
US6144983A (en) Method and apparatus for dynamic lock granularity escalation and de-escalation in a computer system
US7243088B2 (en) Database management system with efficient version control
US7089253B2 (en) Computer method and system for concurrency control using dynamic serialization ordering
US8473950B2 (en) Parallel nested transactions
US20080243865A1 (en) Maintaining global state of distributed transaction managed by an external transaction manager for clustered database systems
Jung et al. A scalable lock manager for multicores
Ansari et al. Lee-tm: A non-trivial benchmark suite for transactional memory
CA2027934C (en) Accelerated deadlock detection in congested data transactions
US20140040220A1 (en) Methods and systems for deadlock detection
US7991967B2 (en) Using type stability to facilitate contention management
US8312470B2 (en) Recursive locking of a thread-shared resource
US8095731B2 (en) Mutable object caching
US20140040219A1 (en) Methods and systems for a deadlock resolution engine
KR100317229B1 (en) Mutual Exclusion of Locked Standby Information for Deadlock Detection
CN113722021B (en) Object sharing by entities using data structures
KR100253627B1 (en) Transaction control method not to be selected as deadlock sacrificer in transaction abortion in a data storage system
Doki et al. Accelerating scan transaction with node locking
US6981108B1 (en) Method for locking shared resources connected by a PCI bus
US6874059B1 (en) System and method for using anonymous tokens for efficient memory management
JPH02294835A (en) Managing system for table being used
KR100611739B1 (en) PARALLEL RESOURCE Allocation AND freeing METHOD IN JOURNALING FILE SYSTEM OF MULTI-PROCESSOR ENVIRONMENT
KR100319763B1 (en) Method of detection and resolution thread-combined-deadlock in a thread pool based transaction processing system
Yang et al. A multi‐granularity locking scheme for java packedobjects based on a concurrent multiway tree
EP0377133B1 (en) Wait depth limited concurrency control method

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20091029

Year of fee payment: 9

LAPS Lapse due to unpaid annual fee