KR102007117B1 - Method and system for processing transaction - Google Patents

Method and system for processing transaction Download PDF

Info

Publication number
KR102007117B1
KR102007117B1 KR1020180006959A KR20180006959A KR102007117B1 KR 102007117 B1 KR102007117 B1 KR 102007117B1 KR 1020180006959 A KR1020180006959 A KR 1020180006959A KR 20180006959 A KR20180006959 A KR 20180006959A KR 102007117 B1 KR102007117 B1 KR 102007117B1
Authority
KR
South Korea
Prior art keywords
transaction
processing
stm
transaction processing
htm
Prior art date
Application number
KR1020180006959A
Other languages
Korean (ko)
Other versions
KR20190088641A (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 KR1020180006959A priority Critical patent/KR102007117B1/en
Publication of KR20190088641A publication Critical patent/KR20190088641A/en
Application granted granted Critical
Publication of KR102007117B1 publication Critical patent/KR102007117B1/en

Links

Images

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
    • G06F9/467Transactional memory
    • 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/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/526Mutual exclusion algorithms

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)

Abstract

트랜잭션 처리 방법 및 트랜잭션 처리 시스템이 개시된다. 본 발명의 일실시예에 따른 트랜잭션 처리 방법은, 이전에 처리된 이전 트랜잭션에 관한 트랜잭션 정보를 기반으로, 개시 명령된 트랜잭션에 대한 크기, 컨텐션(contention) 정도 및 연속 발생된 쓰기(write) 횟수 중 적어도 하나의 특성을 분석하는 단계와, HTM(Hardware Transactional Memory)을 제외한, RH-STM, NOrec STM 및 싱글 글로벌 락(Single Global Lock)을 포함하는 트랜잭션 처리 기법 중에서, 상기 특성에 부합하는 어느 하나의 제1 트랜잭션 처리 기법을 선정하는 단계, 및 선정된 상기 제1 트랜잭션 처리 기법에 기초하여, 상기 트랜잭션을 처리하는 단계를 포함한다.A transaction processing method and a transaction processing system are disclosed. Transaction processing method according to an embodiment of the present invention, based on the transaction information about the previous transaction processed previously, the size, contention (contention) and the number of consecutive writes for the start commanded transaction Analyzing at least one of the following characteristics; and transaction processing techniques including RH-STM, NOrec STM, and Single Global Lock, excluding HTM (Hardware Transactional Memory). Selecting a first transaction processing technique of, and processing the transaction, based on the selected first transaction processing technique.

Description

트랜잭션 처리 방법 및 트랜잭션 처리 시스템{METHOD AND SYSTEM FOR PROCESSING TRANSACTION}Transaction processing method and transaction processing system {METHOD AND SYSTEM FOR PROCESSING TRANSACTION}

본 발명은, 멀티 코어 환경에서 하이브리드 트랜잭셔널 메모리(Hybrid TM, HyTM) 기반의 트랜잭션 처리 기술에 관한 것으로, 트랜잭션의 특성(길이 및 contention 정도)을 고려한 적응적인 하이브리드 트랜잭셔널 메모리 기법을 통해, 트랜잭션 처리 성능을 보다 향상시키기 위한 트랜잭션 처리 방법 및 트랜잭션 처리 시스템에 관한 것이다.The present invention relates to a hybrid transactional memory (HybridTM, HyTM) based transaction processing technology in a multi-core environment, and through an adaptive hybrid transactional memory technique that takes into account the characteristics (length and degree of contention) of a transaction, A transaction processing method and a transaction processing system for further improving transaction processing performance.

하드웨어 트랜잭셔널 메모리(Hardware Transactional Memory: HTM) 기법이란, 전통적인 병렬 프로그래밍 기법인 락(Lock)을 사용하는 대신, 일련의 코드 블록을 트랜잭션으로서 설정하여 하드웨어를 이용하여 트랜잭션을 처리하는 기법을 지칭할 수 있다.The Hardware Transactional Memory (HTM) technique refers to a technique for processing a transaction using hardware by setting a series of code blocks as a transaction instead of using a lock, which is a traditional parallel programming technique. Can be.

하지만 이러한 HTM 기법은 하드웨어와 CPU 자원을 공유하고 있어 트랜잭션의 처리를 완벽하게 보장하지는 못하는 문제를 가질 수 있다. 이 때문에, HTM을 이용해 처리하지 못하는 트랜잭션에 대해, 폴백 경로(fall-back path)를 마련하여, 소프트웨어 트랜잭셔널 메모리(Software Transactional Memory: STM)을 이용해 처리하는 하이브리드 트랜잭셔널 메모리(Hybrid Transactional Memory: HyTM) 기법에 관해 연구가 이루어지고 있다.However, this HTM technique shares hardware and CPU resources, which may not guarantee the processing of transactions. For this reason, a hybrid transactional memory that prepares a fall-back path for a transaction that cannot be processed using HTM and processes it using software transactional memory (STM). : HyTM) is being studied.

일례로, HTM과 STM 간의 동시성 제어에 필요한 메타 데이터를 최소한으로 사용 함으로써 동시성 제어로 인한 HTM의 성능 저하 정도를 낮추어 트랜잭션의 처리 성능을 높이는 연구가 제안되고 있으나, 이 연구에서는 STM에 대한 폴백 경로를 제공하지는 못하기 때문에 반복적인 충돌을 해결하기 어려우며 지속적인 스레드 대기 상태의 원인이 되는 문제를 가질 수 있다.For example, a study of improving transaction processing performance by reducing the performance degradation of HTM due to concurrency control by using minimal metadata required for concurrency control between HTM and STM has been proposed, but in this study, a fallback path for STM is proposed. Since it is not provided, it is difficult to resolve repetitive conflicts and may have problems causing continuous thread waits.

다른 일례로, HTM에서 사용하는 캐시 일관성 프로토콜 정책을 기반하여 STM 내부의 일부분을 HTM으로 처리 함으로써, 동시성 제어를 위한 기법을 필요로 하지 않으므로 STM의 처리 성능 향상을 극대화 한 연구가 제안되고 있으나, 이 연구에서는 동시성 제어 기법이 존재하지 않기 때문에 STM 내의 HTM으로 처리되지 못한 나머지 부분(예를 들어, HTM으로 처리할 수 없는 크기의 트랜잭션)의 경우, 모든 스레드를 대기 상태로 전환한 후에 처리해야 하는 문제점을 가질 수 있다.As another example, since a part of the STM is processed by the HTM based on the cache coherence protocol policy used by the HTM, a study for maximizing the processing performance of the STM is proposed, because a technique for concurrency control is not required. In the study, there is no concurrency control technique, so the rest of the STM that cannot be handled by the HTM (for example, a transaction of a size that cannot be handled by the HTM) must be processed after all threads have been put to wait. May have

이에 따라, 상술한 문제점을 해결하기 위해, HTM으로 처리되지 못하는 트랜잭션에 대해, 해당 트랜잭션의 특성에 최적화된 트랜잭션 처리 기법으로의 폴백 경로를 제공하여 트랜잭션의 처리 성능을 높일 수 있는 적응적인 하이브리드 트랜잭셔널 메모리 기법이 요구되고 있다.Accordingly, in order to solve the above-mentioned problem, an adaptive hybrid transaction that provides a fallback path to a transaction processing technique optimized for the characteristics of the transaction for a transaction that cannot be processed by the HTM can increase the processing performance of the transaction. National memory techniques are required.

본 발명의 실시예는 이전 트랜잭션의 처리 결과 정보를 폴백 경로 테이블에 저장하고 분석을 통해 트랜잭션의 길이 및 컨텐션(contention) 정도를 파악하여, 현재 수행되는 트랜잭션의 특성에 맞는 폴백 경로(Fall-back path)를 제공 함으로써 각 워크로드의 특성을 반영한 최적의 트랜잭션 처리 기법을 제공하는 것을 목적으로 한다.The embodiment of the present invention stores the processing result information of the previous transaction in the fallback path table and analyzes the length of the transaction and the degree of contention through analysis, thereby determining the fallback path suitable for the characteristics of the currently executed transaction. It is aimed to provide an optimal transaction processing technique that reflects the characteristics of each workload by providing a path).

또한, 본 발명의 실시예는 글로벌 클락(global clock) 및 락(Lock) 기반의 효율적인 동시성 제어 기법을 통해, 멀티 코어 환경에서 서로 다른 스레드 사이에서 Lite HTM, RH-STM, NOrec-STM 및 싱글 글로벌 락과 같은 각 트랜잭션 처리 기법이 동시에 수행될 수 있도록 제어하여, 트랜잭션의 처리 성능을 향상시키는 것을 목적으로 한다.In addition, an embodiment of the present invention provides a global clock and lock-based efficient concurrency control scheme, enabling Lite HTM, RH-STM, NOrec-STM and single global among different threads in a multi-core environment. It aims to improve transaction processing performance by controlling each transaction processing technique such as a lock to be executed at the same time.

본 발명의 일실시예에 따른 트랜잭션 처리 방법은, 이전에 처리된 이전 트랜잭션에 관한 트랜잭션 정보를 기반으로, 개시 명령된 트랜잭션에 대한 크기, 컨텐션(contention) 정도 및 연속 발생된 쓰기(write) 횟수 중 적어도 하나의 특성을 분석하는 단계와, HTM(Hardware Transactional Memory)을 제외한, RH-STM, NOrec STM 및 싱글 글로벌 락(Single Global Lock)을 포함하는 트랜잭션 처리 기법 중에서, 상기 특성에 부합하는 어느 하나의 제1 트랜잭션 처리 기법을 선정하는 단계, 및 선정된 상기 제1 트랜잭션 처리 기법에 기초하여, 상기 트랜잭션을 처리하는 단계를 포함한다.Transaction processing method according to an embodiment of the present invention, based on the transaction information about the previous transaction processed previously, the size, contention (contention) and the number of consecutive writes for the start commanded transaction Analyzing at least one of the following characteristics; and transaction processing techniques including RH-STM, NOrec STM, and Single Global Lock, excluding HTM (Hardware Transactional Memory). Selecting a first transaction processing technique of, and processing the transaction, based on the selected first transaction processing technique.

또한, 본 발명의 일실시예에 따른 트랜잭션 처리 시스템은, 이전에 처리된 이전 트랜잭션에 관한 트랜잭션 정보를 기반으로, 개시 명령된 트랜잭션에 대한 크기, 컨텐션 정도 및 연속 발생된 쓰기 횟수 중 적어도 하나의 특성을 분석하는 분석부, HTM을 제외한, RH-STM, NOrec STM 및 싱글 글로벌 락을 포함하는 트랜잭션 처리 기법 중에서, 상기 특성에 부합하는 어느 하나의 제1 트랜잭션 처리 기법을 선정하는 선정부, 및 선정된 상기 제1 트랜잭션 처리 기법에 기초하여, 상기 트랜잭션을 처리하는 처리부를 포함한다.In addition, the transaction processing system according to an embodiment of the present invention, based on the transaction information about the previous transaction processed previously, at least one of the size, contention degree and the number of consecutive writes for the start commanded transaction; An analysis unit for analyzing the characteristics, a selection unit for selecting any one of the first transaction processing technique that meets the characteristics among the transaction processing techniques including RH-STM, NOrec STM and a single global lock, excluding HTM, and And a processing unit for processing the transaction based on the first transaction processing technique.

본 발명의 일실시예에 따르면, Lite HTM에서 우선적으로 트랜잭션 처리를 수행하고, Lite HTM으로 처리할 수 없는 트랜잭션에 대해, 길이 및 컨텐션 정도와 같은 특성 분석에 기반하여, RH-STM, NOrec-STM, 싱글 글로벌 락(Single Global Lock) 중 어느 하나의 최적한 트랜잭션 처리 기법에 따라 처리 함으로써, 트랜잭션 처리 성능을 높일 수 있다.According to an embodiment of the present invention, the transaction processing in the Lite HTM is performed preferentially, and for transactions that cannot be processed by the Lite HTM, RH-STM and NOrec- are based on characteristics such as length and contention. Transaction processing performance can be improved by processing according to the optimal transaction processing technique of either STM or Single Global Lock.

또한, 본 발명의 일실시예에 따르면, 이전 트랜잭션의 처리 결과 정보를 폴백 경로 테이블에 저장하고, 분석을 통해 트랜잭션 길이 및 컨텐션 정도를 파악하여, 현재 수행되는 트랜잭션의 특성에 맞는 최적의 폴백 경로를 제공 함으로써, 트랜잭션의 특성에 기반한 적응적인 하이브리드 트랜잭셔널 메모리 시스템을 제공할 수 있다.In addition, according to an embodiment of the present invention, by storing the processing result information of the previous transaction in the fallback path table, and by analyzing the transaction length and contention through the analysis, the optimal fallback path suitable for the characteristics of the current transaction By providing, an adaptive hybrid transactional memory system based on the characteristics of a transaction can be provided.

또한, 본 발명의 일실시예에 따르면, 글로벌 클락(global clock) 및 락(Lock) 기반의 효율적인 동시성 제어 기법을 통해, 멀티 코어 환경에서 서로 다른 스레드 사이에서 Lite HTM, RH-STM, NOrec-STM 및 싱글 글로벌 락과 같은 각 트랜잭션 처리 기법이 동시에 수행될 수 있도록 제어하여, 트랜잭션의 처리 성능을 향상시킬 수 있다.In addition, according to an embodiment of the present invention, through the global clock and lock-based efficient concurrency control scheme, Lite HTM, RH-STM, NOrec-STM between different threads in a multi-core environment And controlling each transaction processing technique such as a single global lock to be executed at the same time, thereby improving transaction processing performance.

도 1은 본 발명의 일실시예에 따른 트랜잭션 처리 시스템의 내부 구성을 도시한 블록도이다.
도 2는 본 발명의 일실시예에 따른 트랜잭션 처리 시스템의 전체 구조를 도시한 개념도이다.
도 3은 본 발명의 일실시예에 따른 트랜잭션 처리 시스템에서, 트랜잭션을 처리하는 전체 흐름을 도시한 도면이다.
도 4는 본 발명의 일실시예에 따른 트랜잭션 처리 시스템에서, 폴백 패스 테이블의 일례를 도시한 도면이다.
도 5는 본 발명의 일실시예에 따른 트랜잭션 처리 시스템에서, 폴백 패스의 전이 오토마타(transition automata)를 도시한 도면이다.
도 6은 본 발명의 일실시예에 따른 트랜잭션 처리 시스템에서, 멀티 코어 환경에서의 HTM 및 STM 간의 동시성 제어 기법을 설명하기 위한 도면이다.
도 7은 본 발명의 일실시예에 따른 트랜잭션 처리 시스템에서, 동시성 제어 기법을 적용한 HTM 알고리즘의 일례를 도시한 도면이다.
도 8은 본 발명의 일실시예에 따른 트랜잭션 처리 시스템에서, 동시성 제어 기법을 적용한 싱글 글로벌 락(SGL) 알고리즘의 일례를 도시한 도면이다.
도 9는 본 발명의 일실시예에 따른 트랜잭션 처리 시스템에서, 동시성 제어 기법을 적용한 RH-STM 알고리즘의 일례를 도시한 도면이다.
도 10은 본 발명의 일실시예에 따른 트랜잭션 처리 시스템에서, 동시성 제어 기법을 적용한 NOrec-STM 알고리즘의 일례를 도시한 도면이다.
도 11은 본 발명의 일실시예에 따른 트랜잭션 처리 방법의 순서를 도시한 흐름도이다.
1 is a block diagram showing the internal configuration of a transaction processing system according to an embodiment of the present invention.
2 is a conceptual diagram showing the overall structure of a transaction processing system according to an embodiment of the present invention.
3 is a diagram illustrating the overall flow of processing a transaction in a transaction processing system according to an embodiment of the present invention.
4 is a diagram illustrating an example of a fallback pass table in a transaction processing system according to an embodiment of the present invention.
FIG. 5 is a diagram illustrating a transition automata of a fallback pass in a transaction processing system according to an embodiment of the present invention.
FIG. 6 is a diagram illustrating a concurrency control technique between an HTM and an STM in a multi-core environment in a transaction processing system according to an embodiment of the present invention.
7 is a diagram illustrating an example of an HTM algorithm to which a concurrency control technique is applied in a transaction processing system according to an embodiment of the present invention.
8 is a diagram illustrating an example of a single global lock (SGL) algorithm to which a concurrency control technique is applied in a transaction processing system according to an embodiment of the present invention.
9 is a diagram illustrating an example of an RH-STM algorithm to which a concurrency control technique is applied in a transaction processing system according to an embodiment of the present invention.
FIG. 10 is a diagram illustrating an example of a NOrec-STM algorithm to which a concurrency control technique is applied in a transaction processing system according to an embodiment of the present invention.
11 is a flowchart illustrating a procedure of a transaction processing method according to an embodiment of the present invention.

이하, 첨부된 도면들을 참조하여 본 발명의 일실시예에 따른 응용프로그램 업데이트 장치 및 방법에 대해 상세히 설명한다. 그러나, 본 발명이 실시예들에 의해 제한되거나 한정되는 것은 아니다. 각 도면에 제시된 동일한 참조 부호는 동일한 부재를 나타낸다.Hereinafter, an apparatus and method for updating an application program according to an embodiment of the present invention will be described in detail with reference to the accompanying drawings. However, the present invention is not limited to or limited by the embodiments. Like reference symbols in the drawings denote like elements.

도 1은 본 발명의 일실시예에 따른 트랜잭션 처리 시스템의 내부 구성을 도시한 블록도이다.1 is a block diagram showing the internal configuration of a transaction processing system according to an embodiment of the present invention.

도 1을 참조하면, 본 발명의 일실시예에 따른 트랜잭션 처리 시스템(100)은, 분석부(110), 선정부(120) 및 처리부(130)를 포함하여 구성할 수 있다. 또한, 실시예에 따라, 트랜잭션 처리 시스템(100)은 제어부(140)를 더 포함하여 구성될 수 있다.Referring to FIG. 1, a transaction processing system 100 according to an embodiment of the present invention may include an analysis unit 110, a selection unit 120, and a processing unit 130. In addition, according to an embodiment, the transaction processing system 100 may further comprise a control unit 140.

분석부(110)는 이전에 처리된 이전 트랜잭션에 관한 트랜잭션 정보를 기반으로, 워크로드로부터 개시 명령된 트랜잭션(현재 트랜잭션)에 대한 크기(길이), 컨텐션(contention) 정도 및 연속 발생된 쓰기(write) 횟수 중 적어도 하나의 특성을 분석한다.The analysis unit 110 based on the transaction information on the previous transaction processed previously, the size (length), contention (contention), and successive writes for the transaction (current transaction) commanded to start from the workload ( At least one characteristic of the number of writes is analyzed.

즉, 분석부(110)는, 폴백 경로 테이블에 저장된 이전에 처리된 트랜잭션의 정보를 기반으로, HTM(Lite HTM)으로 처리되지 못한 현재의 트랜잭션의 특성을 파악할 수 있다.That is, the analysis unit 110 may grasp the characteristics of the current transaction that is not processed by the Lite HTM based on information of previously processed transactions stored in the fallback path table.

여기서, 폴백 경로 테이블(폴백 패스 테이블)은, 이전에 처리된 트랜잭션의 특성을 분석하여, 최적의 트랜잭션 처리 기법을 선정하기 위한 메타 데이터를 포함할 수 있다.Here, the fallback path table (fallback path table) may include metadata for selecting an optimal transaction processing technique by analyzing characteristics of a previously processed transaction.

예를 들어, 도 4를 참조하면, 폴백 경로 테이블(폴백 패스 테이블)(400)은, 이전 처리된 트랜잭션에서 연속 발생된 쓰기(write) 횟수('Max_con_write') 및 메모리 용량 초과에 따른 중지(abort) 발생 비율('POSTFIX_capacity abort')에 관한 메타 데이터를, 트랜잭션 처리 기법 'RH-STM'에 대한 폴백 경로와 연관시켜 유지할 수 있다.For example, referring to FIG. 4, the fallback path table (fallback path table) 400 may abort due to the number of consecutive writes ('Max_con_write') and memory capacity exceeded in a previously processed transaction. ) Metadata about the rate of occurrence ('POSTFIX_capacity abort') can be maintained in association with the fallback path to the transaction processing technique 'RH-STM'.

또한, 폴백 경로 테이블(400)은, 이전 처리된 트랜잭션에서 수행 사이클('Transaction_cycle') 및 현재 스레드에서 발생한 메모리 용량 초과에 따른 중지(abort) 발생 비율('Local_capacity abort')에 관한 메타 데이터를, 트랜잭션 처리 기법 '싱글 글로벌 락(SGL)'에 대한 폴백 경로와 연관시켜 유지할 수 있다.In addition, the fallback path table 400 may include metadata regarding the execution cycle ('Transaction_cycle') in the previously processed transaction and the rate of abort occurrence ('Local_capacity abort') due to exceeding memory capacity occurring in the current thread. It can be associated with the fallback path to the transaction processing technique 'single global lock (SGL)'.

또한, 폴백 경로 테이블(400)은, 충돌 검증(validation) 단계에서 발생되는 공유 메모리(HyTM)와 버퍼 간의 충돌로 인한 중지 발생 비율('Valid_abort')에 관한 메타 데이터를, 트랜잭션 처리 기법 'NOrec-STM'에 대한 폴백 경로와 연관시켜 유지할 수 있다.In addition, the fallback path table 400 may include metadata regarding the rate of occurrence of a break ('Valid_abort') due to a collision between the buffer and the shared memory (HyTM) generated at the collision validation step, and the transaction processing technique 'NOrec-'. It can be associated with the fallback path to STM '.

선정부(120)는 HTM(Hardware Transactional Memory)을 제외한, RH-STM, NOrec STM 및 싱글 글로벌 락(Single Global Lock)을 포함하는 트랜잭션 처리 기법 중에서, 상기 특성에 부합하는 어느 하나의 제1 트랜잭션 처리 기법을 선정한다.The selector 120 may process any one of the transaction processing techniques including the RH-STM, the NOrec STM, and the single global lock, except for a hardware transactional memory (HTM). Select a technique.

일례로, 선정부(120)는 선정된 폴백 경로(fall-back path) 테이블로부터 식별되는 상기 각 트랜잭션 처리 기법과 연관되는 메타 데이터를 이용하여, 상기 특성에 부합하는 상기 제1 트랜잭션 처리 기법을 선정할 수 있다.For example, the selector 120 selects the first transaction processing scheme that matches the characteristic by using metadata associated with each of the transaction processing techniques identified from the selected fall-back path table. can do.

즉, 선정부(120)는 상기 HTM에 의해 처리되지 못한 트랜잭션에 대해, 현재의 특성(크기(길이), 컨텐션 정도 및 연속 발생된 쓰기(write) 횟수 등)에 부합하는 최적의 제1 트랜잭션 처리 기법을, RH-STM, NOrec STM 및 싱글 글로벌 락 중에서 선정하고, 상기 제1 트랜잭션 처리 기법에 해당하는 폴백 경로를, Lite HTM 처리 모듈에 제공할 수 있다.That is, the selector 120 may select an optimal first transaction that meets the current characteristics (size (length), contention degree, number of consecutive writes, etc.) for the transaction that is not processed by the HTM. The processing scheme may be selected from an RH-STM, a NOrec STM, and a single global lock, and a fallback path corresponding to the first transaction processing scheme may be provided to the Lite HTM processing module.

구체적으로, 선정부(120)는 상기 트랜잭션의 처리 중 메모리 용량 초과에 따른 중지(abort) 발생 비율이 임계치(예, '30%')에 도달하면, 상기 RH-STM을, 상기 제1 트랜잭션 처리 기법으로 선정할 수 있다.In detail, the selector 120 processes the RH-STM in response to the first transaction when the rate of occurrence of an abort due to an excess of memory capacity reaches a threshold (eg, '30% ') during processing of the transaction. The technique can be selected.

또한, 선정부(120)는 상기 트랜잭션의 처리 중 충돌 검증(validation) 시 발생되는 하이브리드 트랜잭셔널 메모리(HyTM)와 버퍼 간의 충돌로 인한 중지 발생 비율이 임계치(예, '70%')에 도달하면, 상기 NOrec STM을, 상기 제1 트랜잭션 처리 기법으로 선정할 수 있다.In addition, the selector 120 reaches a threshold (eg, '70% ') of a stop occurrence rate due to a collision between the hybrid transactional memory (HyTM) and a buffer generated during collision validation during processing of the transaction. In this case, the NOrec STM may be selected as the first transaction processing technique.

또한, 선정부(120)는 상기 트랜잭션의 처리 중 연속 발생된 쓰기 횟수가 임계치('1')에 도달하면, 상기 싱글 글로벌 락(SGL)을, 상기 제1 트랜잭션 처리 기법으로 선정할 수 있다.The selector 120 may select the single global lock SGL as the first transaction processing technique when the number of consecutive writes generated during processing of the transaction reaches a threshold '1'.

처리부(130)는 선정된 상기 제1 트랜잭션 처리 기법에 기초하여, 상기 트랜잭션을 처리한다. 즉, 처리부(130)는 상기 제1 트랜잭션 처리 기법에 해당하는 폴백 경로로 상기 트랜잭션을 이동시켜 처리할 수 있다.The processor 130 processes the transaction based on the selected first transaction processing technique. That is, the processor 130 may process the transaction by moving the transaction to a fallback path corresponding to the first transaction processing technique.

처리부(130)는 설정된 재시도 횟수 이내에서, 상기 HTM을 이용한 상기 트랜잭션의 처리가 이루어지지 않으면, 상기 트랜잭션의 현재의 특성에 적합한 제1 트랜잭션 처리 기법에 기초하여, 상기 트랜잭션을 처리할 수 있다.If the processing unit 130 does not process the transaction using the HTM within a set number of retries, the processing unit 130 may process the transaction based on a first transaction processing technique suitable for the current characteristics of the transaction.

실시예에 따라, 처리부(130)는 상기 제1 트랜잭션 처리 기법에 따라 상기 트랜잭션을 처리하는 동안, 상기 트랜잭션의 특성이 변경되면, 변경되는 특성에 따른 제2 트랜잭션 처리 기법으로 전이하여 상기 트랜잭션을 처리할 수 있다.According to an embodiment, while processing the transaction according to the first transaction processing technique, if the characteristic of the transaction is changed, the processor 130 transitions to the second transaction processing technique according to the changed characteristic to process the transaction. can do.

상기 폴백 경로 테이블에는, 각 트랜잭션 처리 기법에서 다른 트랜잭션 처리 기법으로 분기하기 위한 특성(메타 데이터)이 저장될 수 있으며, 처리부(130)는 상기 폴백 경로 테이블을 참조하여, 제1 트랜잭션 처리 기법에 따라 트랜잭션을 처리 중에 변경된 트랜잭션의 특성에 최적화된 제2 트랜잭션 처리 기법으로 트랜잭션을 처리할 수 있다.In the fallback path table, characteristics (metadata) for branching from each transaction processing method to another transaction processing method may be stored, and the processing unit 130 may refer to the fallback path table according to a first transaction processing method. The transaction may be processed by a second transaction processing technique that is optimized for the characteristics of the changed transaction during processing.

다시 말해, 처리부(130)는 HTM으로 처리되지 못하는 트랜잭션에 대해, 항상 트랜잭션 특성에 최적화된 트랜잭션 처리 기법으로 처리하여 트랜잭션의 처리 성능을 높일 수 있다.In other words, the processor 130 may increase the processing performance of the transaction by always processing the transaction that is not processed by the HTM by a transaction processing technique optimized for transaction characteristics.

일례로, 처리부(130)에서 제1 트랜잭션 처리 기법('RH-STM')에 따라 트랜잭션의 첫 번째 쓰기(write)를 수행 시 읽기(read)를 수행하는 PREFIX HTM을 커밋(commit)하고, POSTFIX HTM을 시도하게 되는데, 쓰기와 읽기가 반복될 경우 PREFIX HTM은 시작과 동시에 커밋되어 불필요한 작업을 증가시킬 수 있고, POSTFIX HTM이 처리해야 할 크기는 증가하기 때문에 메모리 용량 초과에 따른 중지(capacity abort)가 발생될 확률이 높아질 수 있다. 이러한 점을 고려하여, 처리부(130)는 제1 트랜잭션 처리 기법('RH-STM')에 따라 트랜잭션을 처리하는 동안, 연속으로 처리한 쓰기(write)의 수가 '1'인 경우(A 조건), 제2 트랜잭션 처리 기법('싱글 글로벌 락')으로 전이하여 상기 트랜잭션을 처리할 수 있다.For example, the processor 130 commits a PREFIX HTM that performs a read when the first write of a transaction is performed according to the first transaction processing technique 'RH-STM', and POSTFIX HTM will be attempted, but if the write and read are repeated, the PREFIX HTM will commit at startup and increase unnecessary work, and the capacity abort will increase because the size of the POSTFIX HTM needs to be handled increases. Can increase the probability of occurrence. In consideration of this, when the processing unit 130 processes the transaction according to the first transaction processing technique 'RH-STM', the number of consecutive writes is '1' (condition A). The transaction may be transferred to a second transaction processing technique ('single global lock') to process the transaction.

또한, 처리부(130)에서 제1 트랜잭션 처리 기법('RH-STM')에서 POSTFIX HTM이 트랜잭션을 처리하지 못한 경우, 값을 메모리에 직접 반영하기 위해 모든 스레드를 대기 상태로 전환하며 이는 성능에 악영향을 미칠 수 있다. 이러한 점을 고려하여, 처리부(130)는, 제1 트랜잭션 처리 기법('RH-STM')에 따라 트랜잭션을 처리하는 동안, POSTFIX HTM에서 메모리 용량 초과에 따른 중지(capacity abort) 발생 비율이 70% 이상이면(B 조건), 트랜잭션의 크기와 상관없이 병렬 수행이 가능한 제2 트랜잭션 처리 기법('NOrec-STM')으로 전환하여 상기 트랜잭션을 처리할 수 있다.In addition, when the POSTFIX HTM fails to process a transaction in the first transaction processing technique ('RH-STM') in the processing unit 130, all threads are put in a waiting state to reflect a value directly in memory, which adversely affects performance. Can have In view of this, while processing the transaction according to the first transaction processing technique (RH-STM), the processing unit 130 has a 70% capacity abort occurrence rate due to exceeding memory capacity in the POSTFIX HTM. If it is abnormal (condition B), the transaction may be processed by switching to a second transaction processing technique ('NOrec-STM') capable of parallel execution regardless of the size of the transaction.

상기 A, B 조건에 모두 해당하지 않을 경우, 처리부(130)는, 제1 트랜잭션 처리 기법('RH-STM')을 유지한 상태로 트랜잭션을 처리할 수 있다(C 조건).If the conditions A and B do not correspond to each other, the processor 130 may process the transaction while maintaining the first transaction processing technique 'RH-STM' (C condition).

다른 일례로, 처리부(130)에서 제1 트랜잭션 처리 기법('싱글 글로벌 락')에 따라 트랜잭션을 처리 시 트랜잭션을 단일 스레드로 처리하기 때문에 트랜잭션의 크기가 클 경우 대기시간이 길어질 수 있다. 이러한 점을 고려하여, 처리부(130)는, 제1 트랜잭션 처리 기법('싱글 글로벌 락')에 따라 트랜잭션을 처리 시, 현재 스레드에서 메모리 용량 초과에 따른 중지(capacity abort) 발생 비율이 30% 이상 발생할 경우(D 조건), 제2 트랜잭션 처리 기법('RH-STM')으로 전환하여 트랜잭션을 보다 빠르게 처리할 수 있다.In another example, since the processing unit 130 processes the transaction as a single thread when processing the transaction according to the first transaction processing technique ('single global lock'), the waiting time may be long when the transaction size is large. In consideration of this, the processing unit 130, when processing a transaction according to the first transaction processing technique ('single global lock'), the rate of occurrence of capacity abort in excess of the memory capacity in the current thread is 30% or more If it happens (D condition), it can switch to the second transaction processing technique ('RH-STM') to process the transaction faster.

또한, 처리부(130)는, 제1 트랜잭션 처리 기법('싱글 글로벌 락')에 따라 트랜잭션을 처리 시, 상기 트랜잭션의 수행 사이클이 HTM으로 처리될 수 없는 크기를 가질 경우(E 조건), 제2 트랜잭션 처리 기법('NOrec-STM')을 이용하여 큰 트랜잭션을 처리할 수 있다.In addition, when processing the transaction according to the first transaction processing technique ('single global lock'), the processing unit 130 has a size in which the execution cycle of the transaction cannot be processed by the HTM (E condition). Transaction processing techniques ('NOrec-STM') can be used to process large transactions.

상기 D, E 조건에 모두 해당하지 않을 경우, 처리부(130)는, 제1 트랜잭션 처리 기법('싱글 글로벌 락')을 유지한 상태로 트랜잭션을 처리할 수 있다(F 조건). If the conditions D and E do not correspond to each other, the processor 130 may process a transaction while maintaining a first transaction processing technique ('single global lock') (condition F).

또 다른 일례로, 처리부(130)에서 제1 트랜잭션 처리 기법('NOrec-STM')에 따라 트랜잭션을 처리 시 읽기(read), 쓰기(write) 명령 세트를 버퍼에 저장하여 처리할 수 있으나, 트랜잭션의 컨텐션(contention) 정도가 높은 경우 반복적으로 충돌 검증(Validation) 단계에서 다른 트랜잭션과 충돌이 감지될 수 있다. 이러한 점을 고려하여, 처리부(130)는, 제1 트랜잭션 처리 기법('NOrec-STM')에 따라 트랜잭션을 처리 중, 충돌이 일정 비율(예, '80%') 이상 발생되는 경우(G 조건), 제2 트랜잭션 처리 기법(싱글 글로벌 락)으로 전이하여, 트랜잭션을 안전하게 처리할 수 있다.As another example, the processor 130 may store a read and write command set in a buffer to process a transaction according to a first transaction processing technique ('NOrec-STM'), but may process the transaction. If the contention level of the transaction is high, collisions with other transactions may be detected repeatedly in the collision validation step. In consideration of this point, the processor 130 may process a transaction according to the first transaction processing technique 'NOrec-STM' when a collision occurs more than a predetermined rate (eg, '80% ') (G condition). ), It can transition to the second transaction processing technique (single global lock) to safely process the transaction.

이때, 처리부(130)는, 충돌이 일정 비율(예, '20%') 이하로 적게 발생되면(H 조건), 트랜잭션의 컨텐션(contention) 정도가 낮다고 판단하여 제2 트랜잭션 처리 기법('RH-STM')으로 전이하여 상대적으로 빠른 처리 속도로 트랜잭션을 처리할 수 있다.At this time, if the collision occurs less than a predetermined rate (for example, '20% ') or less (H condition), the processor 130 determines that the contention of the transaction is low, and thus the second transaction processing technique (' RH '). -STM ') to process transactions at relatively fast processing speeds.

상기 G, H 조건에 모두 해당되지 않을 경우, 처리부(130)는, 제1 트랜잭션 처리 기법('NOrec-STM')을 유지한 상태로 트랜잭션을 처리할 수 있다(I 조건).If the conditions do not correspond to the G and H conditions, the processor 130 may process the transaction while maintaining the first transaction processing technique 'NOrec-STM' (I condition).

이와 같이, 처리부(130)는, HTM으로 처리되지 않는 트랜잭션에 대해, RH-STM, NOrec STM 및 싱글 글로벌 락(Single Global Lock) 중 어느 하나의 제1 트랜잭션 처리 기법에 따라 처리하는 동안에도, 트랜잭션의 특성 변화에 부합하는 최적화된 제2 트랜잭션 처리 기법으로 지속적으로 전환해서 처리할 수 있어 트랜잭션의 처리 성능을 보다 높일 수 있다.In this way, the processing unit 130, even during the transaction that is not processed by the HTM, while processing according to any one of the first transaction processing technique of RH-STM, NOrec STM and Single Global Lock, the transaction, It is possible to continuously convert and process the optimized second transaction processing method corresponding to the characteristic change of the transaction, thereby increasing the processing performance of the transaction.

실시예에 따라, 처리부(130)는 멀티 코어 환경에서 서로 다른 스레드에 의해 수행되는 각 트랜잭션이 상기 HTM을 이용하여 처리되지 않으면, 상기 각 트랜잭션의 특성을 고려하여 선정되는 각각의 제1 트랜잭션 처리 기법에 기초하여, 상기 각 트랜잭션의 동시 처리를 허용할 수 있다.According to an embodiment, the processor 130 may select the first transaction processing technique that is selected in consideration of the characteristics of each transaction if each transaction executed by a different thread in a multi-core environment is not processed using the HTM. Based on the above, the simultaneous processing of each of the transactions can be allowed.

이와 같은 멀티 코어 환경에서 서로 다른 스레드에 의해 수행되는 각 트랜잭션 간의 충돌 방지를 위해, 트랜잭션 처리 시스템(100)은, 동시성 제어를 실시하는 제어부(140)를 더 포함할 수 있다.In order to prevent collisions between transactions performed by different threads in such a multi-core environment, the transaction processing system 100 may further include a controller 140 that performs concurrency control.

제어부(140)는 임의의 스레드에서 상기 제1 트랜잭션 처리 기법에 따라 처리되는 상기 트랜잭션이 정상 종료(commit)하면, 글로벌 클락(global clock)을 업데이트 한다.The controller 140 updates a global clock when the transaction processed according to the first transaction processing technique is terminated in an arbitrary thread.

이를 통해, 제어부(140)는 상기 트랜잭션의 처리에 따른 하이브리드 트랜잭셔널 메모리(HyTM)의 수정을 타 스레드에 손쉽게 알림으로써, 각 트랜잭션 간의 충돌을 효과적으로 방지할 수 있다.Through this, the controller 140 can easily notify the other thread of modification of the hybrid transactional memory (HyTM) according to the processing of the transaction, thereby effectively preventing a conflict between each transaction.

또한, 제어부(140)는 트랜잭션 처리 기법에 따라, 락 변수('mutex Lock' 또는 'commit Lock')를 설정(acquire)하여, 멀티 코어 환경에서 서로 다른 스레드가 각 트랜잭션을 처리할 때 발생될 수 있는 충돌을 효과적으로 방지할 수 있다.In addition, the controller 140 may set a lock variable ('mutex lock' or 'commit lock') according to a transaction processing technique, and may be generated when different threads process each transaction in a multi-core environment. Can effectively prevent collisions.

구체적으로, 제어부(140)는 상기 제1 트랜잭션 처리 기법이, 싱글 글로벌 락인 경우, 제1 락 변수('mutex Lock')를 설정하여 상기 HTM을 강제로 대기상태로 전환하고, 제2 락 변수('commit Lock')를 설정하여 RH-STM 또는 NOrec STM에서 서로 다른 스레드에서 동시에 트랜잭션이 정상 종료(commit)하는 것을 방지할 수 있다. 처리부(130)는 상기 제1 및 제2 락 변수를 설정한 상태에서, 상기 싱글 글로벌 락에 따라 상기 트랜잭션을 처리할 수 있다.In detail, when the first transaction processing scheme is a single global lock, the controller 140 sets a first lock variable 'mutex lock' to forcibly switch the HTM to a standby state and a second lock variable ( 'Commit Lock') can be set to prevent transactions from committing simultaneously on different threads in RH-STM or NOrec STM. The processor 130 may process the transaction according to the single global lock while setting the first and second lock variables.

이와 같이, 본 발명의 일실시예에 따르면, Lite HTM에서 우선적으로 트랜잭션 처리를 수행하고, Lite HTM으로 처리할 수 없는 트랜잭션에 대해, 길이 및 컨텐션 정도와 같은 특성 분석에 기반하여, RH-STM, NOrec-STM, 싱글 글로벌 락(Single Global Lock) 중 어느 하나의 최적한 트랜잭션 처리 기법에 따라 처리 함으로써, 트랜잭션 처리 성능을 높일 수 있다.As such, according to an embodiment of the present invention, RH-STM based on a characteristic analysis such as length and contention degree for transactions that cannot be processed with Lite HTM and preferentially perform transaction processing in Lite HTM. Transaction processing performance can be improved by processing according to the optimal transaction processing technique of one of the following methods: NOrec-STM and Single Global Lock.

또한, 본 발명의 일실시예에 따르면, 이전 트랜잭션의 처리 결과 정보를 폴백 경로 테이블에 저장하고, 분석을 통해 트랜잭션 길이 및 컨텐션 정도를 파악하여, 현재 수행되는 트랜잭션의 특성에 맞는 최적의 폴백 경로를 제공 함으로써, 트랜잭션의 특성에 기반한 적응적인 하이브리드 트랜잭셔널 메모리 시스템을 제공할 수 있다.In addition, according to an embodiment of the present invention, by storing the processing result information of the previous transaction in the fallback path table, and by analyzing the transaction length and contention through the analysis, the optimal fallback path suitable for the characteristics of the current transaction By providing, an adaptive hybrid transactional memory system based on the characteristics of a transaction can be provided.

또한, 본 발명의 일실시예에 따르면, 글로벌 클락(global clock) 및 락(Lock) 기반의 효율적인 동시성 제어 기법을 통해, 멀티 코어 환경에서 서로 다른 스레드 사이에서 Lite HTM, RH-STM, NOrec-STM 및 싱글 글로벌 락과 같은 각 트랜잭션 처리 기법이 동시에 수행될 수 있도록 제어하여, 트랜잭션의 처리 성능을 향상시킬 수 있다.In addition, according to an embodiment of the present invention, through the global clock and lock-based efficient concurrency control scheme, Lite HTM, RH-STM, NOrec-STM between different threads in a multi-core environment And controlling each transaction processing technique such as a single global lock to be executed at the same time, thereby improving transaction processing performance.

도 2는 본 발명의 일실시예에 따른 트랜잭션 처리 시스템의 전체 구조를 도시한 개념도이다.2 is a conceptual diagram showing the overall structure of a transaction processing system according to an embodiment of the present invention.

도 2를 참조하면, 본 발명의 일실시예에 따른 트랜잭션 처리 시스템(200)은, 트랜잭션에 특성에 기반한 적응적인 하이브리드 트랜잭셔널 메모리 기법을 제공하며, Lite HTM, RH-STM, NOrec STM 및 싱글 글로벌 락(Single Global Lock)의 환경에서 동작할 수 있다.2, the transaction processing system 200 according to an embodiment of the present invention provides an adaptive hybrid transactional memory technique based on the characteristics of a transaction, Lite HTM, RH-STM, NOrec STM and single Can operate in the environment of Single Global Lock.

여기서, 폴백 코디네이터(fall-back coordinator)(210) 및 트랜잭션 처리 모듈(220)를 포함하여 구성될 수 있다.Here, it may be configured to include a fall-back coordinator 210 and a transaction processing module 220.

폴백 코디네이터(210)는 이전 처리된 트랜잭션의 처리 결과 정보를 바탕으로, 워크로드로부터 개시되는 현재 트랜잭션의 특성에 부합하는 폴백 경로를 Lite HTM 처리 모듈(221)에 제공하는 역할을 한다.The fallback coordinator 210 serves to provide the Lite HTM processing module 221 with a fallback path corresponding to the characteristics of the current transaction initiated from the workload, based on the processing result information of the previously processed transaction.

상세하게는, 폴백 코디네이터(210)는 폴백 패스 핸들러(fall-back path handler)(211) 및 폴백 패스 테이블(fall-back path)(212)을 세부 구성으로 포함할 수 있다.In detail, the fallback coordinator 210 may include a fall-back path handler 211 and a fall-back path table 212 in a detailed configuration.

폴백 패스 핸들러(211)는 워크로드(workloads)로부터 개시되는 트랜잭션이, 설정된 재시도 횟수 이내에서 Lite HTM 처리 모듈(221)에서 처리되지 않으면, 폴백 패스 테이블(212)에 저장된 이전 트랜잭션의 처리 결과 정보(트랜잭션 정보)를 바탕으로, 현재 개시된 트랜잭션의 특성에 부합하는 최적의 폴백 경로를 선정할 수 있다.The fallback pass handler 211 may process processing information of a previous transaction stored in the fallback pass table 212 if a transaction initiated from the workloads is not processed by the Lite HTM processing module 221 within a set number of retries. Based on the (transaction information), it is possible to select an optimal fallback path that matches the characteristics of the currently initiated transaction.

폴백 패스 핸들러(211)는 현재 개시된 트랜잭션에 대해, 크기(길이)와 컨텐션(contention) 정도 및 연속 발생된 쓰기(write) 횟수 중 적어도 하나의 특성을 분석할 수 있다.The fallback pass handler 211 may analyze at least one of a size (length), a degree of contention, and a number of consecutive writes for the currently initiated transaction.

폴백 패스 테이블(212)은 이전에 처리된 트랜잭션의 처리 결과 정보(트랜잭션 정보)를 저장하고, 최적의 폴백 경로를 선정하기 위한 메타 데이터를, 폴백 경로 각각으로 유지하는 역할을 한다.The fallback pass table 212 stores processing result information (transaction information) of a previously processed transaction and maintains metadata for selecting an optimal fallback path as each fallback path.

또한, 폴백 패스 테이블(212)은 각 폴백 경로에서 트랜잭션을 수행하는 동안, 각 트랜잭션 처리 기법의 특성을 고려하여 다른 트랜잭션 처리 기법으로 분기하기 위한 특성을 저장할 수 있다.In addition, the fallback pass table 212 may store characteristics for branching to another transaction processing scheme in consideration of the characteristics of each transaction processing technique while performing a transaction in each fallback path.

일례로, 도 4를 참조하면, 폴백 패스 테이블(212, 400)은 이전에 처리된 트랜잭션의 특성을 분석하여, 최적의 폴백 경로를 선정하기 위한 메타 데이터를, 폴백 경로('RH-STM', '싱글 글로벌 락' 및 'NOrec-STM') 각각으로 유지할 수 있다.For example, referring to FIG. 4, the fallback pass tables 212 and 400 analyze the characteristics of previously processed transactions, and analyze metadata for selecting an optimal fallback path. The fallback path ('RH-STM', 'Single Global Lock' and 'NOrec-STM').

구체적으로, 폴백 패스 테이블(212, 400)은 연속 발생된 쓰기(write) 횟수('Max_con_write') 및 메모리 용량 초과에 따른 중지(abort) 발생 비율('POSTFIX_capacity abort')에 관한 메타 데이터를, 폴백 경로('RH-STM')에 연관시켜 유지할 수 있다.In detail, the fallback pass tables 212 and 400 fallback metadata regarding the number of consecutive writes ('Max_con_write') and the rate of abort occurrence ('POSTFIX_capacity abort') due to the memory capacity being exceeded. Can be associated with the pathway ('RH-STM').

또한, 폴백 패스 테이블(212, 400)은 현재 트랜잭션의 수행 사이클('Transaction_cycle') 및 현재 스레드에서 발생한 메모리 용량 초과에 따른 중지(abort) 발생 비율('Local_capacity abort')에 관한 메타 데이터를, 폴백 경로('싱글 글로벌 락')에 연관시켜 유지할 수 있다.In addition, the fallback pass tables 212 and 400 fallback metadata regarding the execution cycle of the current transaction ('Transaction_cycle') and the rate of abort occurrence ('Local_capacity abort') due to exceeding memory capacity occurring in the current thread. It can be associated with a path ('single global lock').

또한, 폴백 패스 테이블(212, 400)은 충돌 검증(validation) 단계에서 발생되는 공유 메모리(HyTM)와 버퍼 간의 충돌로 인한 중지 발생 비율('Valid_abort')에 관한 메타 데이터를, 폴백 경로('NOrec-STM')에 연관시켜 유지할 수 있다.In addition, the fallback pass tables 212 and 400 may include metadata regarding a stop occurrence rate ('Valid_abort') due to a collision between the buffer and the shared memory HyTM generated during the collision validation step, and the fallback path 'NOrec'. -STM ').

트랜잭션 처리 모듈(220)은, 하이브리드 트랜잭셔널 메모리(hybrid transactional memory)를 기반으로 멀티 코어 환경에서 워크로드로부터 개시된 트랜잭션을 처리하고, 트랜잭션이 정상 처리되면, 다른 스레드에서 공유 메모리의 수정을 알 수 있도록 글로벌 클락(global clock)을 업데이트 할 수 있다.The transaction processing module 220 processes a transaction initiated from a workload in a multi-core environment based on hybrid transactional memory, and when the transaction is processed normally, another thread may know the modification of the shared memory. You can update the global clock to make it work.

트랜잭션 처리 모듈(220)은, Lite HTM 처리 모듈(221), RH-STM 처리 모듈(222), NOrec-STM 처리 모듈(223) 및 싱글 글로벌 락(Single global lock) 처리 모듈(224)를 포함하여 구성될 수 있다.The transaction processing module 220 includes a Lite HTM processing module 221, an RH-STM processing module 222, a NOrec-STM processing module 223, and a single global lock processing module 224. Can be configured.

Lite HTM 처리 모듈(221)은 HTM(Hardware Transactional Memory)을 이용한 트랜잭션 처리를 수행하는 모듈로써, Intel TSX의 기본적인 HTM 처리 환경을 제공할 수 있다.The Lite HTM processing module 221 is a module that performs transaction processing using a hardware transactional memory (HTM), and may provide a basic HTM processing environment of Intel TSX.

Lite HTM 처리 모듈(221)은 하드웨어 기반의 낙관적인 전략을 사용하여 트랜잭션을 수행하며, 트랜잭션의 충돌 혹은 예기치 못한 원인에 의해 중단(abort)될 경우, 정해진 횟수만큼 트랜잭션 처리를 재시도할 수 있다.The Lite HTM processing module 221 executes a transaction using a hardware-based optimistic strategy, and may retry transaction processing a predetermined number of times when the transaction is interrupted due to a conflict or an unexpected cause of the transaction.

만약 재시도 횟수 내에서 트랜잭션이 처리되지 못할 경우, 폴백 패스 핸들러(211)는, 이전 처리된 트랜잭션의 처리 결과 정보가 저장되는 폴백 패스 테이블(212)을 참조하여 상기 트랜잭션의 특성에 부합하는 최적의 폴백 경로(RH-STM, NOrec STM, Single Global Lock)를 선정할 수 있다.If the transaction cannot be processed within the number of retries, the fallback pass handler 211 refers to the fallback pass table 212, in which the processing result information of the previously processed transaction is stored, which is optimal for the characteristics of the transaction. Fallback paths (RH-STM, NOrec STM, Single Global Lock) can be selected.

RH-STM 처리 모듈(222)은 트랜잭션을, STM과 부분적인 HTM으로 처리하는 모듈로서, STM 내에 삽입된 일부분의 HTM('PREFIX HTM', 'POSTFIX HTM')을 이용하여, 캐시 일관성 프로토콜 기반의 충돌 감지 기법에 따라 동시성 제어를 수행할 수 있다.The RH-STM processing module 222 is a module that processes a transaction as an STM and a partial HTM, and uses a portion of the HTM ('PREFIX HTM' and 'POSTFIX HTM') inserted in the STM, based on a cache coherency protocol. Concurrency control can be performed according to the collision detection technique.

만약 일부분의 HTM('PREFIX HTM', 'POSTFIX HTM')을 이용하여 트랜잭션을 수행하는 동안 충돌이 발생하거나 혹은 예기치 못한 원인에 의해 트랜잭션이 중단될 경우, RH-STM 처리 모듈(222)은 트랜잭션을 원 상태로 복구(roll-back)한 후, 싱글 글로벌 락(Single Global Lock) 처리 모듈(224)을 통해 처리할 수 있다.If a transaction occurs while executing a transaction using a portion of the HTM ('PREFIX HTM', 'POSTFIX HTM'), or the transaction is aborted due to an unexpected cause, the RH-STM processing module 222 may execute the transaction. After the roll-back to the original state, it can be processed through a single global lock processing module 224.

NOrec-STM 처리 모듈(223)은 상기 트랜잭션을 STM으로 처리하기 위한 모듈로서, 트랜잭션을 처리하는 동안 발생되는 읽기('read') 및 쓰기('write') 명령 세트를 버퍼에 저장할 수 있다.The NOrec-STM processing module 223 is a module for processing the transaction as an STM. The NOrec-STM processing module 223 may store a set of 'read' and 'write' instructions generated while processing a transaction in a buffer.

NOrec-STM 처리 모듈(223)은 상기 트랜잭션의 처음과 끝에서 글로벌 클락(global clock)의 변화를 감지하고, 상기 글로벌 클락의 값이 변경(업데이트)된 경우, 버퍼에 저장되어 있는 읽기('read') 및 쓰기('write') 명령 세트의 값과, 공유 메모리의 값을 비교하여 충돌 검증을 수행할 수 있다.The NOrec-STM processing module 223 detects a change in a global clock at the beginning and the end of the transaction, and reads a 'read' when the value of the global clock is changed (updated). The collision verification can be performed by comparing the values of the ')' and 'write' command sets with those of the shared memory.

싱글 글로벌 락 처리 모듈(224)은 반복적으로 중단되는 트랜잭션을 처리하기 위한 모듈로서, 모든 스레드를 대기 상태로 전환 함으로써 상기 트랜잭션의 정상 처리를 보장할 수 있다.The single global lock processing module 224 is a module for processing a transaction that is repeatedly aborted, and can guarantee normal processing of the transaction by putting all threads into a standby state.

도 3은 본 발명의 일실시예에 따른 트랜잭션 처리 시스템에서, 트랜잭션을 처리하는 전체 흐름을 도시한 도면이다.3 is a diagram illustrating the overall flow of processing a transaction in a transaction processing system according to an embodiment of the present invention.

도 3을 참조하면, 본 발명의 일실시예에 따른 트랜잭션 처리 시스템(300)은, 폴백 코디네이터(310), Lite HTM 처리 모듈(301), RH-STM 처리 모듈(302), NOrec STM 처리 모듈(303) 및 싱글 글로벌 락 처리 모듈(304)를 포함하여 구성될 수 있다.3, the transaction processing system 300 according to an embodiment of the present invention, the fallback coordinator 310, Lite HTM processing module 301, RH-STM processing module 302, NOrec STM processing module ( 303) and a single global lock processing module 304.

Lite HTM 처리 모듈(301)은 워크로부터 트랜잭션이 시작되면, HTM을 이용하여 트랜잭션을 처리할 수 있다(단계 ①).The Lite HTM processing module 301 may process the transaction using the HTM when the transaction is started from the work (step ①).

Lite HTM 처리 모듈(301)은 현재 수행 중인 폴백 경로(Fall-back path)와의 병렬 수행을 위해 글로벌 클락(global clock)을 검사하여 동시성 제어를 수행할 수 있다(단계 ②). The Lite HTM processing module 301 may perform concurrency control by checking a global clock for parallel execution with a fall-back path currently being performed (step ②).

즉, Lite HTM 처리 모듈(301)은 HTM을 이용하여 트랜잭션을 처리하는 동안, 동시성 관리부를 통해 각 처리 모듈과의 동시성 체크를 수행하여, 각 처리 모듈과의 병렬 처리가 가능해지도록 할 수 있다.That is, while processing the transaction using the HTM, the Lite HTM processing module 301 may perform concurrency check with each processing module through the concurrency management unit to enable parallel processing with each processing module.

Lite HTM 처리 모듈(301)은 정해진 재시도 횟수(임계치) 만큼 HTM 상에서 해당 트랜잭션을 처리할 수 있다(단계 ③).The Lite HTM processing module 301 may process the transaction on the HTM by a predetermined number of retries (threshold) (step ③).

상기 단계 ③에서 정해진 재시도 횟수 이내에 트랜잭션이 처리되지 못할 경우, 폴백 코디네이터(310) 내 폴백 패스 핸들러(311)는, 폴백 패스 테이블(312)에 저장된 이전에 처리된 트랜잭션의 정보를 기반으로, 현재의 트랜잭션의 특성을 파악하고, 상기 특성에 부합하는 최적의 폴백 경로를 선정할 수 있다(단계 ④).If the transaction is not processed within the number of retries determined in step ③ above, the fallback pass handler 311 in the fallback coordinator 310 is based on information of a previously processed transaction stored in the fallback pass table 312. It is possible to grasp the characteristics of the transaction and select an optimal fallback path corresponding to the characteristics (step ④).

Lite HTM 처리 모듈(301)은, 상기 단계 ④에서 폴백 패스 핸들러(311)에 의해 선정된 폴백 경로에 따라, 상기 트랜잭션이 RH-STM, NOrec STM, Single Global Lock 중 하나의 기법을 통해 트랜잭션을 처리되도록 전달할 수 있다(단계 ⑤).The Lite HTM processing module 301 processes the transaction through one of RH-STM, NOrec STM, and Single Global Lock according to the fallback path selected by the fallback pass handler 311 in step ④ above. (Step ⑤).

상기 단계 ⑤에서 선정된 폴백 경로에 따른, RH-STM 처리 모듈(302), NOrec STM 처리 모듈(303) 및 싱글 글로벌 락 처리 모듈(304) 중 적어도 하나의 처리 모듈은, 정상 종료(commit)할 때까지 트랜잭션 처리를 재시도할 수 있다(단계 ⑥).At least one processing module of the RH-STM processing module 302, the NOrec STM processing module 303, and the single global lock processing module 304 according to the fallback path selected in step ⑤ may normally terminate. Transaction processing can be retried until (step ⑥).

각 처리 모듈(Lite HTM 처리 모듈(301), RH-STM 처리 모듈(302), NOrec STM 처리 모듈(303) 및 싱글 글로벌 락 처리 모듈(304))은, 정상 종료(commit)된 트랜잭션에 관한 정보를, 폴백 코디네이터(310) 내의 폴백 패스 테이블(312)에 저장, 업데이트하여, 다음 트랜잭션 폴백 경로 선정 시 사용되도록 할 수 있다(단계 ⑦).Each processing module (Lite HTM processing module 301, RH-STM processing module 302, NOrec STM processing module 303, and single global lock processing module 304) has information about a normally committed transaction. May be stored and updated in the fallback pass table 312 in the fallback coordinator 310 to be used for the next transaction fallback path selection (step ⑦).

도 4는 본 발명의 일실시예에 따른 트랜잭션 처리 시스템에서, 폴백 패스 테이블의 일례를 도시한 도면이다.4 is a diagram illustrating an example of a fallback pass table in a transaction processing system according to an embodiment of the present invention.

도 4를 참조하면, 본 발명의 일실시예에 따른 트랜잭션 처리 시스템은, HTM으로 처리되지 못한 트랜잭션에 대해, 크기(길이), 컨텐션(contention) 정도 및 연속 발생된 쓰기(write) 횟수 중 적어도 하나의 특성을 분석하고, 도 4에 도시된 폴백 경로 테이블(400)을 참조하여 상기 특성에 최적한 폴백 경로를 선정할 수 있다.Referring to FIG. 4, the transaction processing system according to an embodiment of the present invention may include at least one of a size (length), a contention degree, and a number of consecutive writes for a transaction not processed by the HTM. One characteristic may be analyzed and a fallback path that is optimal for the characteristic may be selected with reference to the fallback path table 400 illustrated in FIG. 4.

상기 트랜잭션 처리 시스템은, 이전에 처리된 트랜잭션의 특성을 분석하여, 최적의 폴백 경로를 선정하기 위한 메타 데이터를, 폴백 경로('RH-STM', '싱글 글로벌 락' 및 'NOrec-STM') 각각으로 유지하는 폴백 패스 테이블(400)을 마련할 수 있다.The transaction processing system analyzes the characteristics of the previously processed transaction, and determines the metadata for selecting the optimal fallback path. The fallback path ('RH-STM', 'Single global lock' and 'NOrec-STM') A fallback pass table 400 held for each can be provided.

일례로, 상기 트랜잭션 처리 시스템은, 폴백 경로('RH-STM')에 대해, 연속 발생된 쓰기(write) 횟수('Max_con_write') 및 메모리 용량 초과에 따른 중지(abort) 발생 비율('POSTFIX_capacity abort')에 관한 메타 데이터를 연관시키고, 폴백 경로('싱글 글로벌 락')에 대해, 현재 트랜잭션의 수행 사이클('Transaction_cycle') 및 현재 스레드에서 발생한 메모리 용량 초과에 따른 중지(abort) 발생 비율('Local_capacity abort')에 관한 메타 데이터를 연관시키고, 폴백 경로('NOrec-STM')에 대해, 충돌 검증(validation) 단계에서 발생되는 공유 메모리(HyTM)와 버퍼 간의 충돌로 인한 중지 발생 비율('Valid_abort')에 관한 메타 데이터를 연관시켜, 폴백 패스 테이블(400)을 마련할 수 있다.In one example, the transaction processing system, for the fallback path ('RH-STM'), the number of consecutive writes ('Max_con_write') and the occurrence rate of the abort ('POSTFIX_capacity abort' due to the memory capacity exceeded) Associate meta data about ') and, for the fallback path (' single global lock '), the rate of abort (' Transaction_cycle ') and the rate of abort due to exceeding memory capacity that occurred on the current thread (' Local_capacity abort '), and for fallback paths (' NOrec-STM '), the rate of breaks caused by conflicts between shared memory (HyTM) and buffers that occur during the validation phase (' Valid_abort ') The fallback pass table 400 may be provided by associating metadata regarding ').

상기 트랜잭션 처리 시스템은, 폴백 패스 테이블(400)을 참조하여, 제1 트랜잭션 처리 기법에 따라 트랜잭션을 처리하는 동안, 트랜잭션의 특성이 변경되면, 상기 변경되는 특성에 따른 제2 트랜잭션 처리 기법으로 전이하여 트랜잭션을 처리할 수 있다.The transaction processing system refers to the fallback pass table 400 and, when processing a transaction according to the first transaction processing technique, if the characteristic of the transaction is changed, transitions to the second transaction processing technique according to the changed characteristic. You can process transactions.

이를 위해, 폴백 패스 테이블(400)은 각 트랜잭션 처리 기법의 특성을 고려하여 다른 트랜잭션 처리 기법으로 분기하기 위한 특성을 포함할 수 있다.To this end, the fallback pass table 400 may include a characteristic for branching to another transaction processing scheme in consideration of the characteristics of each transaction processing technique.

트랜잭션 처리기법의 일례로, RH-STM의 경우, 동시성 제어 기법을 필요로 하지 않기 때문에 속도가 빠른 반면, HTM의 메모리 한계로 인해 길이가 긴 트랜잭션(long transaction)을 처리하기 어려우며, 트랜잭션 처리에 실패한 경우 모든 스레드를 대기 상태로 전환한 후에 처리해야 하기 때문에 트랜잭션 중단에 대한 오버헤드가 클 수 있다. 또한, RH-STM 내부에서 PREFIX HTM 및 POSTFIX HTM은, 쓰기(write)의 발생 시점을 기준으로 전환되며, 쓰기(write) 개수가 적을 경우 성능 향상 보다 HTM 기법 전환에 따른 오버헤드가 더 클 수 있다.As an example of a transaction processing technique, RH-STM is fast because it does not require a concurrency control technique, while it is difficult to process long transactions due to the memory limitation of HTM, and fails to process transactions. In this case, the overhead of aborting a transaction can be high because all threads must be processed after the standby state. In addition, the PREFIX HTM and POSTFIX HTM in RH-STM are converted based on the time of writing, and when the number of writes is small, the overhead of switching the HTM technique may be greater than the performance improvement. .

이러한 점을 고려하여, 상기 트랜잭션 처리 시스템은, RH-STM에 따라 트랜잭션을 처리하는 동안 최대 연속으로 발생하는 쓰기(write) 횟수와, STM 내에 삽입된 일부의 HTM('POSTFIX HTM')에서 발생한 메모리 용량 초과로 인한 중지 발생 비율('capacity abort')을, 다른 트랜잭션 처리 기법으로 분기하기 위한 특성으로서, 폴백 패스 테이블(400) 내 메타 데이터('Max_con_write', 'POSTFIX_capacity abort')에 저장할 수 있다.In view of this, the transaction processing system may include a maximum number of writes occurring continuously during processing of a transaction according to RH-STM, and memory generated from some HTMs inserted into the STM ('POSTFIX HTM'). As a characteristic for branching a capacity abort due to the excess capacity ('capacity abort') to another transaction processing technique, the metadata may be stored in the metadata ('Max_con_write', 'POSTFIX_capacity abort') in the fallback pass table 400.

트랜잭션 처리기법의 다른 일례로, 싱글 글로벌 락(Single Global Lock)의 경우, 트랜잭션의 정상 처리를 보장할 수는 있지만 처리 속도가 매우 느리기 때문에 HTM과 STM으로도 트랜잭션이 처리될 수 없는 경우에 실행해야 하는 점을 고려하여, 상기 트랜잭션 처리 시스템은, 트랜잭션을 처리하는 동안 상기 트랜잭션의 수행 사이클 및 현재 스레드에서 발생한 메모리 용량 초과로 인한 중지 발생 비율('capacity abort')을, 다른 트랜잭션 처리 기법으로 분기하기 위한 특성으로서, 폴백 패스 테이블(400) 내 메타 데이터('Transaction_cycle', 'Local_capacity abort')에 저장할 수 있다.As another example of a transaction processing technique, a single global lock can guarantee normal processing of a transaction, but because the processing speed is very slow, it should be executed when the transaction cannot be processed by HTM and STM. In view of the above, the transaction processing system may branch a 'capacity abort' due to the execution cycle of the transaction and the memory capacity exceeded in the current thread while processing the transaction to another transaction processing technique. As a characteristic for the storage, the metadata may be stored in meta data 'Transaction_cycle' and 'Local_capacity abort' in the fallback pass table 400.

트랜잭션 처리기법의 또 다른 일례로, NOrec-STM의 경우, 버퍼를 이용하여 트랜잭션을 처리하기 때문에 길이가 긴 트랜잭션을 처리하기에 용이하지만, 충돌 검증(validation) 단계에서 공유 메모리와 버퍼 간의 지속적인 충돌이 발생할 시, 반복적인 중단(abort)으로 인해 스레드가 대기 상태로 빠질 수 있다는 점을 고려하여, 상기 트랜잭션 처리 시스템은, 충돌 검증(validation) 단계에서 발생되는 공유 메모리(HyTM)와 버퍼 간의 충돌로 인한 중지 발생 비율('Valid_abort')을, 다른 트랜잭션 처리 기법으로 분기하기 위한 특성으로서, 폴백 패스 테이블(400) 내 메타 데이터('Valid_abort')에 저장할 수 있다.Another example of a transaction processing technique is that NOrec-STM is easy to handle long transactions because it uses a buffer to process transactions, but in the collision validation phase, persistent conflicts between shared memory and buffer In consideration of the fact that, when occurring, the thread may be brought into a waiting state due to repetitive abort, the transaction processing system may be caused by a collision between the shared memory (HyTM) and the buffer generated during the collision validation step. The break occurrence rate 'Valid_abort' may be stored in the meta data 'Valid_abort' in the fallback pass table 400 as a characteristic for branching to another transaction processing technique.

상기 트랜잭션 처리 시스템은, 일정 주기마다 폴백 패스 테이블(400)에 저장된 정보를 업데이트 하고, 폴백 패스 테이블(400)에 저장된 정보를 바탕으로 현재의 트랜잭션 특성에 따른 폴백 경로를 선정할 수 있다.The transaction processing system may update the information stored in the fallback pass table 400 at predetermined intervals and select a fallback path according to the current transaction characteristics based on the information stored in the fallback pass table 400.

도 5는 본 발명의 일실시예에 따른 트랜잭션 처리 시스템에서, 폴백 패스의 전이 오토마타(transition automata)를 도시한 도면이다.FIG. 5 is a diagram illustrating a transition automata of a fallback pass in a transaction processing system according to an embodiment of the present invention.

도 5를 참조하면, 본 발명의 일실시예에 따른 트랜잭션 처리 시스템은, 도 5에 도시된 폴백 경로의 전이 오토마타에 근거하여, 트랜잭션의 특성에 가장 최적화된 폴백 경로로 변경하여 제공할 수 있다.Referring to FIG. 5, the transaction processing system according to an embodiment of the present invention may change and provide a fallback path most optimized for the characteristics of a transaction based on the transition automata of the fallback path shown in FIG. 5.

즉, 트랜잭션 처리 시스템은, HTM에 의해 처리되지 않는 트랜잭션을, 트랜잭션의 특성에 부합하는 제1 트랜잭션 처리 기법에 따라 처리하는 동안, 트랜잭션의 특성이 변경되면, 상기 변경되는 특성에 따른 제2 트랜잭션 처리 기법으로 전이하여 트랜잭션을 처리하여, 트랜잭션의 처리 성능을 향상시킬 수 있다.That is, while the transaction processing system processes a transaction that is not processed by the HTM according to the first transaction processing technique corresponding to the characteristic of the transaction, if the characteristic of the transaction changes, the second transaction processing according to the changed characteristic By moving to a technique to process a transaction, it is possible to improve the processing performance of the transaction.

일례로, 제1 트랜잭션 처리 기법('RH-STM')에 따라 트랜잭션의 첫 번째 쓰기(write)를 수행 시 읽기(read)를 수행하는 PREFIX HTM을 커밋(commit)하고, POSTFIX HTM을 시도하게 되는데, 쓰기와 읽기가 반복될 경우 PREFIX HTM은 시작과 동시에 커밋되어 불필요한 작업을 증가시킬 수 있고, POSTFIX HTM이 처리해야 할 크기는 증가하기 때문에 메모리 용량 초과에 따른 중지(capacity abort)가 발생될 확률이 높아질 수 있다.For example, when the first write of a transaction is performed according to the first transaction processing technique ('RH-STM'), a PREFIX HTM that reads is committed and a POSTFIX HTM is attempted. In the case of repeated writes and reads, the PREFIX HTM commits at startup, increasing unnecessary work, and the size of the POSTFIX HTM needs to be handled, which increases the likelihood of a capacity abort occurring. Can be high.

이러한 점을 고려하여, 상기 트랜잭션 처리 시스템은, 제1 트랜잭션 처리 기법('RH-STM')에 따라 트랜잭션을 처리하는 동안, 연속으로 처리한 쓰기(write)의 수가 '1'인 경우, A 조건에 따라 제2 트랜잭션 처리 기법('싱글 글로벌 락')으로 전이하여 상기 트랜잭션을 처리할 수 있다.In consideration of this point, while the transaction processing system processes the transaction according to the first transaction processing technique 'RH-STM', if the number of consecutive writes is '1', the condition A is used. As a result, it may transition to a second transaction processing technique ('single global lock') to process the transaction.

또한, 제1 트랜잭션 처리 기법('RH-STM')에서 POSTFIX HTM이 트랜잭션을 처리하지 못한 경우, 값을 메모리에 직접 반영하기 위해 모든 스레드를 대기 상태로 전환하며 이는 성능에 악영향을 미칠 수 있다.In addition, when the POSTFIX HTM fails to process a transaction in the first transaction processing technique ('RH-STM'), all threads are put in a waiting state to reflect the value directly in memory, which may adversely affect performance.

이러한 점을 고려하여, 상기 트랜잭션 처리 시스템은, 제1 트랜잭션 처리 기법('RH-STM')에 따라 트랜잭션을 처리하는 동안, POSTFIX HTM에서 메모리 용량 초과에 따른 중지(capacity abort) 발생 비율이 70% 이상이면, B 조건에 따라, 트랜잭션의 크기와 상관없이 병렬 수행이 가능한 제2 트랜잭션 처리 기법('NOrec-STM')으로 전환하여 상기 트랜잭션을 처리할 수 있다.In view of this, while the transaction processing system processes the transaction according to the first transaction processing technique ('RH-STM'), the rate of occurrence of capacity abort in the POSTFIX HTM exceeds 70%. According to the condition B, the transaction may be processed by switching to a second transaction processing technique ('NOrec-STM') capable of parallel execution regardless of the size of the transaction.

상기 A, B 조건에 모두 해당하지 않을 경우, 상기 트랜잭션 처리 시스템은, 제1 트랜잭션 처리 기법('RH-STM')을 유지한 상태로 트랜잭션을 처리할 수 있다(C 조건).If the conditions A and B do not correspond, the transaction processing system may process the transaction while maintaining the first transaction processing technique 'RH-STM' (C condition).

다른 일례로, 제1 트랜잭션 처리 기법('싱글 글로벌 락')에 따라 트랜잭션을 처리 시 트랜잭션을 단일 스레드로 처리하기 때문에 트랜잭션의 크기가 클 경우 대기시간이 길어질 수 있다.As another example, since the transaction is processed as a single thread when the transaction is processed according to the first transaction processing technique ('single global lock'), the latency may be long when the transaction size is large.

이러한 점을 고려하여, 상기 트랜잭션 처리 시스템은, 제1 트랜잭션 처리 기법('싱글 글로벌 락')에 따라 트랜잭션을 처리 시, 현재 스레드에서 메모리 용량 초과에 따른 중지(capacity abort) 발생 비율이 30% 이상 발생할 경우, 보다 빠른 처리를 위해, D 조건에 따라 제2 트랜잭션 처리 기법('RH-STM')으로 전환하여 트랜잭션을 처리할 수 있다.In view of this, the transaction processing system, when processing a transaction according to the first transaction processing technique ('single global lock'), the rate of occurrence of capacity abort in the current thread exceeding 30% or more If so, for faster processing, the transaction can be processed by switching to the second transaction processing technique ('RH-STM') according to the D condition.

또한, 상기 트랜잭션 처리 시스템은, 제1 트랜잭션 처리 기법('싱글 글로벌 락')에 따라 트랜잭션을 처리 시 상기 트랜잭션의 수행 사이클을 측정한 결과, HTM으로 처리될 수 없는 크기를 가질 경우, E 조건에 따라 제2 트랜잭션 처리 기법('NOrec-STM')을 이용하여 큰 트랜잭션을 처리할 수 있다.In addition, the transaction processing system measures an execution cycle of the transaction when processing a transaction according to a first transaction processing technique ('single global lock'), and thus, if the transaction processing system has a size that cannot be processed by HTM, Accordingly, a large transaction can be processed using a second transaction processing technique ('NOrec-STM').

상기 D, E 조건에 모두 해당하지 않을 경우, 상기 트랜잭션 처리 시스템은, 제1 트랜잭션 처리 기법('싱글 글로벌 락')을 유지한 상태로 트랜잭션을 처리할 수 있다(F 조건). If the conditions do not correspond to the D and E conditions, the transaction processing system may process the transaction while maintaining the first transaction processing technique ('single global lock') (F condition).

또 다른 일례로, 상기 트랜잭션 처리 시스템은 제1 트랜잭션 처리 기법('NOrec-STM')에 따라 트랜잭션을 처리 시 읽기(read), 쓰기(write) 명령 세트를 버퍼에 저장하여 처리할 수 있으나, 트랜잭션의 컨텐션(contention) 정도가 높은 경우 반복적으로 충돌 검증(Validation) 단계에서 다른 트랜잭션과 충돌이 감지될 수 있다.As another example, the transaction processing system may store a read and write command set in a buffer to process a transaction according to a first transaction processing technique ('NOrec-STM'), but the transaction may be processed. If the contention level of the transaction is high, collisions with other transactions may be detected repeatedly in the collision validation step.

이러한 점을 고려하여, 상기 트랜잭션 처리 시스템은, 제1 트랜잭션 처리 기법('NOrec-STM')에 따라 트랜잭션을 처리 중, 충돌이 일정 비율(예, '80%') 이상 발생되는 경우, G 조건에 따라 제2 트랜잭션 처리 기법(싱글 글로벌 락)으로 전이하여, 트랜잭션을 안전하게 처리할 수 있다.In view of this, the transaction processing system, when processing a transaction according to the first transaction processing technique ('NOrec-STM'), if a collision occurs more than a certain rate (eg, '80% '), G condition As a result, it can transition to the second transaction processing technique (single global lock), thereby safely processing the transaction.

이때, 상기 트랜잭션 처리 시스템은, 충돌이 일정 비율(예, '20%') 이하로 적게 발생되면, 트랜잭션의 컨텐션(contention) 정도가 낮다고 판단하여 H 조건에 따라 처리 속도가 상대적으로 빠른 제2 트랜잭션 처리 기법('RH-STM')으로 전이하여 트랜잭션을 처리할 수 있다.In this case, when the collision occurs less than a certain ratio (eg, '20% '), the transaction processing system determines that the contention of the transaction is low, and thus the second processing speed is relatively high according to the H condition. Transactions can be processed by transitioning to transaction processing techniques ('RH-STM').

상기 G, H 조건에 모두 해당되지 않을 경우, 상기 트랜잭션 처리 시스템은 제1 트랜잭션 처리 기법('NOrec-STM')을 유지한 상태로 트랜잭션을 처리할 수 있다(I 조건).If the conditions do not correspond to the G and H conditions, the transaction processing system may process a transaction while maintaining the first transaction processing technique ('NOrec-STM') (I condition).

이와 같이, 상기 트랜잭션 처리 시스템은, HTM으로 처리되지 않는 트랜잭션에 대해, RH-STM, NOrec STM 및 싱글 글로벌 락(Single Global Lock) 중 어느 하나의 제1 트랜잭션 처리 기법에 따라 처리하는 동안에도, 트랜잭션의 특성 변화에 부합하는 최적화된 제2 트랜잭션 처리 기법으로 전환해서 처리할 수 있어 트랜잭션의 처리 성능을 보다 높일 수 있다.In this way, the transaction processing system, while processing in accordance with the first transaction processing technique of any one of RH-STM, NOrec STM and Single Global Lock for a transaction that is not processed by HTM, It can be processed by switching to the optimized second transaction processing method corresponding to the characteristic change of the transaction.

도 6은 본 발명의 일실시예에 따른 트랜잭션 처리 시스템에서, 멀티 코어 환경에서의 HTM 및 STM 간의 동시성 제어 기법을 설명하기 위한 도면이다.FIG. 6 is a diagram illustrating a concurrency control technique between an HTM and an STM in a multi-core environment in a transaction processing system according to an embodiment of the present invention.

도 6을 참조하면, 본 발명의 일실시예에 따른 트랜잭션 처리 시스템은, Lite HTM에서 우선적으로 트랜잭션을 처리하고, Lite HTM으로 처리할 수 없는 트랜잭션에 대해 특성 분석에 기반하여 RH-STM, NOrec-STM 및 싱글 글로벌 락 중 어느 하나의 제1 트랜잭션 처리 기법에 따라 처리할 수 있다.Referring to FIG. 6, a transaction processing system according to an embodiment of the present invention may process a transaction in Lite HTM preferentially, and RH-STM and NOrec- based on a characteristic analysis for a transaction that cannot be processed by Lite HTM. Processing may be performed according to the first transaction processing technique of either the STM or the single global lock.

이때, 상기 트랜잭션 처리 시스템은, 멀티 코어 환경에서 서로 다른 스레드가 트랜잭션을 처리 시, 공유 메모리로서 HTM 및 STM이 결합된 하이브리드 트랜잭셔널 메모리를 이용하는 경우, 글로벌 클락(global clock) 및 락(Lock) 기반의 효율적인 동시성 제어 기법을 통해, 서로 다른 스레드 사이에서 Lite HTM, RH-STM, NOrec-STM 및 싱글 글로벌 락과 같은 각 트랜잭션 처리 기법이 동시에 수행될 수 있도록 제어하여, 트랜잭션의 처리 성능을 향상시킬 수 있다.In this case, the transaction processing system is a global clock and lock when different threads use a hybrid transactional memory in which HTM and STM are combined as a shared memory when processing a transaction in a multi-core environment. Based on efficient concurrency control techniques, each transaction processing technique such as Lite HTM, RH-STM, NOrec-STM, and a single global lock can be executed simultaneously between different threads to improve transaction processing performance. Can be.

일례로, 도 6에 도시된 것처럼, STM에서 변수 x의 값을 5로 변경할 경우(Line 1), HTM은 공유 메모리인 하이브리드 트랜잭셔널 메모리에서 변수 x의 변경된 값을 독출할 수 있는 반면, 변수 y의 기존의 값을 그대로 독출하기 때문에, 트랜잭션의 일관성이 깨질 수 있다.For example, as shown in FIG. 6, when the value of the variable x is changed to 5 in the STM (Line 1), the HTM may read the changed value of the variable x in the hybrid transactional memory, which is shared memory, while the variable is read. Since the existing value of y is read as is, transaction consistency may be broken.

또한, 멀티 코어 환경에서 서로 다른 스레드 사이에서 Lite HTM, RH-STM, NOrec-STM 및 싱글 글로벌 락과 같은 각 트랜잭션 처리 기법이 동시에 수행될 경우 각 기법에 따라 트랜잭션을 처리하는 속도가 다르기 때문에 불필요한 충돌이 발생할 수 있다.In addition, when multiple transaction processing techniques such as Lite HTM, RH-STM, NOrec-STM, and a single global lock are executed at the same time between different threads in a multi-core environment, unnecessary collisions may occur because the speed of processing transactions varies depending on each technique. This can happen.

상기 트랜잭션 처리 시스템은, 멀티 코어 환경에서 발생되는 상술한 HTM 및 STM 간의 동시성 제어 문제를 효율적으로 제어하기 위해, 글로벌 클락(global clock)과 두 가지 종류의 락(Lock) 변수(mutex Lock, commit Lock)을 사용하여, 4가지 트랜잭션 처리 기법('HTM', 'RH-STM', 'NOrec-STM', '싱글 글로벌 락')의 일관성 수행을 보장할 수 있다. 이때, 'NOrec-STM'의 경우, 상기 트랜잭션 처리 시스템은 기존의 버퍼 방식을 사용하여 다른 트랜잭션 처리 기법과의 동시성 수행을 보장할 수 있다. The transaction processing system may include a global clock and two types of lock variables (mutex lock and commit lock) in order to efficiently control the above-described concurrency control problem between the HTM and STM occurring in a multi-core environment. Can be used to ensure the consistency of the four transaction processing techniques ('HTM', 'RH-STM', 'NOrec-STM', 'Single Global Lock'). In this case, in the case of 'NOrec-STM', the transaction processing system may guarantee the concurrency with other transaction processing techniques using an existing buffer scheme.

구체적으로, 상기 트랜잭션 처리 시스템은, 모든 트랜잭션 처리 기법('HTM', 'RH-STM', 'NOrec-STM', '싱글 글로벌 락')에서 트랜잭션을 처리 시, 공유 메모리(하이브리드 트랜잭셔널 메모리)에 쓰기(write)를 수행한 후에 글로벌 클락(global clock)을 업데이트 할 수 있다. 이를 통해, 다른 스레드에서 글로벌 클락의 변경을 통해, 공유 메모리의 쓰기(write) 발생을 감지할 수 있다.Specifically, the transaction processing system, when processing transactions in all transaction processing techniques ('HTM', 'RH-STM', 'NOrec-STM', 'single global lock'), shared memory (hybrid transactional memory) You can update the global clock after writing to the. By doing so, it is possible to detect the occurrence of a write of the shared memory by changing the global clock in another thread.

또한, 상기 트랜잭션 처리 시스템은, 트랜잭션 처리 기법 중 '싱글 글로벌 락'에 따라 트랜잭션을 처리 시, 제1 락 변수('mutex Lock')를 설정하여, HTM을 강제로 대기상태로 전환할 수 있다.In addition, the transaction processing system may set the first lock variable 'mutex lock' when the transaction is processed according to the 'single global lock' among the transaction processing techniques, thereby forcing the HTM to enter the standby state.

또한, 상기 트랜잭션 처리 시스템은, 트랜잭션 처리 기법 중 'Lite HTM' 또는 RH-STM'에 따라 트랜잭션을 처리 시, 상기 제1 락 변수('mutex Lock') 검사를 통해 '싱글 글로벌 락'이 타 스레드에서 수행 중인지 확인 가능하게 할 수 있다.In addition, the transaction processing system, when processing the transaction according to the 'Lite HTM' or RH-STM of the transaction processing techniques, the 'single global lock' through other threads through the 'mutex lock' check You can make sure that is running on.

또한, 상기 트랜잭션 처리 시스템은, 트랜잭션 처리 기법 중 STM에서 정상 종료(commit)할 때 사용되는 제2 락 변수('commit Lock')를 설정하여, 서로 다른 스레드에서 동시에 정상 종료(commit)하는 것을 방지할 수 있다.In addition, the transaction processing system sets a second lock variable 'commit lock' which is used when the STM commits normally in the transaction processing scheme, thereby preventing a normal commit from different threads at the same time. can do.

이와 같이, 상기 트랜잭션 처리 시스템은, 글로벌 클락(global clock) 및 락(Lock) 기반의 효율적인 동시성 제어 기법을 통해, 멀티 코어 환경에서 서로 다른 스레드에 의해 수행되는 각 트랜잭션 사이의 충돌을 효과적으로 방지할 수 있다.As such, the transaction processing system may effectively prevent collisions between transactions executed by different threads in a multi-core environment through an efficient concurrency control technique based on a global clock and a lock. have.

도 7은 본 발명의 일실시예에 따른 트랜잭션 처리 시스템에서, 동시성 제어 기법을 적용한 HTM 알고리즘의 일례를 도시한 도면이다.7 is a diagram illustrating an example of an HTM algorithm to which a concurrency control technique is applied in a transaction processing system according to an embodiment of the present invention.

도 7을 참조하면, 본 발명의 일실시예에 따른 트랜잭션 처리 시스템은, HTM을 이용하여 트랜잭션을 처리 시, 락(Lock) 검사를 통해 메모리 충돌 가능성을 확인하여, 트랜잭션을 정상 종료(commit) 할 수 있다.Referring to FIG. 7, when a transaction processing system according to an embodiment of the present invention is processed using HTM, a transaction check may be performed to determine a possibility of memory collision through a lock check, and the transaction may be normally terminated. Can be.

상기 트랜잭션 처리 시스템은, HTM을 이용하여 트랜잭션을 처리 시, 다른 스레드에서 싱글 글로벌 락이 수행 중인지 확인하기 위해, 제1 락 변수('mutex_Lock')를 검사할 수 있다. 즉, 상기 트랜잭션 처리 시스템은, 제1 락 변수('mutex_Lock')가 설정되어 있는 경우 상기 HTM을 중단할 수 있다(Line 1).When processing a transaction using the HTM, the transaction processing system may check the first lock variable 'mutex_Lock' to determine whether a single global lock is being executed by another thread. That is, the transaction processing system may stop the HTM when the first lock variable 'mutex_Lock' is set (Line 1).

상기 트랜잭션 처리 시스템은, 동시에 수행 중인 STM이 있는지 검사하고 (Line 2), 제2 락 변수('commit_Lock')를 검사하여 STM이 정상 종료(commit)인지 확인할 수 있다.The transaction processing system may check whether there is an STM running at the same time (Line 2) and check the second lock variable 'commit_Lock' to determine whether the STM is normally terminated.

상기 트랜잭션 처리 시스템은 제2 락 변수('commit_Lock')가 설정되어 있지 않으면, 상기 HTM을 중단하고(Line 3), 다른 스레드에서 정상 종료(commit)하고 있지 않다면, 글로벌 클락('global_clock')을 업데이트 한 후(Line 4), 상기 HTM을 정상 종료할 수 있다(Line 5).The transaction processing system suspends the HTM if the second lock variable 'commit_Lock' is not set (Line 3), and sets a global clock ('global_clock') if it is not normally committed by another thread. After updating (Line 4), the HTM can be shut down normally (Line 5).

도 8은 본 발명의 일실시예에 따른 트랜잭션 처리 시스템에서, 동시성 제어 기법을 적용한 싱글 글로벌 락(SGL) 알고리즘의 일례를 도시한 도면이다.8 is a diagram illustrating an example of a single global lock (SGL) algorithm to which a concurrency control technique is applied in a transaction processing system according to an embodiment of the present invention.

도 8을 참조하면, 본 발명의 일실시예에 따른 트랜잭션 처리 시스템은, 싱글 글로벌 락(SGL)을 이용하여 트랜잭션을 처리 시, HTM을 강제로 대기상태로 전환하는 제1 락 변수('mutex_Lock')와, RH-STM 및 NOrec-STM의 커밋(commit)을 방지하는 제2 락 변수('commit_Lock')를 보유한 상태에서 트랜잭션 처리를 수행하고, 글로벌 클락(global clock)을 업데이트 하여, 상기 트랜잭션의 처리에 따른 하이브리드 트랜잭셔널 메모리(HyTM)의 수정을 타 스레드에 알릴 수 있다.Referring to FIG. 8, in a transaction processing system according to an embodiment of the present invention, when a transaction is processed using a single global lock (SGL), the first lock variable 'mutex_Lock' forcing the HTM to enter a standby state. ) And a second lock variable ('commit_Lock') that prevents the commit of RH-STM and NOrec-STM, and performs transaction processing, updates a global clock, and The other thread can be notified of the modification of the hybrid transactional memory (HyTM) according to the processing.

상기 트랜잭션 처리 시스템은, SGL_begin_currency 알고리즘('Begin')과 SGL_Commit_currency 알고리즘('싱글 글로벌 락 트랜잭션')을 수행 함으로써, 싱글 글로벌 락(SGL) 기법에 따라 트랜잭션을 처리, 커밋할 수 있다.The transaction processing system may process and commit a transaction according to a single global lock (SGL) technique by performing the SGL_begin_currency algorithm ('Begin') and the SGL_Commit_currency algorithm ('single global lock transaction').

먼저, 상기 트랜잭션 처리 시스템은 SGL_begin_currency 알고리즘을 통해 제2 락 변수('commit_Lock')를 검사하여, 커밋 중인 STM이 존재하는지 확인할 수 있다(Line 1).First, the transaction processing system may check whether the STM being committed exists by checking the second lock variable 'commit_Lock' through the SGL_begin_currency algorithm (Line 1).

제2 락 변수('commit_Lock')가 설정되어 커밋 중인 STM이 존재할 경우, 상기 트랜잭션 처리 시스템은, 싱글 글로벌 락(SGL)을 이용한 트랜잭션 처리를 대기할 수 있다(Line 2).If there is an STM that is being committed due to a second lock variable 'commit_Lock' being set, the transaction processing system may wait for transaction processing using a single global lock (SGL) (Line 2).

제2 락 변수('commit_Lock')가 설정 해제되어 커밋 중인 STM이 존재하지 않을 경우, 상기 트랜잭션 처리 시스템은, 다른 스레드에서 STM 처리에 따른 공유 메모리(HyTM) 접근을 방지하기 위해 제2 락 변수('commit_Lock')를 설정할 수 있다(Line 3).When the second lock variable 'commit_Lock' is unset and there is no committing STM, the transaction processing system may prevent the second lock variable (HyTM) from being accessed by another thread according to the STM process. 'commit_Lock') can be set (Line 3).

또한, 상기 트랜잭션 처리 시스템은, 제1 락 변수('mutex_Lock')를 설정하여 HTM을 대기 상태로 전환 함으로써, HTM과 싱글 글로벌 락(SGL)의 처리에 따른 충돌을 방지할 수 있다(Line 4).In addition, the transaction processing system may set the first lock variable 'mutex_Lock' to put the HTM in a standby state, thereby preventing a collision due to the processing of the single global lock (SGL) and the HTM (Line 4). .

상기 트랜잭션 처리 시스템은, 제1 및 제2 락 변수('mutex_Lock' 및 'commit_Lock')를 설정한 상태에서, 싱글 글로벌 락(SGL)을 통해 트랜잭션을 처리할 수 있다(Line 5).The transaction processing system may process a transaction through a single global lock (SGL) while setting the first and second lock variables 'mutex_Lock' and 'commit_Lock' (Line 5).

이후, 상기 트랜잭션 처리 시스템은, SGL_Commit_currency 알고리즘을 통해 제1 및 제2 락 변수('mutex_Lock' 및 'commit_Lock')를 모두 설정 해제(Lock 해제)하고, 공유 메모리인 하이브리드 트랜잭셔널 메모리(HyTM)의 업데이트를 다른 스레드에서도 알 수 있도록 글로벌 클락을 업데이트 할 수 있다(Line 6~8).Thereafter, the transaction processing system releases (unlocks) all of the first and second lock variables 'mutex_Lock' and 'commit_Lock' through the SGL_Commit_currency algorithm, and the shared transactional memory (HyTM) of the shared memory. You can update the global clock so that updates are known to other threads (Lines 6-8).

도 9는 본 발명의 일실시예에 따른 트랜잭션 처리 시스템에서, 동시성 제어 기법을 적용한 RH-STM 알고리즘의 일례를 도시한 도면이다.9 is a diagram illustrating an example of an RH-STM algorithm to which a concurrency control technique is applied in a transaction processing system according to an embodiment of the present invention.

도 9를 참조하면, 본 발명의 일실시예에 따른 트랜잭션 처리 시스템은, RH-STM을 이용하여 트랜잭션을 처리 시, STM 내에 삽입된 일부분의 HTM, 즉 'PREFIX HTM' 및 'POSTFIX HTM'의 구동 여부를 확인하여, Lock 검사 및 글로벌 클락(global clock) 검사를 수행할 수 있다.Referring to FIG. 9, in the transaction processing system according to an embodiment of the present invention, when processing a transaction using the RH-STM, a part of the HTM inserted into the STM, that is, 'PREFIX HTM' and 'POSTFIX HTM' are driven. The lock check and the global clock check can be performed by checking the status.

상기 트랜잭션 처리 시스템은, Begin 알고리즘(Line 1 내지 6)과, RH-STM을 통한 트랜잭션 처리 알고리즘(Line 7 내지 16) 및 Commit 알고리즘(Line 17 내지 28)을 수행 함으로써, RH-STM 기법에 따라 트랜잭션을 처리, 커밋할 수 있다.The transaction processing system performs a transaction according to the RH-STM technique by performing a Begin algorithm (Lines 1 to 6), a transaction processing algorithm (Line 7 to 16) and a Commit algorithm (Lines 17 to 28) through RH-STM. Can be processed and committed.

먼저, 상기 트랜잭션 처리 시스템은, Begin 알고리즘을 통해, 'Prefix HTM'이 실행 가능한지 검사하고, 실행 가능하다면 'Prefix HTM'을 통해 트랜잭션을 처리한다(Line 1).First, the transaction processing system checks whether the 'Prefix HTM' is executable through the Begin algorithm, and processes the transaction through the 'Prefix HTM' if possible (Line 1).

'Prefix HTM'이 실행 가능하지 않을 경우, 상기 트랜잭션 처리 시스템은, STM을 이용하여 트랜잭션을 처리하고, 충돌 검사를 위해 글로벌 클락(global clock)을 로컬 클락(Local clock)에 저장할 수 있다(Line 3). 또한, 상기 트랜잭션 처리 시스템은, STM의 실행 여부를 HTM이 식별할 수 있도록 in-flight STM 변수를 증가시키고(Line 4), 제2 락 변수('commit_Lock')를 검사하여 다른 스레드에서 커밋 중인지 확인한다(Line 5). 제2 락 변수('commit_Lock')가 해제되어 커밋 중인 스레드가 없다면, 상기 트랜잭션 처리 시스템은, STM을 이용하여 트랜잭션을 처리한다(Line 6).If 'Prefix HTM' is not feasible, the transaction processing system may process the transaction using STM and store a global clock in the local clock for collision checking (Line 3). ). In addition, the transaction processing system increments the in-flight STM variable (Line 4) so that the HTM can identify whether the STM is running or not, and checks that the second lock variable ('commit_Lock') is being committed in another thread. (Line 5) If there is no thread that is committing because the second lock variable 'commit_Lock' is released, the transaction processing system processes the transaction using STM (Line 6).

다음으로, 상기 트랜잭션 처리 시스템은, RH-STM을 통한 트랜잭션 처리 알고리즘에서 읽기(read) 함수와 쓰기(write) 함수를 통해, 트랜잭션의 읽기(read) 및 쓰기(write)를 수행할 수 있다.Next, the transaction processing system may read and write a transaction through a read function and a write function in a transaction processing algorithm through RH-STM.

상기 트랜잭션 처리 시스템은, 읽기(read) 함수를 수행하여 'prefix HTM'이 현재 구동 중인지 확인하고, 'prefix HTM'이 구동하고 있다면 캐시 일관성 프로토콜 기반의 동시성 제어가 가능하기 때문에 별도의 과정 없이 트랜잭션의 읽기(read) 명령을 수행할 수 있다(Line 7).The transaction processing system checks whether 'prefix HTM' is currently running by performing a read function, and if 'prefix HTM' is running, the concurrency control based on cache coherency protocol is possible, so that the transaction processing is not performed. You can execute the read command (Line 7).

'prefix HTM'이 현재 구동하고 있지 않을 경우, 상기 트랜잭션 처리 시스템은, STM을 이용해 트랜잭션을 처리하고, 글로벌 클락(global clock)의 변화를 확인하여, 글로벌 클락이 다른 스레드에 의해 다른 값으로 업데이트 될 경우, 상기 STM을 통한 트랜잭션 처리를 중단할 수 있다(Line 8~9).If 'prefix HTM' is not currently running, the transaction processing system will use STM to process the transaction and check the change of the global clock so that the global clock will be updated with a different value by another thread. In this case, transaction processing through the STM may be stopped (Lines 8-9).

글로벌 클락의 값이 유지되어 STM을 통해 트랜잭션을 처리하는 동안, 최초의 쓰기 함수('Fitst_write')가 시도되면, 트랜잭션의 읽기(read) 명령을 처리 중이던 'prefix_HTM'을 커밋(commit)하고(Line 10), 'postfix_HTM'으로 전환하여 읽기(read) 및 쓰기(write) 명령 세트를 수행할 수 있다(Line 11).While the value of the global clock is maintained and the transaction is processed through STM, if the first write function ('Fitst_write') is attempted, it commits 'prefix_HTM' that was processing the transaction's read command (Line) 10) You can switch to 'postfix_HTM' to perform a set of read and write commands (Line 11).

이때, 'postfix_HTM'이 구동되지 않을 경우, 상기 트랜잭션 처리 시스템은, 제2 락 변수('commit_Lock')를 검사하여 다른 스레드에서 커밋 중인지 Lock 검사하고(Line 15), 안전한 처리를 위해, 제2 락 변수('commit_Lock')를 설정하여 HTM을 대기 상태로 전환하고, 제1 락 변수('mutex_Lock')를 통해 STM을 커밋 불가능한 상태로 전환할 수 있다(Line 14~16).In this case, when the 'postfix_HTM' is not driven, the transaction processing system checks the second lock variable 'commit_Lock' to check whether it is being committed by another thread (Line 15), and for the secure processing, the second lock A variable 'commit_Lock' may be set to switch the HTM to a standby state, and the STM may be uncommitted through the first lock variable 'mutex_Lock' (Lines 14 to 16).

끝으로, 상기 트랜잭션 처리 시스템은, Commit 알고리즘을 통해, RH-STM 내에서 트랜잭션을 처리하고 있는 기법에 따라 다른 커밋을 수행할 수 있다.Finally, the transaction processing system, through the Commit algorithm, may perform different commits according to the technique of processing a transaction in the RH-STM.

예를 들어, RH-STM 내부의 'prefix_HTM'으로 트랜잭션의 수행이 완료되었다면, 이는 read-only 트랜잭션이므로, 상기 트랜잭션 처리 시스템은, HTM을 종료할 수 있다(Line 17~18).For example, if the execution of the transaction is completed in 'prefix_HTM' inside the RH-STM, since the transaction is a read-only transaction, the transaction processing system may terminate the HTM (Lines 17-18).

또는, RH-STM 내부의 'postfix HTM'으로 트랜잭션의 수행이 완료되었다면, 상기 트랜잭션 처리 시스템은, STM 처리하는 다른 스레드에서 공유 메모리(HyTM)의 변화를 식별할 수 있도록 글로벌 클락(global clock)의 값을 증가시킨 후, 트랜잭션을 커밋할 수 있다(Line 19~22).Or, if the execution of the transaction is completed in the 'postfix HTM' inside the RH-STM, the transaction processing system, the global clock of the global clock (HyTM) to identify the change in the shared memory (HyTM) in the other thread processing STM After increasing the value, the transaction can be committed (Lines 19-22).

또는, RH-STM 내부의 'STM'으로 트랜잭션이 완료되었다면, 제1 락 변수('mutex_Lock') 및 제2 락 변수('commit Lock')를 설정 해제하고,Alternatively, if the transaction is completed with 'STM' in the RH-STM, the first lock variable 'mutex_Lock' and the second lock variable 'commit Lock' are unset,

STM 처리하는 다른 스레드에서 공유 메모리(HyTM)의 변화를 식별할 수 있도록 글로벌 클락(global clock)의 값을 증가시킬 수 있다(Line 23~28).You can increase the value of the global clock to identify changes in shared memory (HyTM) in other threads that handle STM (Lines 23-28).

도 10은 본 발명의 일실시예에 따른 트랜잭션 처리 시스템에서, 동시성 제어 기법을 적용한 NOrec-STM 알고리즘의 일례를 도시한 도면이다.FIG. 10 is a diagram illustrating an example of a NOrec-STM algorithm to which a concurrency control technique is applied in a transaction processing system according to an embodiment of the present invention.

도 10을 참조하면, 본 발명의 일실시예에 따른 트랜잭션 처리 시스템은, NOrec-STM을 이용하여 트랜잭션을 처리 시, 읽기(read) 및 쓰기(write) 명령 세트를 버퍼에 저장하고, 커밋(commit)하기 전에 글로벌 클락(global clock)의 변화를 검사하여, 공유 메모리와 버퍼 간의 비교를 통해 충돌 여부를 검사할 수 있다.Referring to FIG. 10, a transaction processing system according to an embodiment of the present invention stores a read and write instruction set in a buffer and commits when processing a transaction using NOrec-STM. You can check for changes in the global clock before checking for collisions by comparing shared memory and buffers.

상기 트랜잭션 처리 시스템은, Begin 알고리즘(Line 1 내지 3)과, 검증 단계(validation phase 알고리즘)(Line 4 내지 8) 및 Commit 알고리즘(Line 9 내지 12)을 수행 함으로써, NOrec-STM 기법에 따라 트랜잭션을 처리, 커밋할 수 있다.The transaction processing system executes a transaction according to the NOrec-STM technique by performing a Begin algorithm (Line 1 to 3), a validation phase algorithm (Line 4 to 8), and a Commit algorithm (Line 9 to 12). Can be processed and committed.

먼저, 상기 트랜잭션 처리 시스템은, Begin 알고리즘을 수행하여, 글로벌 클락(global clock)의 변화 감지를 위해 상기 글로벌 클락을 로컬 클락(Local clock)에 저장하고(Line 1), HTM에서 STM의 실행 여부를 HTM이 식별할 수 있도록 in-flight STM 변수를 증가시킨 후 NOrec-STM 기법에 따라 트랜잭션을 처리할 수 있다(Line 2~3).First, the transaction processing system performs a begin algorithm, and stores the global clock in the local clock (Line 1) to detect the change in the global clock (Line 1), and whether the STM is executed in the HTM. The transaction can be processed according to the NOrec-STM technique after increasing the in-flight STM variable so that HTM can identify it (Line 2 ~ 3).

다음으로, 상기 트랜잭션 처리 시스템은, 커밋하기 전, 공유 메모리와 버퍼 사이에서 충돌이 발생했는지 여부를 검사하기 위해 validation phase 알고리즘을 수행하여, 제2 락 변수('commit_Lock')가 설정되어 있는 동안, 글로벌 클락의 값이 변경되지 않고 로컬 클락(Local clock)의 값과 일치하는지 검사할 수 있다(Line 5).Next, the transaction processing system performs a validation phase algorithm to check whether there is a conflict between the shared memory and the buffer before committing, while the second lock variable 'commit_Lock' is set, You can check that the value of the global clock does not change and matches the value of the local clock (Line 5).

상기 트랜잭션 처리 시스템은, 글로벌 클락의 값이 로컬 클락의 값과 일치하지 않고, 공유 메모리의 값과 버퍼의 값이 불일치하면, 트랜잭션 처리를 중단하고(Line 6~7), 로컬 클락의 값을 새로운 글로벌 클락의 값으로 업데이트 하여, 다른 스레드에서 HTM 처리를 통한 커밋이 진행되는 것을 방지할 수 있다(Line 8).If the value of the global clock does not match the value of the local clock, and the value of the shared memory and the value of the buffer do not match, the transaction processing system stops the transaction processing (Lines 6 to 7) and resets the value of the local clock. By updating it with the value of the global clock, you can prevent other threads from committing through HTM processing (Line 8).

또한, 상기 트랜잭션 처리 시스템은, Commit 알고리즘을 수행하여 제2 락 변수('commit_Lock')를 설정하고, 커밋(commit)을 수행할 수 있다(Line 9~10).In addition, the transaction processing system may perform a Commit algorithm to set a second lock variable 'commit_Lock' and perform a commit (Lines 9 to 10).

상기 커밋이 완료되면, 상기 트랜잭션 처리 시스템은, 제2 락 변수('commit_Lock')를 설정 해제하고 in-flight STM 변수를 감소시킬 수 있다(Line 11~12).When the commit is completed, the transaction processing system may release the second lock variable 'commit_Lock' and decrease the in-flight STM variable (Lines 11-12).

이하, 도 11에서는 본 발명의 실시예들에 따른 트랜잭션 처리 시스템(100)의 작업 흐름을 상세히 설명한다.Hereinafter, FIG. 11 will be described in detail the workflow of the transaction processing system 100 according to the embodiments of the present invention.

도 11은 본 발명의 일실시예에 따른 트랜잭션 처리 방법의 순서를 도시한 흐름도이다.11 is a flowchart illustrating a procedure of a transaction processing method according to an embodiment of the present invention.

본 실시예에 따른 트랜잭션 처리 방법은 상술한 트랜잭션 처리 시스템(100)에 의해 수행될 수 있다.The transaction processing method according to the present embodiment may be performed by the transaction processing system 100 described above.

도 11을 참조하면, 단계(1110)에서, 트랜잭션 처리 시스템(100)은, 이전에 처리된 이전 트랜잭션에 관한 트랜잭션 정보를 기반으로, 개시 명령된 트랜잭션에 대한 크기, 컨텐션(contention) 정도 및 연속 발생된 쓰기(write) 횟수 중 적어도 하나의 특성을 분석한다.Referring to FIG. 11, at step 1110, the transaction processing system 100 may, based on transaction information about a previously processed transaction, size, contention, and continuity for the initiated transaction. At least one characteristic of the number of writes generated is analyzed.

즉, 트랜잭션 처리 시스템(100)은 폴백 경로 테이블에 저장된 이전에 처리된 트랜잭션의 정보를 기반으로, HTM(Lite HTM)으로 처리되지 못한 현재의 트랜잭션의 특성을 파악할 수 있다.That is, the transaction processing system 100 may grasp characteristics of a current transaction that is not processed by Lite HTM based on information of previously processed transactions stored in the fallback path table.

여기서, 폴백 경로 테이블(폴백 패스 테이블)은, 이전에 처리된 트랜잭션의 특성을 분석하여, 최적의 트랜잭션 처리 기법을 선정하기 위한 메타 데이터를 포함할 수 있다.Here, the fallback path table (fallback path table) may include metadata for selecting an optimal transaction processing technique by analyzing characteristics of a previously processed transaction.

단계(1120)에서, 트랜잭션 처리 시스템(100)은, HTM(Hardware Transactional Memory)을 제외한, RH-STM, NOrec STM 및 싱글 글로벌 락(Single Global Lock)을 포함하는 트랜잭션 처리 기법 중에서, 상기 특성에 부합하는 어느 하나의 제1 트랜잭션 처리 기법을 선정한다.In step 1120, transaction processing system 100 meets the above characteristics among transaction processing techniques including RH-STM, NOrec STM and Single Global Lock, except for Hardware Transactional Memory (HTM). Select one of the first transaction processing schemes.

즉, 트랜잭션 처리 시스템(100)은, 상기 HTM에 의해 처리되지 못한 트랜잭션에 대해, 현재의 특성(크기(길이), 컨텐션 정도 및 연속 발생된 쓰기(write) 횟수 등)에 부합하는 최적의 제1 트랜잭션 처리 기법을, RH-STM, NOrec STM 및 싱글 글로벌 락 중에서 선정하고, 상기 제1 트랜잭션 처리 기법에 해당하는 폴백 경로를, Lite HTM 처리 모듈에 제공할 수 있다.In other words, the transaction processing system 100, for the transactions that were not processed by the HTM, the optimal product corresponding to the current characteristics (size (length), contention degree and the number of consecutive writes, etc.) One transaction processing scheme may be selected from RH-STM, NOrec STM, and single global lock, and a fallback path corresponding to the first transaction processing scheme may be provided to the Lite HTM processing module.

단계(1130)에서, 트랜잭션 처리 시스템(100)은, 선정된 상기 제1 트랜잭션 처리 기법에 기초하여, 상기 트랜잭션을 처리한다.In step 1130, the transaction processing system 100 processes the transaction based on the selected first transaction processing technique.

즉, 트랜잭션 처리 시스템(100)은, 설정된 재시도 횟수 이내에서, 상기 HTM을 이용한 처리가 이루어지지 않는 트랜잭션에 대해, 현재의 특성에 적합한 제1 트랜잭션 처리 기법에 해당하는 폴백 경로로 상기 트랜잭션을 이동시켜 처리할 수 있다.That is, the transaction processing system 100 moves the transaction to a fallback path corresponding to the first transaction processing scheme suitable for the current characteristic, for a transaction that is not processed using the HTM within a set number of retries. Can be treated.

또한, 트랜잭션 처리 시스템(100)은, HTM으로 처리되지 못하는 트랜잭션에 대해, 상기 폴백 경로 테이블을 참조하여, 제1 트랜잭션 처리 기법에 따라 트랜잭션을 처리 중에 변경된 트랜잭션의 특성에 최적화된 제2 트랜잭션 처리 기법으로 트랜잭션을 처리하여, 트랜잭션의 처리 성능을 높일 수 있다.Also, the transaction processing system 100 may refer to the fallback path table for a transaction that cannot be processed by the HTM and refer to the fallback path table. The second transaction processing technique optimized for the characteristics of the transaction changed during the processing according to the first transaction processing technique. By processing a transaction, you can increase the transaction performance.

또한, 트랜잭션 처리 시스템(100)은, 멀티 코어 환경에서 서로 다른 스레드에 의해 수행되는 각 트랜잭션 간의 충돌 방지를 위해, 글로벌 클락(global clock)과 락(Lock) 기반으로 동시성 제어를 수행할 수 있다.In addition, the transaction processing system 100 may perform concurrency control based on a global clock and a lock to prevent collision between transactions executed by different threads in a multi-core environment.

즉, 트랜잭션 처리 시스템(100)은, 각 제1 트랜잭션 처리 기법에 따라 처리되는 상기 트랜잭션이 정상 종료(commit)하면, 글로벌 클락(global clock)을 업데이트 하여, 상기 트랜잭션의 처리에 따른 하이브리드 트랜잭셔널 메모리(HyTM)의 수정을 타 스레드에 알리고, 제1 트랜잭션 처리 기법에 따라 제1 락 변수('mutex Lock') 또는 제2 락 변수('commit Lock')를 선택적으로 설정(acquire)/설정 해제하여, 멀티 코어 환경에서 서로 다른 스레드가 각 트랜잭션을 처리할 때 발생될 수 있는 충돌을 효과적으로 방지할 수 있다.That is, the transaction processing system 100 may update a global clock when the transaction processed according to each first transaction processing scheme normally commits, thereby hybridizing the transaction according to the processing of the transaction. Notify other threads of modification of memory (HyTM), and selectively set / unset the first lock variable ('mutex Lock') or the second lock variable ('commit Lock') according to the first transaction processing technique. Thus, in a multi-core environment, conflicts that may occur when different threads process each transaction can be effectively prevented.

이와 같이, 본 발명의 일실시예에 따르면, Lite HTM에서 우선적으로 트랜잭션 처리를 수행하고, Lite HTM으로 처리할 수 없는 트랜잭션에 대해, 길이 및 컨텐션 정도와 같은 특성 분석에 기반하여, RH-STM, NOrec-STM, 싱글 글로벌 락(Single Global Lock) 중 어느 하나의 최적한 트랜잭션 처리 기법에 따라 처리 함으로써, 트랜잭션 처리 성능을 높일 수 있다.As such, according to an embodiment of the present invention, RH-STM based on a characteristic analysis such as length and contention degree for transactions that cannot be processed with Lite HTM and preferentially perform transaction processing in Lite HTM. Transaction processing performance can be improved by processing according to the optimal transaction processing technique of one of the following methods: NOrec-STM and Single Global Lock.

본 발명의 실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 상기된 하드웨어 장치는 실시예의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The method according to an embodiment of the present invention may be implemented in the form of a program command that can be executed through various computer means and recorded in a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, and the like, alone or in combination. The program instructions to be recorded on the medium may be those specially designed and configured for the embodiments or may be available to those skilled in the art of computer software. Examples of computer-readable media include magnetic media such as hard disks, floppy disks and magnetic tape; optical media such as CD-ROMs and DVDs; magnetic media such as floppy disks; Magneto-optical media, and hardware devices specifically configured to store and execute program instructions such as ROM, RAM, flash memory, and the like. Examples of program instructions include machine language code such as those produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter or the like. The hardware devices described above may be configured to operate as one or more software modules to perform the operations of the embodiments, and vice versa.

이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. For example, it is to be understood that the techniques described may be performed in a different order than the described methods, and / or that components of the described systems, structures, devices, circuits, Lt; / RTI > or equivalents, even if it is replaced or replaced.

그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents to the claims are also within the scope of the following claims.

100: 트랜잭션 처리 시스템
110: 분석부
120: 선정부
130: 처리부
140: 제어부
100: transaction processing system
110:
120: selector
130:
140:

Claims (12)

워크로드로부터 트랜잭션이 개시 명령 됨에 따라,
상기 트랜잭션의 이전에 처리된 이전 트랜잭션에 관한 트랜잭션 정보를 기반으로, 상기 트랜잭션의 크기, 컨텐션 정도 및 연속 발생된 쓰기 횟수 중 적어도 하나의 특성을 분석하는 단계;
HTM(Hardware Transactional Memory)을 제외한, RH-STM, NOrec STM 및 싱글 글로벌 락(Single Global Lock)을 포함하는 트랜잭션 처리 기법 중에서, 상기 특성에 부합하는 어느 하나의 제1 트랜잭션 처리 기법을 선정하는 단계;
설정된 재시도 횟수 이내에서, 상기 HTM을 이용한 상기 트랜잭션의 처리가 이루어지지 않으면, 상기 제1 트랜잭션 처리 기법에 해당하는 폴백 경로로 상기 트랜잭션을 이동시켜 처리하는 단계; 및
상기 제1 트랜잭션 처리 기법에 따라, 상기 트랜잭션을 처리하는 동안, 상기 트랜잭션의 특성이 변경되면, 상기 변경되는 특성에 따른 제2 트랜잭션 처리 기법으로 전이하여 상기 트랜잭션을 처리하는 단계
를 포함하고,
상기 제1 트랜잭션 처리 기법을 선정하는 단계는,
상기 트랜잭션의 처리 중 연속 발생된 쓰기 횟수가 임계치에 도달하면,
상기 싱글 글로벌 락을, 상기 제1 트랜잭션 처리 기법으로 선정하는 단계
를 포함하고,
상기 제2 트랜잭션 처리 기법으로 전이하여 상기 트랜잭션을 처리하는 단계는,
ⅰ)상기 싱글 글로벌 락에 따라 트랜잭션을 처리 시, 현재 스레드에서 메모리 용량 초과에 따른 중지(capacity abort) 발생 비율이 일정 비율 이상 발생하면, 상기 RH-STM으로 전이하여 상기 트랜잭션을 처리하는 단계; 또는
ⅱ)상기 싱글 글로벌 락에 따라 트랜잭션을 처리 시, 상기 트랜잭션의 수행 사이클이 상기 HTM으로 처리될 수 없는 크기를 가지게 되면, 상기 NOrec-STM으로 전이하여 상기 트랜잭션을 처리하는 단계; 또는
상기 ⅰ) 또는 ⅱ)를 만족하지 않으면, 상기 싱글 글로벌 락을 유지한 상태로 상기 트랜잭션을 처리하는 단계
를 포함하는 트랜잭션 처리 방법.
As a transaction is initiated from the workload,
Analyzing at least one characteristic of the size of the transaction, the degree of contention, and the number of consecutive writes based on transaction information about a previous transaction previously processed of the transaction;
Selecting any one of the first transaction processing schemes that meets the above characteristics from among transaction processing techniques including RH-STM, NOrec STM, and Single Global Lock, except for Hardware Transactional Memory (HTM);
Moving the transaction to a fallback path corresponding to the first transaction processing method if the transaction is not processed using the HTM within a set number of retries; And
According to the first transaction processing technique, if the characteristic of the transaction is changed while processing the transaction, transitioning to a second transaction processing technique according to the changed characteristic to process the transaction;
Lt; / RTI >
Selecting the first transaction processing method,
If the number of consecutive writes during processing of the transaction reaches a threshold,
Selecting the single global lock as the first transaction processing technique;
Lt; / RTI >
Transitioning to the second transaction processing technique to process the transaction,
Iii) when processing a transaction according to the single global lock, if a rate of occurrence of capacity abort occurs in a current thread more than a predetermined rate, transitioning to the RH-STM to process the transaction; or
Ii) when processing a transaction according to the single global lock, if the execution cycle of the transaction has a size that cannot be processed by the HTM, transitioning to the NOrec-STM to process the transaction; or
If the i) or ii) is not satisfied, processing the transaction with the single global lock held
Transaction processing method comprising a.
제1항에 있어서,
상기 제1 트랜잭션 처리 기법을 선정하는 단계는,
선정된 폴백 경로(fall-back path) 테이블로부터 식별되는 상기 각 트랜잭션 처리 기법과 연관되는 메타 데이터를 이용하여, 상기 특성에 부합하는 상기 제1 트랜잭션 처리 기법을 선정하는 단계
를 더 포함하는 트랜잭션 처리 방법.
The method of claim 1,
Selecting the first transaction processing method,
Selecting the first transaction processing scheme that matches the characteristic using metadata associated with each of the transaction processing techniques identified from the predetermined fall-back path table;
Transaction processing method further comprising.
제1항에 있어서,
상기 제1 트랜잭션 처리 기법을 선정하는 단계는,
상기 트랜잭션의 처리 중 메모리 용량 초과에 따른 중지 발생 비율이 임계치에 도달하면,
상기 RH-STM을, 상기 제1 트랜잭션 처리 기법으로 선정하는 단계
를 더 포함하는 트랜잭션 처리 방법.
The method of claim 1,
Selecting the first transaction processing method,
If the rate of occurrence of a break due to exceeding memory capacity during processing of the transaction reaches a threshold,
Selecting the RH-STM as the first transaction processing technique;
Transaction processing method further comprising.
제1항에 있어서,
상기 제1 트랜잭션 처리 기법을 선정하는 단계는,
상기 트랜잭션의 처리 중 충돌 검증(validation) 시 발생되는 하이브리드 트랜잭셔널 메모리(HyTM)와 버퍼 간의 충돌로 인한 중지 발생 비율이 임계치에 도달하면,
상기 NOrec STM을, 상기 제1 트랜잭션 처리 기법으로 선정하는 단계
를 더 포함하는 트랜잭션 처리 방법.
The method of claim 1,
Selecting the first transaction processing method,
When the rate of occurrence of suspension due to a collision between a hybrid transactional memory (HyTM) and a buffer generated during collision validation during processing of the transaction reaches a threshold,
Selecting the NOrec STM as the first transaction processing technique
Transaction processing method further comprising.
삭제delete 삭제delete 삭제delete 제1항에 있어서,
상기 트랜잭션 처리 방법은,
멀티 코어 환경에서 서로 다른 스레드에 의해 수행되는 각 트랜잭션이 상기 HTM을 이용하여 처리되지 않으면,
상기 각 트랜잭션의 특성을 고려하여 선정되는 각각의 제1 트랜잭션 처리 기법에 기초하여, 상기 각 트랜잭션의 동시 처리를 허용하는 단계
를 더 포함하는 트랜잭션 처리 방법.
The method of claim 1,
The transaction processing method,
If each transaction executed by different threads in a multi-core environment is not processed using the HTM,
Allowing concurrent processing of each transaction based on each first transaction processing technique selected in consideration of the characteristics of each transaction;
Transaction processing method further comprising.
제1항에 있어서,
상기 트랜잭션 처리 방법은,
임의의 스레드에서 상기 제1 트랜잭션 처리 기법에 따라 처리되는 상기 트랜잭션이 정상 종료(commit)하면,
글로벌 클락(global clock)을 업데이트 하여, 상기 트랜잭션의 처리에 따른 하이브리드 트랜잭셔널 메모리(HyTM)의 수정을 타 스레드에 알리는 단계
를 더 포함하는 트랜잭션 처리 방법.
The method of claim 1,
The transaction processing method,
If the transaction processed according to the first transaction processing technique in any thread is normally committed,
Updating a global clock and informing another thread of modification of the hybrid transactional memory (HyTM) according to the processing of the transaction;
Transaction processing method further comprising.
제1항에 있어서,
상기 제1 트랜잭션 처리 기법이 싱글 글로벌 락으로 선정되는 경우,
상기 트랜잭션을 이동시켜 처리하는 단계는,
제1 락 변수('mutex Lock') 및 제2 락 변수('commit Lock')를 설정한 상태에서, 상기 싱글 글로벌 락에 따라 상기 트랜잭션을 처리하는 단계
를 포함하고,
상기 제1 락 변수의 설정은, 상기 HTM을 강제로 대기상태로 전환하는 것과 관련되고,
상기 제2 락 변수의 설정은, RH-STM 또는 NOrec STM에서, 서로 다른 스레드에서 동시에 트랜잭션이 정상 종료(commit)하는 것을 방지하는 것과 관련되는
트랜잭션 처리 방법.
The method of claim 1,
If the first transaction processing scheme is selected as a single global lock,
Moving and processing the transaction,
Processing the transaction according to the single global lock while setting a first lock variable ('mutex lock') and a second lock variable ('commit lock')
Lt; / RTI >
The setting of the first lock variable relates to forcing the HTM to a standby state,
The setting of the second lock variable relates to preventing, in RH-STM or NOrec STM, the transaction from committing normally in different threads at the same time.
Transaction processing method.
워크로드로부터 트랜잭션이 개시 명령 됨에 따라,
상기 트랜잭션의 이전에 처리된 이전 트랜잭션에 관한 트랜잭션 정보를 기반으로, 상기 트랜잭션의 크기, 컨텐션 정도 및 연속 발생된 쓰기 횟수 중 적어도 하나의 특성을 분석하는 분석부;
HTM을 제외한, RH-STM, NOrec STM 및 싱글 글로벌 락을 포함하는 트랜잭션 처리 기법 중에서, 상기 특성에 부합하는 어느 하나의 제1 트랜잭션 처리 기법을 선정하는 선정부; 및
설정된 재시도 횟수 이내에서, 상기 HTM을 이용한 상기 트랜잭션의 처리가 이루어지지 않으면, 상기 제1 트랜잭션 처리 기법에 해당하는 폴백 경로로 상기 트랜잭션을 이동시켜 처리하고, 상기 제1 트랜잭션 처리 기법에 따라, 상기 트랜잭션을 처리하는 동안, 상기 트랜잭션의 특성이 변경되면, 상기 변경되는 특성에 따른 제2 트랜잭션 처리 기법으로 전이하여 상기 트랜잭션을 처리하는 처리부
를 포함하고,
상기 선정부는,
상기 트랜잭션의 처리 중 연속 발생된 쓰기 횟수가 임계치에 도달하면,
상기 싱글 글로벌 락을, 상기 제1 트랜잭션 처리 기법으로 선정하고,
상기 처리부는,
ⅰ)상기 싱글 글로벌 락에 따라 트랜잭션을 처리 시, 현재 스레드에서 메모리 용량 초과에 따른 중지 발생 비율이 일정 비율 이상 발생하면, 상기 RH-STM으로 전이하여 상기 트랜잭션을 처리하거나,
ⅱ)상기 싱글 글로벌 락에 따라 트랜잭션을 처리 시, 상기 트랜잭션의 수행 사이클이 상기 HTM으로 처리될 수 없는 크기를 가지게 되면, 상기 NOrec-STM으로 전이하여 상기 트랜잭션을 처리하거나,
상기 ⅰ) 또는 ⅱ)를 만족하지 않으면, 상기 싱글 글로벌 락을 유지한 상태로 상기 트랜잭션을 처리하는
트랜잭션 처리 시스템.
As a transaction is initiated from the workload,
An analysis unit for analyzing at least one characteristic of the size of the transaction, the degree of contention, and the number of consecutive writes based on transaction information about a previous transaction previously processed;
A selection unit that selects any one of the first transaction processing schemes that meets the above characteristics from among transaction processing techniques including RH-STM, NOrec STM, and single global lock, excluding HTM; And
If the transaction is not processed using the HTM within a set number of retries, the transaction is moved to a fallback path corresponding to the first transaction processing scheme and processed according to the first transaction processing scheme. If a characteristic of the transaction is changed while processing a transaction, the processing unit transitions to a second transaction processing technique according to the changed characteristic to process the transaction.
Lt; / RTI >
The selection unit,
If the number of consecutive writes during processing of the transaction reaches a threshold,
Selecting the single global lock as the first transaction processing scheme,
Wherein,
Iii) When processing a transaction according to the single global lock, if the rate of occurrence of the suspension due to the excess of memory capacity in the current thread exceeds a certain rate, the process transitions to the RH-STM to process the transaction,
Ii) when processing a transaction according to the single global lock, if the execution cycle of the transaction has a size that cannot be processed by the HTM, transition to the NOrec-STM to process the transaction,
If the i) or ii) is not satisfied, processing the transaction while maintaining the single global lock.
Transaction processing system.
삭제delete
KR1020180006959A 2018-01-19 2018-01-19 Method and system for processing transaction KR102007117B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180006959A KR102007117B1 (en) 2018-01-19 2018-01-19 Method and system for processing transaction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180006959A KR102007117B1 (en) 2018-01-19 2018-01-19 Method and system for processing transaction

Publications (2)

Publication Number Publication Date
KR20190088641A KR20190088641A (en) 2019-07-29
KR102007117B1 true KR102007117B1 (en) 2019-08-02

Family

ID=67480707

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180006959A KR102007117B1 (en) 2018-01-19 2018-01-19 Method and system for processing transaction

Country Status (1)

Country Link
KR (1) KR102007117B1 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8683143B2 (en) * 2005-12-30 2014-03-25 Intel Corporation Unbounded transactional memory systems
US8095824B2 (en) * 2009-12-15 2012-01-10 Intel Corporation Performing mode switching in an unbounded transactional memory (UTM) system
GB2522057B (en) * 2014-01-13 2021-02-24 Advanced Risc Mach Ltd A data processing system and method for handling multiple transactions
US9697040B2 (en) * 2014-03-26 2017-07-04 Intel Corporation Software replayer for transactional memory programs
US9971627B2 (en) * 2014-03-26 2018-05-15 Intel Corporation Enabling maximum concurrency in a hybrid transactional memory system

Also Published As

Publication number Publication date
KR20190088641A (en) 2019-07-29

Similar Documents

Publication Publication Date Title
US8402464B2 (en) System and method for managing contention in transactional memory using global execution data
US9430388B2 (en) Scheduler, multi-core processor system, and scheduling method
US8037476B1 (en) Address level log-based synchronization of shared data
US8973004B2 (en) Transactional locking with read-write locks in transactional memory systems
US8914620B2 (en) Method and system for reducing abort rates in speculative lock elision using contention management mechanisms
US20090133032A1 (en) Contention management for a hardware transactional memory
US20070101071A1 (en) Realtime-safe read copy update with per-processor read/write locks
US8302105B2 (en) Bulk synchronization in transactional memory systems
US8543775B2 (en) Preventing unintended loss of transactional data in hardware transactional memory systems
US20040025164A1 (en) Detecting deadlocks in multithreaded programs
CN110675255B (en) Method and apparatus for concurrently executing transactions in a blockchain
KR20200061361A (en) Permission for non-healing transactions after exception mask update command
CN114063922A (en) Method, device, equipment and medium for accelerating replication of master and slave library streams
KR102007117B1 (en) Method and system for processing transaction
US7337274B2 (en) Computer and control method
KR101885030B1 (en) Transaction processing method in hybrid transactional memory system and transaction processing apparatus
CN112035222B (en) Transaction operation merging execution method and device based on log analysis synchronization
US9311260B2 (en) Context preservation during thread level speculative execution
KR102184841B1 (en) Method and device for recovering transaction in hybrid transactional memory
CN113505114A (en) Multi-version concurrency control method of database and database system
CN113127065A (en) Storage and computation integrated program partitioning method and device based on pure missing detection method
KR102150597B1 (en) Method for operating hybrid transactional memory system with optimal retry policy, and hybrid transactional memory system
CN111352860B (en) Garbage recycling method and system in Linux Bcache
CN112148930B (en) Method, system and medium for graph database system transaction processing based on RTM
US10089231B1 (en) Filtering of redundently scheduled write passes

Legal Events

Date Code Title Description
AMND Amendment
E601 Decision to refuse application
AMND Amendment
X701 Decision to grant (after re-examination)
GRNT Written decision to grant