KR100309787B1 - Method for identifying discreted deadlock conditions on the multiple database system - Google Patents

Method for identifying discreted deadlock conditions on the multiple database system Download PDF

Info

Publication number
KR100309787B1
KR100309787B1 KR1019980039718A KR19980039718A KR100309787B1 KR 100309787 B1 KR100309787 B1 KR 100309787B1 KR 1019980039718 A KR1019980039718 A KR 1019980039718A KR 19980039718 A KR19980039718 A KR 19980039718A KR 100309787 B1 KR100309787 B1 KR 100309787B1
Authority
KR
South Korea
Prior art keywords
local database
accesses
database
flag
true
Prior art date
Application number
KR1019980039718A
Other languages
Korean (ko)
Other versions
KR20000020905A (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 KR1019980039718A priority Critical patent/KR100309787B1/en
Publication of KR20000020905A publication Critical patent/KR20000020905A/en
Application granted granted Critical
Publication of KR100309787B1 publication Critical patent/KR100309787B1/en

Links

Abstract

1. 청구범위에 기재된 발명이 속한 기술분야1. TECHNICAL FIELD OF THE INVENTION

본 발명은 다중 데이터베이스 시스템에서의 분산 교착 상태 식별 방법에 관한 것임.The present invention relates to a distributed deadlock identification method in a multiple database system.

2. 발명이 해결하려고 하는 기술적 과제2. The technical problem to be solved by the invention

본 발명은, 시스템의 성능을 최대한으로 보장하면서 발생할 수 있는 모든 교착 상태를 식별하는 분산 교착 상태 식별 방법을 제공하고자 함.The present invention seeks to provide a distributed deadlock identification method that identifies all deadlocks that may occur while ensuring maximum system performance.

3. 본 발명의 해결 방법의 요지3. Summary of the Solution of the Invention

본 발명은, 다중 데이터베이스 시스템에 적용되는 분산 교착 상태 식별 방법에 있어서, 시간 초과된 트랜잭션이 존재하는지를 확인하여 지역 데이터베이스의 인덱스값(I)를 초기화하고, 읽기 전용 변수를 참으로 설정하는 제 1 단계; 상기 지역 데이터베이스의 수가 상기 지역 데이터베이스의 인덱스값 이상인지를 확인하여 각 지역 데이터베이스의 접근 인덱스값(J)을 초기화하고, I번째 지역 데이터베이스에 대한 접근수를 초기화하는 제 2 단계; 상기 I번째 지역 데이터베이스의 접근수가 'J'이상이면 상기 I번째 지역 데이터베이스에 대한 접근수를 소정의 제 1 수만큼 증가시키고, 'J'를 소정의 제 1 수만큼 증가시키며, 상기 I번째 데이터베이스의 플래그를 참으로 설정하는 제 3 단계; 상기 I번째 지역 데이터베이스의 접근수가 'J'이상이 아니면 상기 'I'번째 지역 데이터베이스의 플래그가 참인지를 확인하여 플래그가 참이면 'J'를 초기화하고, 읽기 전용 변수를 지정하며, 플래그가 참이 아니면 접근한 모든 트랜잭션이 읽기 모드인지를 판단하는 제 4 단계; 상기 제 4 단계에서 접근한 모든 트랜잭션이 읽기 모드이면 지역 데이터베이스로부터의 응답을 기다릴 수 있는 시간을 연장하는 제 5 단계; 및 상기 제 4 단계에서 접근한 모든 트랜잭션이 읽기 모드가 아니면 상기 지역 데이터베이스의 플래그 및 상기 지역 데이터베이스에 대한 접근수를 확인하여 시간 초과된 트랜잭션을 철회하는 제 6 단계를 포함한다.In the distributed deadlock identification method applied to a multi-database system, a first step of checking whether a timed out transaction exists and initializing an index value I of a local database and setting a read-only variable to true ; A second step of checking whether the number of the local databases is equal to or larger than the index value of the local database, initializing the access index value J of each local database, and initializing the number of accesses to the I-th local database; If the number of accesses of the I-th local database is greater than or equal to 'J', the number of accesses to the I-th local database is increased by a predetermined first number, 'J' is increased by a predetermined first number, and the number of accesses of the I-th database is increased. A third step of setting the flag to true; If the number of accesses of the I local database is not greater than 'J', check whether the flag of the 'I' local database is true, and if the flag is true, initialize 'J', specify a read-only variable, and set the flag to true. Otherwise, determining whether all accessed transactions are in read mode; A fifth step of extending a time for waiting for a response from a local database if all transactions accessed in the fourth step are in a read mode; And a sixth step of retracting the timed out transaction by checking a flag of the local database and the number of accesses to the local database if all the transactions accessed in the fourth step are not in the read mode.

4. 발명의 중요한 용도4. Important uses of the invention

본 발명은 다중 데이터베이스 시스템에 이용됨.The present invention is used in multiple database systems.

Description

다중 데이터베이스 시스템에서의 분산 교착 상태 식별 방법{Method for identifying discreted deadlock conditions on the multiple database system}Method for identifying discrete deadlock conditions on the multiple database system

본 발명은 다중 데이터베이스 시스템에서의 분산 교착 상태 식별 방법에 관한 것이다.The present invention relates to a distributed deadlock identification method in a multiple database system.

다중 데이터베이스 시스템에서 발생하는 분산 교착 상태 식별 방식은 크게 두가지로 나뉘어 질 수 있다. 소정 시간이 지나도 시스템으로부터 응답이 없을 경우 교착 상태로 간주하는 시간 초과(time-out) 방식과 잠재 대기 그래프(potential conflict grapic)를 생성하여 고리(cycle)가 식별되면 교착 상태로 간주하는 잠재 대기 그래프 방식이 있다.Distributed deadlock identification in multiple database systems can be divided into two types. Create a time-out method that considers deadlocks and a potential conflict graph when there is no response from the system after a certain amount of time. A latent wait graph that considers deadlocks when a cycle is identified. There is a way.

전술한 바와 같은 시간 초과 방식은 간단한 장점이 있는 반면 교착 상태가 아님에도 불구하고 교착 상태로 간주하여 아무 문제없는 트랜잭션을 철회하게 되는 거짓 교착 상태(false deadlock)를 발견하는 빈도가 높은 문제점이 있었다.While the timeout scheme as described above has a simple advantage, there is a high frequency of finding false deadlocks which, despite being not deadlocks, are regarded as deadlocks and withdraw a problem-free transaction.

한편, 잠재 대기 그래프 방식은 시간 초과 방식보다는 정확하게 교착 상태를 식별할 수 있는 장점이 있지만 주기적으로 시스템이 교착 상태를 발견하기 위해 모든 작업을 중지하고, 잠재 대기 그래프를 만들어야 하므로 성능을 저하시키는 문제점이 있었다.On the other hand, the latent wait graph method has the advantage of identifying deadlocks more accurately than the timeout method, but the system has to stop all the work periodically and create a latent wait graph to detect deadlocks. there was.

여기서, 거짓 교착 상태(false deadlock)는 교착 상태가 아닌 상황을 시스템이 교착 상태로 인정하여 관련된 트랜잭션을 철회하는 경우 이를 거짓 교착 상태라고 한다.Here, a false deadlock is called a false deadlock when the system recognizes a non-deadlock situation as a deadlock and withdraws a related transaction.

따라서, 종래에는 거짓 교착 상태로 인한 불필요한 트랜잭션 철회를 가져오게 됨으로써 시스템의 신뢰성과 효율성을 저하시키는 문제점이 있었다.Thus, in the related art, unnecessary transaction withdrawal due to a false deadlock is brought, thereby degrading the reliability and efficiency of the system.

따라서, 상기한 바와 같은 문제점을 해결하기 위하여 안출된 본 발명은, 다중 데이터베이스 시스템에서 시간 초과 방식과 잠재 대기 그래프 방식을 혼합하여 시스템의 성능을 최대한으로 보장하면서 발생할 수 있는 모든 교착 상태를 식별하는 분산 교착 상태 식별 방법을 제공하는데 그 목적이 있다.Therefore, the present invention devised to solve the above problems, the distribution to identify all the deadlocks that can occur while ensuring the performance of the system to the maximum by combining the timeout method and the latent wait graph method in a multiple database system Its purpose is to provide a method for identifying deadlocks.

도 1은 본 발명이 적용되는 다중 데이터베이스 시스템의 구성예시도.1 is an exemplary configuration diagram of a multiple database system to which the present invention is applied.

도 2는 다중 데이터베이스 시스템에서의 분산 교착 상태에 관한 설명도.2 is an explanatory diagram of a distributed deadlock state in a multiple database system.

도 3은 분산 교착 상태의 잠재 대기 그래프에 관한 설명도.3 is an explanatory diagram of a latent atmospheric graph in a distributed deadlock state;

도 4a 내지 도4c 는 교착 상태, 지역 데이터베이스 기준 잠재 대기 그래프 및 테이블 기준 잠재 대기 그래프에 관한 설명도.4A to 4C are explanatory diagrams of a deadlock state, a regional database reference latent atmospheric graph, and a table reference latent atmospheric graph;

도 5는 자료 구조를 이용한 지역 데이터베이스별 접근 기록에 관한 설명도.5 is an explanatory diagram for access record for each local database using a data structure.

도 6a 및 도 6b 는 본 발명에 따른 다중 데이터베이스 시스템에서의 분산 교착 상태 식별 방법의 일실시예 흐름도.6A and 6B are flow diagrams of one embodiment of a distributed deadlock identification method in a multiple database system in accordance with the present invention.

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

101 : 전역 데이터베이스 시스템 102 : 다중 데이터베이스 시스템101: global database system 102: multiple database system

103 : 지역 데이터베이스 시스템103: local database system

상기 목적을 달성하기 위한 본 발명은, 다중 데이터베이스 시스템에 적용되는 분산 교착 상태 식별 방법에 있어서, 시간 초과된 트랜잭션이 존재하는지를 확인하여 지역 데이터베이스의 인덱스값(I)을 초기화하고, 읽기 전용 변수를 참으로 설정하는 제 1 단계; 상기 지역 데이터베이스의 수가 상기 지역 데이터베이스의 인덱스값 이상인지를 확인하여 각 지역 데이터베이스의 접근 인덱스값(J)을 초기화하고, I번째 지역 데이터베이스에 대한 접근수를 초기화하는 제 2 단계; 상기 I번째 지역 데이터베이스의 접근수가 'J'이상이면 상기 I번째 지역 데이터베이스에 대한 접근수를 소정의 제 1 수만큼 증가시키고, 'J'를 소정의 제 1 수만큼 증가시키며, 상기 I번째 데이터베이스의 플래그를 참으로 설정하는 제 3 단계; 상기 I번째 지역 데이터베이스의 접근수가 'J'이상이 아니면 상기 'I'번째 지역 데이터베이스의 플래그가 참인지를 확인하여 플래그가 참이면 'J'를 초기화하고, 읽기 전용 변수를 지정하며, 플래그가 참이 아니면 접근한 모든 트랜잭션이 읽기 모드인지를 판단하는 제 4 단계; 상기 제 4 단계에서 접근한 모든 트랜잭션이 읽기 모드이면 지역 데이터베이스로부터의 응답을 기다릴 수 있는 시간을 연장하는 제 5 단계; 및 상기 제 4 단계에서 접근한 모든 트랜잭션이 읽기 모드가 아니면 상기 지역 데이터베이스의 플래그 및 상기 지역 데이터베이스에 대한 접근수를 확인하여 시간 초과된 트랜잭션을 철회하는 제 6 단계를 포함하는 것을 특징으로 한다.In order to achieve the above object, the present invention provides a distributed deadlock identification method applied to a multi-database system, by checking whether a timed out transaction exists and initializing an index value (I) of a local database and setting a read-only variable to true. A first step of setting to; A second step of checking whether the number of the local databases is equal to or larger than the index value of the local database, initializing the access index value J of each local database, and initializing the number of accesses to the I-th local database; If the number of accesses of the I-th local database is greater than or equal to 'J', the number of accesses to the I-th local database is increased by a predetermined first number, 'J' is increased by a predetermined first number, and the number of accesses of the I-th database is increased. A third step of setting the flag to true; If the number of accesses of the I local database is not greater than 'J', check whether the flag of the 'I' local database is true, and if the flag is true, initialize 'J', specify a read-only variable, and set the flag to true. Otherwise, determining whether all accessed transactions are in read mode; A fifth step of extending a time for waiting for a response from a local database if all transactions accessed in the fourth step are in a read mode; And a sixth step of retracting the timed out transaction by checking a flag of the local database and the number of accesses to the local database if all the transactions accessed in the fourth step are not in the read mode.

한편, 본 발명은, 대용량 프로세서를 구비한 다중 데이터베이스 시스템에, 시간 초과된 트랜잭션이 존재하는지를 확인하여 지역 데이터베이스의 인덱스값(I)을 초기화하고, 읽기 전용 변수를 참으로 설정하는 제 1 기능; 상기 지역 데이터베이스의 수가 상기 지역 데이터베이스의 인덱스값 이상인지를 확인하여 각 지역 데이터베이스의 접근 인덱스값(J)을 초기화하고, I번째 지역 데이터베이스에 대한 접근수를 초기화하는 제 2 기능; 상기 I번째 지역 데이터베이스의 접근수가 'J'이상이면 상기 I번째 지역 데이터베이스에 대한 접근수를 소정의 제 1 수만큼 증가시키고, 'J'를 소정의 제 1 수만큼 증가시키며, 상기 I번째 데이터베이스의 플래그를 참으로 설정하는 제 3 기능; 상기 I번째 지역 데이터베이스의 접근수가 'J'이상이 아니면 상기 'I'번째 지역 데이터베이스의 플래그가 참인지를 확인하여 플래그가 참이면 'J'를 초기화하고, 읽기 전용 변수를 지정하며, 플래그가 참이 아니면 접근한 모든 트랜잭션이 읽기 모드인지를 판단하는 제 4 기능; 상기 제 4 기능에서 접근한 모든 트랜잭션이 읽기 모드이면 지역 데이터베이스로부터의 응답을 기다릴 수 있는 시간을 연장하는 제 5 기능; 및On the other hand, the present invention, in a multi-database system having a large processor, the first function to determine whether there is a timed out transaction, initialize the index value (I) of the local database, and set the read-only variable to true; A second function of checking whether the number of the local databases is equal to or larger than the index value of the local database, initializing the access index value J of each local database, and initializing the number of accesses to the I-th local database; If the number of accesses of the I-th local database is greater than or equal to 'J', the number of accesses to the I-th local database is increased by a predetermined first number, 'J' is increased by a predetermined first number, and the number of accesses of the I-th database is increased. A third function of setting the flag to true; If the number of accesses of the I local database is not greater than 'J', check whether the flag of the 'I' local database is true, and if the flag is true, initialize 'J', specify a read-only variable, and set the flag to true. Otherwise, a fourth function of determining whether all accessed transactions are in read mode; A fifth function of extending a time for waiting for a response from a local database if all transactions accessed in the fourth function are in a read mode; And

상기 제 4 기능에서 접근한 모든 트랜잭션이 읽기 모드가 아니면 상기 지역 데이터베이스의 플래그 및 상기 지역 데이터베이스에 대한 접근수를 확인하여 시간 초과된 트랜잭션을 철회하는 제 6 기능을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 제공함을 특징으로 한다.If all the transactions accessed in the fourth function are not in the read mode, the program is written to a computer for realizing a sixth function of retracting a timed out transaction by checking a flag of the local database and the number of accesses to the local database. It provides a recording medium that can be.

이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 일실시예를 상세히 설명한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명이 적용되는 다중 데이터베이스 시스템의 구성예시도이다.1 is an exemplary configuration diagram of a multiple database system to which the present invention is applied.

도면에 도시된 바와 같이, 다중 데이터베이스 시스템(102)은 서로 다른 데이터 모델 및 사용 환경을 갖는 이기종 데이터베이스 관리 시스템들을 통합하여 사용자에게 마치 하나의 데이터베이스 시스템을 사용하는 것과 같은 환경을 제공하는 시스템이다.As shown in the figure, multiple database system 102 is a system that integrates heterogeneous database management systems with different data models and usage environments to provide a user with an environment as if using a single database system.

또한, 다중 데이터베이스 시스템(102)은 단순히 여러개의 지역 데이터베이스에 접근하는 공통 프로토콜만을 제공하는 방식으로 구성될 수도 있지만 자체적으로 데이터베이스 시스템 기능을 가지고 있는 경우도 있다. 자체적 데이터베이스 시스템 기능 내장 여부에 관련없이 어느 구조하에서나 한정된 데이터베이스 시스템 자원을 여러 트랜잭션이 동시에 사용하고자 하는 경우가 생기고 따라서 교착 상태가 발생하게 된다. 또한, 전술한 바와 같은 교착 상태는 여러개의 상이한 데이터베이스 시스템을 통합한 다중 데이터베이스 시스템(102)에서 식별된다.In addition, the multiple database system 102 may be configured in such a manner as to provide only a common protocol for accessing multiple local databases, but may have its own database system function. Regardless of whether or not it has its own built-in database system function, there are cases where multiple transactions attempt to use a limited number of database system resources simultaneously under any structure, and thus deadlocks occur. In addition, deadlocks as described above are identified in multiple database system 102 incorporating several different database systems.

도 2 는 다중 데이터베이스 시스템에서의 분산 교착 상태에 관한 설명도로서, 시간이 진행됨에 따라 트랜잭션 수행 과정중에 발생하는 아래의 (표 1)의 교착 상태를 나타낸 것이다.2 is an explanatory diagram of a distributed deadlock in a multiple database system, and illustrates a deadlock of Table 1 below, which occurs during a transaction execution process as time passes.

시간time 트랜잭션 수행 내역Transaction performance history T0T1T2T3T4T0T1T2T3T4 전역 트랜잭션 1; 지역 데이베이스 LDB1의 테이블 T1에 대해 쓰기 권한 소유전역 트랜잭션 2; 지역 데이베이스 LDB2의 테이블 T2에 대해 쓰기 권한 소유전역 트랜잭션 1; 지역 데이베이스 LDB2의 테이블 T2에 대해 쓰기 권한 요구전역 트랜잭션 2; 지역 데이베이스 LDB1의 테이블 T1에 대해 쓰기 권한 요구교착상태 발생Global transaction 1; Write permission on global database LDB1 table T1 Owned global transaction 2; Write permission on global database LDB2 table T2 Owned global transaction 1; Write permission request for table T2 in local database LDB2 Global transaction 2; Write permission request deadlock for table T1 in local database LDB1

(표 1)의 T4 시점에서 전역 트랜잭션 1은 지역 데이터베이스 LDB2의 테이블 T2를 수정하기 위해 전역 트랜잭션 2가 수행을 마치기를 기다리고 있고, 전역 트랜잭션 2는 지역 데이터베이스 LDB1의 테이블 T1를 수정하기 위해 전역 트랜잭션 1이 수행을 마치기를 기다리고 있으므로 그 어느 요구도 만족시킬 수 없는 교착 상태에 빠지게 된다.At the time T4 of Table 1, global transaction 1 is waiting for global transaction 2 to finish to modify table T2 in local database LDB2, and global transaction 2 is global transaction 1 to modify table T1 in local database LDB1. You are waiting for this to complete, so you are stuck in a deadlock that cannot satisfy any request.

이러한 경우, 각 지역 데이터베이스 시스템은 서로의 내부 정보를 알수 없으므로 발생한 교착 상태를 해결하지 못한다. 다시 말하면 지역 데이터베이스 LDB1에서 알 수 있는 정보는 테이블 T1에 대해 트랜잭션 1이 쓰기 권한을 가지고 있고, 트랜잭션 2가 쓰기 권한을 얻기 위해 트랜잭션 1의 수행이 끝나기를 기다리고 있다는 사실뿐이므로 LDB1 데이터베이스 시스템은 이를 교착 상태로 인식하지 못한다. 이렇게 여러 데이터베이스에 걸쳐 교착 상태가 발생하는 경우를 분산 교착 상태라 정의하며 전역 데이터베이스 시스템이 이를 발견하고 해지하여야 한다.In this case, each local database system cannot know each other's internal information and thus cannot solve the deadlock. In other words, the only information available from local database LDB1 is the fact that transaction 1 has write permission on table T1, and that transaction 2 is waiting for transaction 1 to finish writing to gain write permission, so the LDB1 database system is deadlocked. It is not recognized as a state. This deadlock occurs across multiple databases as a distributed deadlock, and the global database system must detect and terminate it.

한편, 각 지역 데이터베이스 안에서 발생하는 교착 상태는 지역 데이터베이스 시스템이 해결한다. 예를 들면, 아래의 (표 2)와 같은 상황에서는 지역 데이터베이스 LDB1 서버가 교착 상태를 해결한다.On the other hand, deadlocks that occur within each local database are resolved by the local database system. For example, in the situation shown in Table 2 below, the local database LDB1 server resolves a deadlock.

시간time 트랜잭션 수행 내역Transaction performance history T0T1T2T3T4T5T0T1T2T3T4T5 전역 트랜잭션 1; 지역 데이베이스 LDB1의 테이블 T11에 대해 쓰기 권한 소유전역 트랜잭션 2; 지역 데이베이스 LDB1의 테이블 T12에 대해 쓰기 권한 소유전역 트랜잭션 1; 지역 데이베이스 LDB2의 테이블 T21에 대해 쓰기 권한 소유전역 트랜잭션 1; 지역 데이베이스 LDB1의 테이블 T12에 대해 쓰기 권한 요청전역 트랜잭션 2; 지역 데이베이스 LDB1의 테이블 T11에 대해 쓰기 권한 요청지역 데이터베이스 내부에서 교착 상태 발생Global transaction 1; Write permission on global database LDB1 table T11 Owned global transaction 2; Write permission on global database LDB1 table T12 Owned global transaction 1; Write permission on global database LDB2 table T21 Owned global transaction 1; Write permission request for table T12 in local database LDB1 Global transaction 2; Request write permission on table T11 in local database LDB1 A deadlock occurred inside the local database

전술한 바와 같은 지역 데이터베이스 내부적으로 일어나는 교착 상태는 지역 데이터베이스 시스템이 해결한다.Deadlocks that occur internally in the regional database as described above are addressed by the regional database system.

한편, 여러 지역 데이터베이스 시스템에 걸쳐서 발생하는 분산 교착 상태는 전역 데이터베이스 시스템이 해결한다. 도 2에 도시된 바와 같은 상황에서 발생하는 교착 상태는 분산 교착 상태이므로 각 지역 데이터베이스 시스템은 이를 식별할 수 없고 다중 데이터베이스 시스템이 식별하여 해결하여야 한다.On the other hand, distributed deadlocks that occur across multiple local database systems are resolved by the global database system. Since the deadlock that occurs in the situation as shown in Figure 2 is a distributed deadlock, each local database system cannot identify it and must be identified and resolved by multiple database systems.

또한, 분산 교착 상태 식별은 다중 데이터베이스 시스템의 지역적 교착 상태 식별과는 독립적으로 수행된다. 본 발명의 분산 교착 상태 식별 방법은 다중 데이터베이스 시스템의 지역적 트랜잭션에 미치는 영향을 최소화할 수 있다. 즉, 다중 데이터베이스 시스템중에는 스스로 하나의 데이터베이스 시스템인 전역 데이터베이스 시스템을 내부에 포함하고 있을 수도 있고, 전역 데이터베이스 시스템없이전역(분산) 트랜잭션 지원 기능만으로 이기종 데이터베이스 관리만 수행할 수도 있다.In addition, distributed deadlock identification is performed independently of local deadlock identification of multiple database systems. The distributed deadlock identification method of the present invention can minimize the impact on local transactions of multiple database systems. In other words, a multi-database system may include a global database system, which is itself a single database system, or perform heterogeneous database management only by supporting global (distributed) transactions without a global database system.

본 발명의 다중 데이터베이스 시스템에서의 분산 교착 상태 식별 방법은 독립적인 교착 상태 식별 방식을 사용하고 있으므로 이 두가지 시스템 구성하에서 모두 사용 가능하다.The distributed deadlock identification method in the multi-database system of the present invention uses an independent deadlock identification method, so it can be used under both system configurations.

본 발명의 다중 데이터베이스 시스템에서의 분산 교착 상태 식별 방법은 시간 초과 방식과 잠재 대기 그래프 방식의 장점을 혼합한 특징을 가진다. 즉, 지역 데이터베이스에 접근하여 그 결과를 얻기를 기다리는 전역 트랜잭션이 지정된 시간을 초과한 후에도 계속 지역 데이터베이스로부터 응답을 기다리고 있다면 전역 트랜잭션들의 상태를 조사하여 잠재 대기 그래프를 생성한다. 잠재 대기 그래프를 생성하여 고리가 발견되면 교착 상태로 간주하여 시간을 초과하여 기다리고 있는 전역 트랜잭션을 철회하여 교착 상태를 해지하고, 만약 고리가 발견되지 않으면 시간을 초과하여 기다리고 있는 트랜잭션의 대기 시간을 연장시켜 준다.The distributed deadlock identification method in the multi-database system of the present invention has a feature that combines the advantages of the timeout method and the latent wait graph method. In other words, if a global transaction waiting for access to the local database and obtaining the result continues to wait for a response from the local database even after exceeding the specified time, the potential wait graph is generated by examining the status of the global transactions. Create a latent wait graph to consider deadlocks and retire deadlocks by relinquishing timed-awaited global transactions, and extend the wait time of waiting transactions if they are not found. Let it be.

잠재 대기 그래프를 생성하는 고리가 존재하는지를 식별하기 위한 기존의 방법은 고리 식별력의 정확성은 만족시키지만 고리를 찾는데 많은 시간을 소비하여 결과적으로 시스템의 성능을 저하시키는 큰 단점이 있었다. 본 발명에서는 이러한 단점을 극복하기 위해 교착 상태 식별을 위해 간단한 고리 발견 기법을 제시한다. 이 기법은 거짓 교착 상태 발견의 가능성은 있지만 발생하는 모든 교착 상태를 빠짐없이 식별할 수 있으며 그 수행기간이 기존의 방법에 비해 휠씬 적으며 간단한 장점을 갖는다.Existing methods for identifying the existence of a loop generating a latent atmospheric graph satisfy the accuracy of the ring identification, but have a large disadvantage in that the system spends a lot of time searching for the loop and consequently degrades the performance of the system. In order to overcome this disadvantage, the present invention provides a simple ring discovery technique for identifying deadlocks. This technique has the potential to detect false deadlocks, but it can identify all deadlocks that occur and is much shorter in duration than conventional methods.

만약 분산 교착 상태가 발생하면 다중 데이터베이스 시스템은 이를 해결하기 위해 시간을 초과하여 지역 데이터베이스의 응답을 기다리는 트랜잭션을 철회한다.If a distributed deadlock occurs, multiple database systems withdraw the transaction waiting for a response from the local database over time to resolve it.

잠재 대기 그래프 작성의 단위는 지역 데이터베이스이다. 다중 데이터베이스 시스템이 가질 수 있는 정보는 전역 트랜잭션이 어떤 지역 데이터베이스에 접근을 요청하여 응답을 받았는지의 여부가 전부이다. 즉. 각 지역 데이터베이스 내부는 마치 블랙박스처럼 외부(다중 데이터베이스 시스템)에 알려지지 않으므로 다중 데이터베이스 시스템은 각 지역 데이터베이스 내부에서 활동하고 있는 지역 트랜잭션의 상태를 알 수 있다. 따라서, 잠재 대기 그래프를 작성할 때 트랜잭션이 기다리고 있는 자원의 종류는 각 지역 데이터베이스가 된다.The unit of latent atmospheric graphing is the local database. The only information a multi-database system can have is whether or not a global transaction requested and accessed a local database. In other words. Since each local database is not known to the outside (multiple database systems) like a black box, multiple database systems can see the status of local transactions that are active inside each local database. Thus, when building a latent wait graph, the type of resource the transaction is waiting on is the local database.

도 3 은 분산 교착 상태의 잠재 대기 그래프에 관한 설명도로서, 도 2의 분산 교착 상태를 잠재 대기 그래프로 나타낸 것이다.FIG. 3 is an explanatory diagram of a latent atmospheric graph of a distributed deadlock state, in which the distributed deadlock state of FIG. 2 is represented by a latent atmospheric graph.

도 4a 내지 도4c 는 분산 교착 상태, 지역 데이터베이스 기준 잠재 대기 그래프 및 테이블 기준 잠재 대기 그래프에 관한 설명도로서, 도 4a 는 분산 교착 상태를 나타내고, 도 4b 는 지역 데이터베이스 기준 잠재 대기 그래프를 나타내며, 도 4c 는 테이블 기준 잠재 대기 그래프를 나타낸다.4A to 4C are explanatory diagrams of a distributed deadlock state, a regional database reference latent atmospheric graph, and a table reference latent atmospheric graph, FIG. 4A illustrates a distributed deadlock state, and FIG. 4B illustrates a regional database reference latent atmospheric graph, and FIG. 4c represents a table-based latent atmospheric graph.

도면에 도시된 바와 같이, 잠재 대기 그래프의 작성 단위가 각 지역 데이터베이스의 테이블인 경우 전역 시스템이 분산 교착 상태를 발견하지 못하는 경우의 예이다.As shown in the figure, in the case where the generation unit of the latent atmospheric graph is a table of each local database, the global system does not find a distributed deadlock.

또한, 잠재 대기 그래프를 지역 데이터베이스(LDB)를 단위로 작성하여 보면 다음과 같은 고리가 발견된다.In addition, if you create a latent atmospheric graph in the local database (LDB), the following loops are found.

Tran 1:LDB 2에 대해 쓰기 권한을 소유Tran 1: Has write permission on LDB 2

Tran 2:LDB 1에 대해 쓰기 권한을 소유Tran 2: Has write permission on LDB 1

Tran 1:LDB 1에 대해 쓰기 권한을 요구 (Tran 1은 Tran 2에게 LDB1요구)Tran 1: Request write permission for LDB 1 (Tran 1 requires Tran 2 for LDB1)

Tran 2:LDB 2에 대해 쓰기 권한을 요구 (Tran 2는 Tran 1에게 LDB2요구)Tran 2: Ask write permission for LDB 2 (Tran 2 asks Tran 1 for LDB2)

한편, 현 상황을 지역 테이블 단위로 작성하여 보면 다음과 같이 고리가 발견되지 않는다. 왜냐하면 다중 데이터베이스 시스템은 LDB 1에서 활동하고 있는 트랜잭션 Tran 1-1의 상태에 대해 전혀 모르고 있기 때문이다.On the other hand, if the current situation is written in the local table unit, the loop is not found as follows. This is because the multiple database system has no knowledge of the state of transaction Tran 1-1 in LDB 1.

Tran1:테이블 T3에 대해 쓰기 권한을 소유Tran1: possesses write permission on table T3

Tran2:테이블 T2에 대해 쓰기 권한을 소유Tran2: possesses write permission on table T2

Tran1:테이블 T1에 대해 쓰기 권한을 요구(Tran 1은 ?에게 테이블 T1 요구)Tran1: Request write permission on table T1 (Tran 1 asks table T1 for?)

Tran2:테이블 T3에 대해 쓰기 권한을 요구(Tran 2는 Tran 1에게 테이블 T3 요구)Tran2: Require write permission on table T3 (Tran 2 requires table T3 from Tran 1)

따라서, 전술한 바와 같이 발생하는 모든 경우의 교착 상태를 식별하기 위하여는 받드시 잠재 대기 그래프는 지역 데이터베이스 단위로 작성되어야 한다. 다시 말하면, 각 지역 데이터베이스의 내부는 전역 다중 데이터베이스 시스템에게 전혀 알려지지 않은 블랙박스처럼 행동하므로 도 4c에서 지역 데이터베이스 LDB1의 내부에 존재하는 지역 트랜잭션 Tran1-1에 대해서 전역 다중 데이터베이스 시스템은 전혀 정보를 얻을 수가 없다.Therefore, in order to identify the deadlocks in all cases occurring as described above, the latent atmospheric graph must be prepared in the unit of local database. In other words, the internals of each local database behave like a blackbox that is not known to the global multidatabase system at all, so the global multidatabase system cannot obtain any information about the local transaction Tran1-1 that exists inside the local database LDB1 in FIG. none.

따라서, 전역 시스템은 전역 트랜잭션 Tran 1이 지역 데이터베이스 LDB1의 테이블 T1에 대해 쓰기 요청을 보냈으나 응답이 오지 않아 기다리고 있다는 것이전역 시스템이 알 수 있는 정보의 전부이다. 실제 상황은 지역 트랜잭션 Tran1-1이 테이블 T1에 대해 쓰기 권한을 가지고 있으면서 테이블 T2에 대해 쓰기 권한을 요청중이고, 테이블 T2에 대해서는 전역 트랜잭션 Tran 2가 이미 쓰기 권한을 소유하고 있으므로 명백한 분산 교착 상태이지만 자원의 대상을 테이블로 설정하면 지역 트랜잭션 Tran1-1의 존재를 파악할 수 없으므로 잠재 대기 그래프 상에서는 고리가 나타나지 않고 실제 교착 상태 발생을 감지하지 못하게 되는 치명적인 결과를 가져 온다. 따라서, 전역 교착 상태의 발견은 받드시 그 자원의 대상을 지역 데이터베이스로 해야 발생하는 모든 교착 상태를 식별할 수 있다.Thus, the global system is all the information that the global system knows that the global transaction Tran 1 has sent a write request to table T1 in the local database LDB1 but no response has been waiting. The actual situation is apparent distributed deadlock because local transaction Tran1-1 has write permission on table T1 and is requesting write permission on table T2, and global transaction Tran 2 already has write permission on table T2. By setting the target of the table as a table, the presence of local transaction Tran1-1 can't be detected, resulting in a fatal result because the loop does not appear on the latent wait graph and the actual deadlock cannot be detected. Thus, the discovery of global deadlocks requires that the target of the resource be a local database to identify all deadlocks that occur.

도 5 는 자료 구조를 이용한 지역 데이터베이스별 접근 기록에 관한 설명도이다.5 is an explanatory diagram for access record for each local database using a data structure.

도면에 도시된 바와 같이, 다중 데이터베이스 시스템은 전역 트랜잭션이 지역 데이터베이스에 읽기/쓰기 요청을 할 때마다 시간을 기록해 둔다. 그리고 만약 위의 환경 변수에 지정된 시간값보다 오랫동안 전역 트랜잭션이 지역 데이터베이스로부터 응답을 받지 못하면 해당 트랜잭션을 시간 초과 트랜잭션으로 정의하고, 이때부터 각 전역 트랜잭션에 대한 정보를 모두 수집하여 잠재 대기 그래프를 생성한다.As shown in the figure, a multiple database system keeps track of the time each time a global transaction makes a read / write request to the local database. If a global transaction does not receive a response from the local database for longer than the time value specified in the above environment variable, the transaction is defined as a timed transaction, from which all information about each global transaction is collected to create a latent wait graph. .

분산 교착 상태를 식별하기 위하여 필요한 자료 구조에서 액세스(ACCESS)는 특정 트랜잭션이 지역 데이터베이스에 접근할 때마다 생성시키는 접근 기록이고, 유형(TYPE)은 읽기 또는 기록이며, 타임 아웃(TIMEOUT)은 마지막 요청을 보낸 시간이고, TRAN_ID는 전역 트랜잭션 식별자이다.In the data structures needed to identify distributed deadlocks, access (ACCESS) is an access record that is generated each time a specific transaction accesses the local database, type is read or write, and timeout is the last request. Is the time spent, and TRAN_ID is the global transaction identifier.

전역 시스템은 각 지역 데이터베이스별로 개개의 접근 기록을 전술한 바와 같은 자료를 이용하여 다음과 같이 유지한다.The global system maintains individual access records for each regional database as follows using the data described above.

TYPE ACCESS = {TYPE, TIMEOUT, TRAN_ID}TYPE ACCESS = {TYPE, TIMEOUT, TRAN_ID}

TYPE LDB_ACCESS = ARRAY OF ACCESSESTYPE LDB_ACCESS = ARRAY OF ACCESSES

TYPE LDB = ARRAY OF LDBsTYPE LDB = ARRAY OF LDBs

시스템내의 전역 트랜잭션중 미리 정의된 시간을 초과하여 지역 데이터베이스로부터의 응답을 기다리고 있는 트랜잭션이 발견되면 전역 교착 상태를 검사하기 위해 잠재 대기 그래프를 생성한다.If a global transaction in the system finds a transaction waiting for a response from the local database for more than a predefined time, a latent wait graph is created to check for global deadlocks.

전역 시스템은 분산 교착 상태를 발견하기 위하여 전역 시스템에 연결되어 있는 지역 데이터베이스 수만큼의 원소를 갖는 고리(cycle)라는 배열을 이용한다. 고리(cycle)의 각 원소는 두 개의 필드로 구성되는데 해당 지역 데이터베이스에 접근한 전역 트랜잭션중 응답 시간을 초과하여 대기중인 트랜잭션이 있는 경우 '1'의 값을 가지는 플래그(flag) 필드와 해당 지역 데이터베이스에 접근한 전역 트랜잭션의 수(현재 접근중인 트랜잭션 및 이미 결과를 얻은 트랜잭션 포함)를 나타내는 카운트(count) 필드로 구성된다.The global system uses an array called cycles with as many elements as there are local databases connected to the global system to detect distributed deadlocks. Each element of the cycle consists of two fields: a flag field with a value of '1' and a local database if there are any pending transactions that exceed the response time among global transactions that access the local database. It consists of a count field that indicates the number of global transactions that have accessed, including those currently being accessed and transactions that have already returned results.

또한, 자료 구조에 저장된 정보를 바탕으로 고리(cycle) 배열로 만든다. 다음은 고리 배열을 생성하는 예를 나타낸다.It also creates a cycle array based on the information stored in the data structure. The following example shows how to create a ring array.

tran 1 : LDB0에 읽기 모드로 접근tran 1: accessing LDB0 in read mode

tran 1 : LDB2에 읽기 모드로 접근tran 1: accessing LDB2 in read mode

tran 2 : LDB1에 쓰기 모드로 접근tran 2: access write mode to LDB1

tran 2 : LDB3에 쓰기 모드로 접근tran 2: access write mode to LDB3

tran 1 : LDB1에 쓰기 모드로 접근tran 1: access write mode to LDB1

tran 2 : LDB0에 쓰기 모드로 접근tran 2: access write mode to LDB0

또한, 잠재 대기 그래프를 생성하는 시점에서 tran 1이 시간을 초과했다고 가정하면 이때 전역 교착 상태 발견을 위하여 생성되는 고리 배열은 다음과 같다.In addition, assuming that tran 1 has timed out at the time of generating the latent atmospheric graph, the ring arrangement generated for global deadlock detection is as follows.

cycle[0].flag = 1 cycle[0].count = 2 (LDB0)cycle [0] .flag = 1 cycle [0] .count = 2 (LDB0)

cycle[1].flag = 1 cycle[1].count = 2 (LDB1)cycle [1] .flag = 1 cycle [1] .count = 2 (LDB1)

cycle[2].flag = 1 cycle[2].count = 1 (LDB2)cycle [2] .flag = 1 cycle [2] .count = 1 (LDB2)

cycle[3].flag = 0 cycle[3].count = 1 (LDB3)cycle [3] .flag = 0 cycle [3] .count = 1 (LDB3)

이때, 플래그(flag)값이 '1'이고, 카운트(count)값이 '2'이상인 원소가 고리 배열중 두 개 이상 발견되면 이것은 잠재 대기 그래프에서 고리가 있을 가능성이 있다. 만약 발견된 고리내의 모든 트랜잭션이 읽기 모드로 지역 데이터베이스에 접근했다면 교착 상태가 아닌 것으로 간주한다. 그러나, 적어도 하나의 트랜잭션이 쓰기 모드로 지역 데이터베이스에 접근했다면 잠재적으로 교착 상태일 가능성이 있다고 생각하고 시간을 초과하여 기다리고 있는 트랜잭션을 철회함으로써 교착 상태를 해결한다. 전술한 바와 같은 예에서는 전체 고리 배열의 원소중 2개(cycle[0]와 cycle[1])가 시간 초과된 트랜잭션 tran1을 포함하고 있으며 그 수(count)가 2이상이므로 교착 상태로 간주한다. 다시 말하면, tran1과 tran2가 LDB0와 LDB1을 대상으로 잠재 대기 그래프에서 고리를 형성하고 있다는 것이다. 이때 전역 시스템은 시간 초과된 tran1을 철회함으로써 고리를 끊고 교착 상태를 해결한다. 이러한 방식으로 고리의 가능성을 판단하는 방식은 거짓 교착 상태 발견의 가능성은 있지만 기존의 방식에 비해 판단 알고리즘이 간단하고 시간이 적게 들어 전체적인 시스템의 성능을 향상시킨다.At this time, if a flag value is '1' and two or more elements in the ring array with a count value of '2' or more are found, there is a possibility that there are rings in the latent atmospheric graph. If all transactions in the found ring have accessed the local database in read mode, they are considered not deadlocked. However, if at least one transaction has accessed the local database in write mode, it is potentially deadlocked and resolves the deadlock by retracting the waiting transaction over time. In the example as described above, two of the elements of the entire ring array (cycle [0] and cycle [1]) contain the transaction tran1 which has timed out, and the count is 2 or more, so it is considered deadlock. In other words, tran1 and tran2 form rings in the latent atmospheric graph for LDB0 and LDB1. At this point, the global system breaks the loop and resolves the deadlock by retracting the timed Tran1. In this way, the possibility of loop detection is possible, but the decision algorithm is simpler and less time-consuming than the conventional method, which improves the performance of the overall system.

종래 고리 검색의 성능은 O(N+E)(C+1)인 반면 본 발명의 방법은 O(N)(단, 잠재 대기 그래프 작성후 고리 검색 단계만의 성능 비교임)이다. 여기서, N 는 트랜잭션의 수이고, E는 지역 데이터베이스의 수이며, C는 고리수이다.The performance of the conventional ring search is O (N + E) (C + 1) , whereas the method of the present invention is O (N) (where the performance comparison is only for the ring search step after plotting the latent atmospheric graph). Where N is the number of transactions, E is the number of local databases, and C is the number of rings.

기존 알고리즘은 거짓 교착 상태를 발견하지 않는다는 장점이 있지만 교착 상태를 발견하는데 걸리는 시간이 오래 걸리기 때문에 전체 시스템의 성능을 저하시키는 단점이 있고, 본 발명에서는 거짓 상태를 발견할 수도 있는 단점이 있으나 전체 시스템 성능면에서는 휠씬 뛰어난 장점이 있다.The existing algorithm has the advantage of not detecting false deadlocks, but it takes a long time to detect deadlocks, which deteriorates the performance of the whole system, and in the present invention, there is a disadvantage that a false state can be detected, but the whole system In terms of performance, it has a far superior advantage.

전술한 바와 같이 분산 교착 상태 식별은 잠재 대기 그래프가 정확한 정보를 가지고 작성되는 것이 아니므로 항상 거짓 교착 상태 식별 가능성은 존재한다. 시간 초과 방식을 이용한 경우 거짓 교착 상태 식별이 너무 빈번히 일어나는 단점이 있고, 잠재 대기 그래프 방식을 이용한 경우 거짓 교착 상태 발견 횟수는 줄어들지만 시스템의 성능을 현저히 저하시키는 단점이 있는 반면 이 두가지를 효율적으로 결합한 본 발명은 시스템 성능을 보장하면서 거짓 교착 상태 발견 횟수를 줄일 수 있다.As described above, there is always a possibility of false deadlock identification because distributed deadlock identification is not created with accurate information. False deadlock identification occurs too frequently when using the timeout method, and the potential wait graph method decreases the number of false deadlock detections, but reduces the performance of the system significantly. The present invention can reduce the number of false deadlock detections while ensuring system performance.

도 6a 및 도 6b 는 본 발명에 따른 분산 교착 상태 식별 방법의 일실시예 흐름도이다.6A and 6B are flowcharts of one embodiment of a distributed deadlock identification method according to the present invention.

도면에 도시된 바와 같이, 다중 데이터베이스 시스템에서 시간 초과된 트랜잭션이 존재하는지를 확인하여(601) 지역 데이터베이스 인덱스값(I)을 '1'로 설정하고, 읽기 전용 변수를 '1'로 설정한다(602).As shown in the figure, it is determined whether there is a timed out transaction in a multiple database system (601) and the local database index value I is set to '1' and the read-only variable is set to '1' (602). ).

이후, 지역 데이터베이스의 수가 'I'이상인지를 판단하여(603) 지역 데이터베이스의 수가 'I'이상이면 각 지역 데이터베이스의 접근 인덱스값(J)을 '1'로 설정하고, 'I'번째 지역 데이터베이스의 플래그를 '0'으로 설정하며, 'I'번째 지역 데이터베이스에 대한 접근수를 '0'으로 설정하고(604), 지역 데이터베이스의 수가 변수 'I'이상이 아니면 읽기 전용 변수가 '1'인지를 판단하는 과정부터 수행한다(617).Thereafter, it is determined whether the number of local databases is equal to or greater than 'I' (603). If the number of local databases is equal to or greater than 'I', the access index value J of each local database is set to '1', and the 'I'-th local database is determined. Is set to '0', the number of accesses to the 'I' local database is set to '0' (604), and if the number of local databases is not greater than or equal to the variable 'I', the read-only variable is '1'. Starting from the process of determining (617).

이후, 'I'번째 지역 데이터베이스에 대한 접근의 수가 'J'이상인지를 판단하여(605) 'J'이상이면 'I'번째 지역 데이터베이스에 접근한 트랜잭션의 수를 '1'증가시키고(606), 시간 초과된 트랜잭션 식별자가 'I'번째 지역 데이터베이스에 'J'번째로 접근한 트랜잭션 식별자인지를 판단하여(607) 'I'번째 지역 데이터베이스에 'J'번째로 접근한 트랜잭션 식별자가 아니면 'J'를 '1'증가시키며(608), 'I'번째 지역 데이터베이스에 대한 접근의 수가 'J'이상인지를 판단하는 과정부터 반복 수행하고(605), 'I'번째 지역 데이터베이스에 'J'번째로 접근한 트랜잭션 식별자이면 'J'를 '1'증가시키고, 'I'번째 지역 데이터베이스에 접근한 트랜잭션의 플래그를 '1'로 설정하며(609), 'I'번째 지역 데이터베이스에 대한 접근의 수가 'J'이상인지를 판단하는 과정부터 반복 수행한다(605).Then, it is determined whether the number of accesses to the 'I' local database is 'J' or more (605). If the number is 'J' or more, the number of transactions accessing the 'I' local database is increased to '1' (606). In operation 607, it is determined whether the timed out transaction identifier is the 'J'-th transaction identifier that accesses the' I 'local database. '1' to increase (608), and repeat the process of determining whether the number of accesses to the 'I'-th local database is' J 'or more (605), and' J 'to the' I'-th local database If it is a transaction identifier accessed by, increase 'J' to '1', set the flag of the transaction that accessed 'I' local database to '1' (609), and set the number of accesses to 'I' local database. The process of determining whether it is greater than or equal to 'J' is repeatedly performed (605).

한편, 'I'번째 지역 데이터베이스에 대한 접근의 수가 'J'이상인지를 판단하여(605) 'J'이상이 아니면 'I'번째 지역 데이터베이스의 플래그가 '1'인지를 판단하여(610) 'I'번째 지역 데이터베이스의 플래그가 '1'이면 'J'를 '1'로 설정하고(611), 'I'번째 지역 데이터베이스에 대한 접근 수가 'J'이상인지를 판단하여(612) 'J'이상이 아니면 'I'를 '1'증가시키며(613), 지역 데이터베이스의 수가 변수 'I'이상인지를 판단하는 과정부터 반복 수행한다(603).On the other hand, it is determined whether the number of accesses to the 'I'-th local database is greater than or equal to' J '(605), and if it is not' J 'or more, it is determined whether the flag of the' I'-th regional database is '1' (610) If the flag of the I'-th local database is' 1 ',' J 'is set to' 1 '(611), and it is determined whether the number of accesses to the' I'-th local database is' J 'or more (612). If not, increase 'I' by '1' (613), and repeat the process of determining whether the number of local databases is greater than or equal to the variable 'I' (603).

한편, 'I'번째 지역 데이터베이스에 대한 접근 수가 'J'이상인지를 판단하여(612) 'J'이상이면 'I'번째 지역 데이터베이스에 'J'번째로 접근한 유형이 쓰기인지를 판단하여(614) 유형이 쓰기가 아니면 'J'를 '1'증가시키고(615), 'I'번째 지역 데이터베이스에 대한 접근 수가 'J'이상인지를 판단하는 과정부터 반복 수행하며(612), 유형이 쓰기이면 읽기 전용 변수를 '0'으로 설정하고, 'J'를 '1' 증가시키며(616), 'I'번째 지역 데이터베이스에 대한 접근 수가 'J'이상인지를 판단하는 과정부터 반복 수행한다(612).On the other hand, it is determined whether the number of accesses to the 'I'-th local database is greater than or equal to' J '(612). 614) If the type is not write, increase 'J' by '1' (615), and repeat the process of determining whether the number of accesses to the 'I' local database is 'J' or more (612), and the write is In this case, the read-only variable is set to '0', 'J' is increased by '1' (616), and the process of determining whether the number of accesses to the 'I' local database is 'J' or more is repeated (612). ).

한편, 'I'번째 지역 데이터베이스의 플래그가 '1'인지를 판단하여(610) 'I'번째 지역 데이터베이스의 트랜잭션 플래그가 '1'이 아니면 읽기 전용 변수가 '1'인지를 판단하여(617) 읽기 전용 변수가 '1'이면 시간 초과된 트랜잭션의 타임스탬프를 현재 시간으로 변경시켜줌으로써 지역 데이터베이스로부터의 응답을 기다릴 수 있는 시간을 연장하고(618), 읽기 전용 변수가 '1'이 아니면 교착 상태에서의 관련 고리수(K)를 '1'로 설정하고, 'I'를 '1'로 설정한다(619).Meanwhile, it is determined whether the flag of the 'I'-th local database is' 1 '(610). If the transaction flag of the' I'-th local database is not '1', it is determined whether the read-only variable is '1' (617). If the read-only variable is '1', change the timestamp of the timed out transaction to the current time, extending the time to wait for a response from the local database (618), or deadlock if the read-only variable is not '1'. The related number of rings in K is set to '1' and 'I' is set to '1' (619).

이후, 지역 데이터베이스의 수가 'I'이상인지를 판단하여(620) 지역 데이터베이스의 수가 'I'이상이면 'I'번째 지역 데이터베이스에 접근한 트랜잭션의 플래그가 '1'이고, 'I'번째 지역 데이터베이스에 대한 접근수가 '2'이상인지를 판단하여(621) 플래그가 '1'이고, 트랜잭션의 수가 '2'이상이 아니면 'I'를 '1'증가시키며(622), 지역 데이터베이스의 수가 'I'이상인지를 판단하는 과정부터 반복 수행하고(620), 플래그가 '1'이고, 접근수가 '2'이상이면 'K'를 '1' 증가시키며(623), 'I'를 '1'증가시키고(622), 지역 데이터베이스의 수가 'I'이상인지를 판단하는 과정부터 반복 수행한다(620).Then, it is determined whether the number of local databases is greater than or equal to 'I' (620). If the number of local databases is greater than or equal to 'I', the flag of the transaction approaching the 'I' local database is '1' and the 'I' local database is determined. Determining if the number of accesses to '2' is greater than (621), if the flag is '1' and if the number of transactions is not '2', increasing 'I' to '1' (622) and the number of local databases is 'I' Repeat the process of determining whether it is abnormal (620), if the flag is '1', if the number of access is '2' or more, 'K' is increased by '1' (623), 'I' is increased by '1' In step 622, the process of determining whether the number of local databases is equal to or greater than 'I' is repeated (620).

한편, 지역 데이터베이스의 수가 'I'이상인지를 판단하여(620) 'I'이상이 아니면 'K'가 '2'이상인지를 판단하여(624) 'K'가 '2'이상이면 시간 초과된 트랜잭션을 철회함으로써 고리를 끊고(625), 'K'가 '2'이상이 아니면 시간 초과된 트랜잭션의 타임스탬프를 현재 시간으로 변경시켜줌으로써 지역 데이터베이스로부터의 응답을 기다릴 수 있는 시간을 연장시킨다(618).On the other hand, it is determined whether the number of local databases is greater than or equal to 'I' (620). Breaking the transaction by withdrawing the transaction (625) and extending the time to wait for a response from the local database by changing the timestamp of the timed transaction to the current time if 'K' is not greater than '2' (618). ).

상술한 바와 같은 본 발명의 방법은 프로그램으로 구현되어 컴퓨터로 읽을 수 있는 기록매체(씨디롬, 램, 롬, 플로피 디스크, 하드 디스크, 광자기 디스크 등)에 저장될 수 있다.The method of the present invention as described above may be implemented as a program and stored in a computer-readable recording medium (CD-ROM, RAM, ROM, floppy disk, hard disk, magneto-optical disk, etc.).

이상에서 설명한 본 발명은, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에 있어 본 발명의 기술적 사상을 벗어나지 않는 범위내에서 여러 가지 치환, 변형 및 변경이 가능하므로 전술한 실시예 및 첨부된 도면에 한정되는 것이 아니다.The present invention described above is capable of various substitutions, modifications, and changes without departing from the spirit of the present invention for those skilled in the art to which the present invention pertains, and the above-described embodiments and accompanying It is not limited to the drawing.

상기와 같은 본 발명은, 기존의 분산 교착 상태 해결 방식보다 거짓 교착 상태 발견 빈도를 더욱 낮추었으며 모든 가능한 분산 교착 상태를 식별할 수 있고, 독립적인 모듈로 구현 가능하므로 분산 트랜잭션 관리가 필요한 분산 데이터베이스 시스템, 분산 트랜잭션 모니터, 다중 데이터베이스 시스템 등에서 용이하며, 분산 교착 상태 식별 및 해결 모듈이 전역 데이터베이스의 자체 대기 그래프(wait-for-graph : WFG) 방식를 통한 내부 교착 상태 식별 모듈과 독립적으로 작동함으로써 유지보수가 용이하고 쉽게 확장할 수 있으며, 이식성이 높은 장점을 가지고, 시간 초과 방식과 잠재 대기 그래프 방식을 적절하게 조화시킴으로써 성능과 정확성을 제공할 수 있는 효과가 있다.As described above, the present invention has lowered the frequency of false deadlock detection and can identify all possible distributed deadlocks and can be implemented as an independent module. , Distributed transaction monitors, multiple database systems, etc. The distributed deadlock identification and resolution module operates independently of the internal deadlock identification module via its own wait-for-graph (WFG) approach to the global database for maintenance. It has the advantage of being easily and easily scalable, highly portable, and offering the right combination of timeout and latent atmospheric graphing to provide performance and accuracy.

Claims (5)

다중 데이터베이스 시스템에 적용되는 분산 교착 상태 식별 방법에 있어서,In the distributed deadlock identification method applied to multiple database systems, 시간 초과된 트랜잭션이 존재하는지를 확인하여 지역 데이터베이스의 인덱스값(I)을 초기화하고, 읽기 전용 변수를 참으로 설정하는 제 1 단계;Checking whether there is a timed out transaction, initializing an index value I of a local database, and setting a read-only variable to true; 상기 지역 데이터베이스의 수가 상기 지역 데이터베이스의 인덱스값이상인지를 확인하여 각 지역 데이터베이스의 접근 인덱스값(J)을 초기화하고, I번째(현재 설정된 지역 데이터베이스의 인덱스값의 순서임) 지역 데이터베이스에 대한 접근수를 초기화하는 제 2 단계;The number of accesses to the local database is initialized by checking whether the number of the local databases is equal to or larger than the index value of the local database, and initializing the access index value J of each local database. Initiating a second step; 상기 I번째 지역 데이터베이스의 접근수가 'J'이상이면 상기 I번째 지역 데이터베이스에 대한 접근수를 소정의 제 1 수만큼 증가시키고, 'J'를 소정의 제 1 수만큼 증가시키며, 상기 I번째 데이터베이스의 플래그를 참으로 설정하는 제 3 단계;If the number of accesses of the I-th local database is greater than or equal to 'J', the number of accesses to the I-th local database is increased by a predetermined first number, 'J' is increased by a predetermined first number, and the number of accesses of the I-th database is increased. A third step of setting the flag to true; 상기 I번째 지역 데이터베이스의 접근수가 'J'이상이 아니면 상기 'I'번째 지역 데이터베이스의 플래그가 참인지를 확인하여 플래그가 참이면 'J'를 초기화하고, 읽기 전용 변수를 지정하며, 플래그가 참이 아니면 접근한 모든 트랜잭션이 읽기 모드인지를 판단하는 제 4 단계;If the number of accesses of the I local database is not greater than 'J', check whether the flag of the 'I' local database is true, and if the flag is true, initialize 'J', specify a read-only variable, and set the flag to true. Otherwise, determining whether all accessed transactions are in read mode; 상기 제 4 단계에서 접근한 모든 트랜잭션이 읽기 모드이면 지역 데이터베이스로부터의 응답을 기다릴 수 있는 시간을 연장하는 제 5 단계; 및A fifth step of extending a time for waiting for a response from a local database if all transactions accessed in the fourth step are in a read mode; And 상기 제 4 단계에서 접근한 모든 트랜잭션이 읽기 모드가 아니면 상기 지역데이터베이스의 플래그 및 상기 지역 데이터베이스에 대한 접근수를 확인하여 시간 초과된 트랜잭션을 철회하는 제 6 단계A sixth step of retracting the timed out transaction by checking a flag of the local database and the number of accesses to the local database if all transactions accessed in the fourth step are not in the read mode; 를 포함하는 다중 데이터베이스 시스템에서의 분산 교착 상태 식별 방법.Distributed deadlock identification method in a multiple database system comprising a. 제 1 항에 있어서, 상기 제 3 단계는,The method of claim 1, wherein the third step, 상기 I번째 지역 데이터베이스에 대한 접근수를 소정의 제 1 수만큼 증가시키고, 시간 초과된 트랜잭션 식별자가 상기 I번째 지역 데이터베이스에 J번째(현재 설정된 각 지역 데이터베이스의 접근 인덱스 값의 순서임)로 접근한 트랜잭션 식별자인지를 판단하는 제 7 단계;The number of accesses to the I-th local database is increased by a predetermined first number, and the timed transaction identifier approaches the I-th local database in the J-th order (the order of access index values of each currently set local database). Determining a seventh transaction identifier; 상기 제 7 단계에서 시간 초과된 트랜잭션 식별자가 상기 I번째 지역 데이터베이스에 J번째로 접근한 트랜잭션 식별자가 아니면 'J'를 소정의 제 1 수만큼 증가시키고, 상기 I번째 지역 데이터베이스의 접근수가 'J'이상인지를 판단하여 제 3 단계 또는 제 4단계부터 반복 수행하는 제 8 단계; 및If the transaction identifier timed out in the seventh step is not the transaction identifier that accesses the I-th local database the J th time, 'J' is increased by a predetermined first number, and the number of accesses of the I-th local database is 'J' An eighth step of determining whether the error is abnormal and repeatedly performing the third or fourth step; And 상기 제 7 단계에서 시간 초과된 트랜잭션 식별자가 상기 I번째 지역 데이터베이스에 J번째로 접근한 트랜잭션 식별자이면 'J'를 소정의 제 1 수만큼 증가시키고, 상기 I번째 지역 데이터베이스의 플래그를 참으로 설정하며, 상기 I번째 지역 데이터베이스의 접근수가 'J'이상인지를 판단하여 상기 제 3 단계 또는 제 4 단계부터 반복 수행하는 제 9 단계If the transaction identifier timed out in the seventh step is the transaction identifier that accessed the J-th local database for the first time, 'J' is increased by a predetermined first number, and the flag of the I-th local database is set to true. A ninth step of determining whether the number of accesses of the I-th local database is greater than or equal to 'J' and repeating the operation from the third step or the fourth step; 를 포함하는 다중 데이터베이스 시스템에서의 분산 교착 상태 식별 방법.Distributed deadlock identification method in a multiple database system comprising a. 제 1 항에 있어서, 상기 제 4 단계는,The method of claim 1, wherein the fourth step, 상기 I번째 지역 데이터베이스의 플래그가 참인지를 판단하는 제 7 단계;A seventh step of determining whether the flag of the I-th local database is true; 상기 제 7 단계에서 플래그가 참이면 'J'를 초기화하고, 상기 I번째 지역 데이터베이스에 대한 접근수가 'J'이상인지를 판단하는 제 8 단계;An eighth step of initializing 'J' if the flag is true in the seventh step and determining whether the number of accesses to the I-th local database is greater than or equal to 'J'; 상기 제 8 단계에서 접근수가 'J'이상이 아니면 'I'를 소정의 제 1 수만큼 증가시키고 상기 제 2 단계부터 반복 수행하는 제 9 단계;A ninth step of incrementing 'I' by a predetermined first number if the number of accesses is not greater than 'J' in the eighth step and repeating the operation from the second step; 상기 제 8 단계에서 접근수가 'J'이상이면 상기 'I'번째 지역 데이터베이스에 'J'번째로 접근한 유형이 쓰기인지를 판단하는 제 10 단계;A tenth step of determining whether the 'J'-th access type to the' I'-th local database is a write when the number of accesses is 'J' or more in the eighth step; 상기 제 10 단계에서 접근한 유형이 쓰기이면 읽기 전용 변수를 초기화시키고, 'J'를 소정의 제 1 수만큼 증가시키며 상기 제 8 단계의 판단 과정부터 반복 수행하는 제 11 단계;An eleventh step of initializing a read-only variable if the type accessed in the tenth step is a write, increasing 'J' by a predetermined first number, and repeatedly performing the determination process of the eighth step; 상기 제 10 단계에서 접근한 유형이 쓰기가 아니면 'J'를 소정의 제 1 수만큼 증가시키고, 상기 제 8 단계의 판단 과정부터 반복 수행하는 제 12 단계; 및A twelfth step of incrementing 'J' by a predetermined first number if the type approached in the tenth step is not a write, and repeatedly performing the determination process of the eighth step; And 상기 제 7 단계에서 플래그가 참이 아니면 접근한 모든 트랜잭션이 읽기 모드인지를 판단하는 제 13 단계A thirteenth step of determining whether all accessed transactions are in a read mode when the flag is not true in the seventh step; 를 포함하는 다중 데이터베이스 시스템에서의 분산 교착 상태 식별 방법.Distributed deadlock identification method in a multiple database system comprising a. 제 1 항에 있어서, 상기 제 6 단계는,The method of claim 1, wherein the sixth step is 교착 상태에서의 관련 고리수(K) 및 상기 지역 데이터베이스의 인덱스값(I)를 초기화하고, 상기 지역 데이터베이스의 수가 'I'이상인지를 판단하는 제 7 단계;A seventh step of initializing the relevant number of rings K in the deadlock state and the index value I of the local database, and determining whether the number of the local databases is equal to or greater than 'I'; 상기 제 7 단계에서 상기 지역 데이터베이스의 수가 'I'이상이 아니면 'K'가 소정의 제 2 수이상인지를 판단하는 제 8 단계;An eighth step of determining whether 'K' is a predetermined second number or more when the number of the local databases is not 'I' or more in the seventh step; 상기 제 8 단계에서 'K'가 소정의 제 2 수이상이 아니면 상기 지역 데이터베이스로부터의 응답을 기다릴 수 있는 시간을 연장시키는 제 9 단계;A ninth step of extending the time for waiting for a response from the local database if 'K' is not more than a predetermined second number in the eighth step; 상기 제 8 단계에서 'K'가 소정의 제 2 수이상이면 시간 초과된 트랜잭션을 철회하여 고리를 끊는 제 10 단계;A tenth step of canceling the loop by withdrawing the timed out transaction if 'K' is equal to or greater than a predetermined second number in the eighth step; 상기 제 7 단계에서 상기 지역 데이터베이스의 수가 'I'이상이면 상기 I번째 지역 데이터베이스의 플래그가 참이고, 상기 I번째 지역 데이터베이스에 대한 접근수가 소정의 제 2 수이상인지를 판단하는 제 11 단계;An eleventh step of determining whether a flag of the I th local database is true and the number of accesses to the I th local database is greater than or equal to a predetermined second number when the number of the local databases is 'I' or more in the seventh step; 상기 제 11 단계에서 플래그가 참이고, 접근수가 소정의 제 2 수이상이면 'K'를 소정의 제 1 수만큼 증가시키며, 'I'를 소정의 제 1 수만큼 증가시키고, 상기 10 단계부터 반복 수행하는 제 12 단계; 및If the flag is true in the eleventh step and the number of accesses is greater than or equal to the predetermined second number, 'K' is increased by the predetermined first number, 'I' is increased by the predetermined first number, and the above steps are repeated. Performing a twelfth step; And 상기 제 11 단계에서 플래그가 참이고, 접근수가 소정의 제 2 수이상이 아니면 'I'를 소정의 제 1 수만큼 증가시키며, 상기 제 7 단계부터 반복 수행하는 제 13 단계If the flag is true in the eleventh step and the number of accesses is not greater than or equal to the predetermined second number, the thirteenth step of increasing 'I' by the predetermined first number and repeating the operation from the seventh step; 를 포함하는 다중 데이터베이스 시스템에서의 분산 교착 상태 식별 방법.Distributed deadlock identification method in a multiple database system comprising a. 대용량 프로세서를 구비한 다중 데이터베이스 시스템에,In a multiple database system with a large processor, 시간 초과된 트랜잭션이 존재하는지를 확인하여 지역 데이터베이스의 인덱스값(I)을 초기화하고, 읽기 전용 변수를 참으로 설정하는 제 1 기능;A first function of checking whether a timed out transaction exists, initializing an index value I of a local database, and setting a read-only variable to true; 상기 지역 데이터베이스의 수가 상기 지역 데이터베이스의 인덱스이상인지를 확인하여 각 지역 데이터베이스의 접근 인덱스값(J)을 초기화하고, I번째 지역 데이터베이스에 대한 접근수를 초기화하는 제 2 기능;A second function of checking whether the number of the local databases is equal to or larger than the index of the local database, initializing the access index value J of each local database, and initializing the number of accesses to the I-th local database; 상기 I번째 지역 데이터베이스의 접근수가 'J'이상이면 상기 I번째 지역 데이터베이스에 대한 접근수를 소정의 제 1 수만큼 증가시키고, 'J'를 소정의 제 1 수만큼 증가시키며, 상기 I번째 데이터베이스의 플래그를 참으로 설정하는 제 3 기능;If the number of accesses of the I-th local database is greater than or equal to 'J', the number of accesses to the I-th local database is increased by a predetermined first number, 'J' is increased by a predetermined first number, and the number of accesses of the I-th database is increased. A third function of setting the flag to true; 상기 I번째 지역 데이터베이스의 접근수가 'J'이상이 아니면 상기 'I'번째 지역 데이터베이스의 플래그가 참인지를 확인하여 플래그가 참이면 'J'를 초기화하고, 읽기 전용 변수를 지정하며, 플래그가 참이 아니면 접근한 모든 트랜잭션이 읽기 모드인지를 판단하는 제 4 기능;If the number of accesses of the I local database is not greater than 'J', check whether the flag of the 'I' local database is true, and if the flag is true, initialize 'J', specify a read-only variable, and set the flag to true. Otherwise, a fourth function of determining whether all accessed transactions are in read mode; 상기 제 4 기능에서 접근한 모든 트랜잭션이 읽기 모드이면 지역 데이터베이스로부터의 응답을 기다릴 수 있는 시간을 연장하는 제 5 기능; 및A fifth function of extending a time for waiting for a response from a local database if all transactions accessed in the fourth function are in a read mode; And 상기 제 4 기능에서 접근한 모든 트랜잭션이 읽기 모드가 아니면 상기 지역 데이터베이스의 플래그 및 상기 지역 데이터베이스에 대한 접근수를 확인하여 시간 초과된 트랜잭션을 철회하는 제 6 기능A sixth function for checking a flag of the local database and the number of accesses to the local database if the transaction accessed in the fourth function is not in the read mode, and withdrawing the timed out transaction; 을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.A computer-readable recording medium having recorded thereon a program for realizing this.
KR1019980039718A 1998-09-24 1998-09-24 Method for identifying discreted deadlock conditions on the multiple database system KR100309787B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019980039718A KR100309787B1 (en) 1998-09-24 1998-09-24 Method for identifying discreted deadlock conditions on the multiple database system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019980039718A KR100309787B1 (en) 1998-09-24 1998-09-24 Method for identifying discreted deadlock conditions on the multiple database system

Publications (2)

Publication Number Publication Date
KR20000020905A KR20000020905A (en) 2000-04-15
KR100309787B1 true KR100309787B1 (en) 2001-11-17

Family

ID=19551813

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019980039718A KR100309787B1 (en) 1998-09-24 1998-09-24 Method for identifying discreted deadlock conditions on the multiple database system

Country Status (1)

Country Link
KR (1) KR100309787B1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08137707A (en) * 1994-11-04 1996-05-31 Fujitsu Ltd Distributed transaction processing system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08137707A (en) * 1994-11-04 1996-05-31 Fujitsu Ltd Distributed transaction processing system

Also Published As

Publication number Publication date
KR20000020905A (en) 2000-04-15

Similar Documents

Publication Publication Date Title
US8396831B2 (en) Optimistic serializable snapshot isolation
US8286182B2 (en) Method and system for deadlock detection in a distributed environment
JP4586019B2 (en) Parallel recovery with non-failing nodes
US6879981B2 (en) Sharing live data with a non cooperative DBMS
US8185880B2 (en) Optimizing heap memory usage
CA2027934C (en) Accelerated deadlock detection in congested data transactions
US5845274A (en) Computer program product for avoiding complete index tree traversals in sequential and almost sequential index probes
CN102222015B (en) Detect the method and system of the deadlock in multithread programs
US8103638B2 (en) Partitioning of contended synchronization objects
US7634496B1 (en) Techniques for managing state changes of a data storage system utilizing the object oriented paradigm
KR20070031209A (en) System and method for a snapshot query during database recovery
US8005860B1 (en) Object-level database performance management
US7958149B2 (en) Computer program and product for append mode insertion of rows into tables in database management systems
US6816874B1 (en) Method, system, and program for accessing performance data
US6571250B1 (en) Method and system for processing queries in a data processing system using index
KR100309787B1 (en) Method for identifying discreted deadlock conditions on the multiple database system
US8051055B1 (en) Tracking table and index partition usage in a database
Noll et al. Analyzing memory accesses with modern processors
US8103685B1 (en) Methods and apparatus for capturing last discovery time of managed objects
US20230205759A1 (en) Managing a transaction isolation
US7536677B2 (en) Method, system, and product for determining defect detection efficiency
US7814095B2 (en) Optimizing the navigation of one-to-one and one-to-many relationships using query batching in named transactions
KR100317229B1 (en) Mutual Exclusion of Locked Standby Information for Deadlock Detection
KR100253627B1 (en) Transaction control method not to be selected as deadlock sacrificer in transaction abortion in a data storage system
US7185006B2 (en) Method and apparatus for reducing the scope of queries that seek information from networked computers

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: 20120904

Year of fee payment: 12

FPAY Annual fee payment

Payment date: 20130904

Year of fee payment: 13

FPAY Annual fee payment

Payment date: 20140902

Year of fee payment: 14

FPAY Annual fee payment

Payment date: 20150908

Year of fee payment: 15

LAPS Lapse due to unpaid annual fee