KR20190088641A - Method and system for processing transaction - Google Patents
Method and system for processing transaction Download PDFInfo
- Publication number
- KR20190088641A KR20190088641A KR1020180006959A KR20180006959A KR20190088641A KR 20190088641 A KR20190088641 A KR 20190088641A KR 1020180006959 A KR1020180006959 A KR 1020180006959A KR 20180006959 A KR20180006959 A KR 20180006959A KR 20190088641 A KR20190088641 A KR 20190088641A
- Authority
- KR
- South Korea
- Prior art keywords
- transaction
- transaction processing
- stm
- processing
- htm
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/466—Transaction processing
- G06F9/467—Transactional memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/52—Program synchronisation; Mutual exclusion, e.g. by means of semaphores
- G06F9/526—Mutual 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
Description
본 발명은, 멀티 코어 환경에서 하이브리드 트랜잭셔널 메모리(Hybrid TM, HyTM) 기반의 트랜잭션 처리 기술에 관한 것으로, 트랜잭션의 특성(길이 및 contention 정도)을 고려한 적응적인 하이브리드 트랜잭셔널 메모리 기법을 통해, 트랜잭션 처리 성능을 보다 향상시키기 위한 트랜잭션 처리 방법 및 트랜잭션 처리 시스템에 관한 것이다.The present invention relates to a transaction processing technique based on Hybrid Transaction Memory (Hybrid ™, HyTM) in a multicore environment, and, through an adaptive hybrid transactional memory technique that takes into account transaction characteristics (length and contention degree) And more particularly, to a transaction processing method and a transaction processing system for improving transaction processing performance.
하드웨어 트랜잭셔널 메모리(Hardware Transactional Memory: HTM) 기법이란, 전통적인 병렬 프로그래밍 기법인 락(Lock)을 사용하는 대신, 일련의 코드 블록을 트랜잭션으로서 설정하여 하드웨어를 이용하여 트랜잭션을 처리하는 기법을 지칭할 수 있다.Hardware Transactional Memory (HTM) refers to a technique for processing transactions using hardware by setting a series of code blocks as transactions instead of using the traditional parallel programming technique Lock .
하지만 이러한 HTM 기법은 하드웨어와 CPU 자원을 공유하고 있어 트랜잭션의 처리를 완벽하게 보장하지는 못하는 문제를 가질 수 있다. 이 때문에, HTM을 이용해 처리하지 못하는 트랜잭션에 대해, 폴백 경로(fall-back path)를 마련하여, 소프트웨어 트랜잭셔널 메모리(Software Transactional Memory: STM)을 이용해 처리하는 하이브리드 트랜잭셔널 메모리(Hybrid Transactional Memory: HyTM) 기법에 관해 연구가 이루어지고 있다.However, these HTM techniques share hardware and CPU resources and can not guarantee complete transaction processing. For this reason, Hybrid Transactional Memory (STM), which processes a transaction that can not be processed using the HTM, by providing a fall-back path and processing it using software transactional memory (STM) : HyTM) technique is being studied.
일례로, HTM과 STM 간의 동시성 제어에 필요한 메타 데이터를 최소한으로 사용 함으로써 동시성 제어로 인한 HTM의 성능 저하 정도를 낮추어 트랜잭션의 처리 성능을 높이는 연구가 제안되고 있으나, 이 연구에서는 STM에 대한 폴백 경로를 제공하지는 못하기 때문에 반복적인 충돌을 해결하기 어려우며 지속적인 스레드 대기 상태의 원인이 되는 문제를 가질 수 있다.For example, research has been proposed to reduce the performance degradation of HTM due to concurrency control by minimizing the metadata required for concurrency control between HTM and STM, thereby improving transaction processing performance. However, in this study, It can be difficult to resolve repetitive collisions and have problems that cause persistent thread wait states.
다른 일례로, HTM에서 사용하는 캐시 일관성 프로토콜 정책을 기반하여 STM 내부의 일부분을 HTM으로 처리 함으로써, 동시성 제어를 위한 기법을 필요로 하지 않으므로 STM의 처리 성능 향상을 극대화 한 연구가 제안되고 있으나, 이 연구에서는 동시성 제어 기법이 존재하지 않기 때문에 STM 내의 HTM으로 처리되지 못한 나머지 부분(예를 들어, HTM으로 처리할 수 없는 크기의 트랜잭션)의 경우, 모든 스레드를 대기 상태로 전환한 후에 처리해야 하는 문제점을 가질 수 있다.As another example, a study has been proposed that maximizes the processing performance improvement of STM because it does not require a technique for concurrency control by processing a part of the STM inside HTM based on the cache coherency protocol policy used in HTM. In the research, there is no concurrency control technique. Therefore, in the case of the remaining part that can not be processed by the HTM in the STM (for example, a transaction that can not be handled by the HTM) Lt; / RTI >
이에 따라, 상술한 문제점을 해결하기 위해, HTM으로 처리되지 못하는 트랜잭션에 대해, 해당 트랜잭션의 특성에 최적화된 트랜잭션 처리 기법으로의 폴백 경로를 제공하여 트랜잭션의 처리 성능을 높일 수 있는 적응적인 하이브리드 트랜잭셔널 메모리 기법이 요구되고 있다.Accordingly, in order to solve the above-described problem, an adaptive hybrid transaction which can improve the processing performance of a transaction by providing a fallback path to a transaction processing technique optimized for characteristics of the transaction, Time memory technique is required.
본 발명의 실시예는 이전 트랜잭션의 처리 결과 정보를 폴백 경로 테이블에 저장하고 분석을 통해 트랜잭션의 길이 및 컨텐션(contention) 정도를 파악하여, 현재 수행되는 트랜잭션의 특성에 맞는 폴백 경로(Fall-back path)를 제공 함으로써 각 워크로드의 특성을 반영한 최적의 트랜잭션 처리 기법을 제공하는 것을 목적으로 한다.The embodiment of the present invention stores the process result information of the previous transaction in the fallback path table and analyzes the length and contention of the transaction through the analysis to determine a fallback path according to the characteristics of the currently performed transaction path) to provide an optimal transaction processing technique that reflects the characteristics of each workload.
또한, 본 발명의 실시예는 글로벌 클락(global clock) 및 락(Lock) 기반의 효율적인 동시성 제어 기법을 통해, 멀티 코어 환경에서 서로 다른 스레드 사이에서 Lite HTM, RH-STM, NOrec-STM 및 싱글 글로벌 락과 같은 각 트랜잭션 처리 기법이 동시에 수행될 수 있도록 제어하여, 트랜잭션의 처리 성능을 향상시키는 것을 목적으로 한다.In addition, embodiments of the present invention enable efficient concurrency control based on a global clock and a lock, and can be used in a multi-core environment in which Lite HTM, RH-STM, NOrec-STM, Lock and other transaction processing techniques can be performed simultaneously, thereby improving transaction processing performance.
본 발명의 일실시예에 따른 트랜잭션 처리 방법은, 이전에 처리된 이전 트랜잭션에 관한 트랜잭션 정보를 기반으로, 개시 명령된 트랜잭션에 대한 크기, 컨텐션(contention) 정도 및 연속 발생된 쓰기(write) 횟수 중 적어도 하나의 특성을 분석하는 단계와, HTM(Hardware Transactional Memory)을 제외한, RH-STM, NOrec STM 및 싱글 글로벌 락(Single Global Lock)을 포함하는 트랜잭션 처리 기법 중에서, 상기 특성에 부합하는 어느 하나의 제1 트랜잭션 처리 기법을 선정하는 단계, 및 선정된 상기 제1 트랜잭션 처리 기법에 기초하여, 상기 트랜잭션을 처리하는 단계를 포함한다.According to an embodiment of the present invention, a transaction processing method includes: determining, based on transaction information regarding a previous transaction that has been processed previously, a size of a transaction to be started, a degree of contention, and a number of consecutive writes (STM), a NOrec STM, and a single global lock (HTM), except for the HTM (TMM) Selecting a first transaction processing technique of the first transaction processing technique, and processing the transaction based on the first transaction processing technique selected.
또한, 본 발명의 일실시예에 따른 트랜잭션 처리 시스템은, 이전에 처리된 이전 트랜잭션에 관한 트랜잭션 정보를 기반으로, 개시 명령된 트랜잭션에 대한 크기, 컨텐션 정도 및 연속 발생된 쓰기 횟수 중 적어도 하나의 특성을 분석하는 분석부, HTM을 제외한, RH-STM, NOrec STM 및 싱글 글로벌 락을 포함하는 트랜잭션 처리 기법 중에서, 상기 특성에 부합하는 어느 하나의 제1 트랜잭션 처리 기법을 선정하는 선정부, 및 선정된 상기 제1 트랜잭션 처리 기법에 기초하여, 상기 트랜잭션을 처리하는 처리부를 포함한다.In addition, the transaction processing system according to an embodiment of the present invention may further include a transaction processing unit for executing at least one of a size, a contention degree, and a consecutively generated number of writes An analysis unit for analyzing the characteristics, a pre-selection unit for selecting any one of the first transaction processing schemes matching the above characteristics among the transaction processing schemes including the RH-STM, the NOrec STM, and the single global lock except for the HTM, And 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, a transaction process is preferentially performed in the Lite HTM, and a transaction such as RH-STM, NOrec- STM, and Single Global Lock to optimize transaction processing performance, thereby improving transaction processing performance.
또한, 본 발명의 일실시예에 따르면, 이전 트랜잭션의 처리 결과 정보를 폴백 경로 테이블에 저장하고, 분석을 통해 트랜잭션 길이 및 컨텐션 정도를 파악하여, 현재 수행되는 트랜잭션의 특성에 맞는 최적의 폴백 경로를 제공 함으로써, 트랜잭션의 특성에 기반한 적응적인 하이브리드 트랜잭셔널 메모리 시스템을 제공할 수 있다.According to an embodiment of the present invention, the process result information of the previous transaction is stored in the fallback path table, the transaction length and the contention degree are analyzed through analysis, and an optimal fallback path It is possible to provide an adaptive hybrid transactional memory system based on the characteristics of the transaction.
또한, 본 발명의 일실시예에 따르면, 글로벌 클락(global clock) 및 락(Lock) 기반의 효율적인 동시성 제어 기법을 통해, 멀티 코어 환경에서 서로 다른 스레드 사이에서 Lite HTM, RH-STM, NOrec-STM 및 싱글 글로벌 락과 같은 각 트랜잭션 처리 기법이 동시에 수행될 수 있도록 제어하여, 트랜잭션의 처리 성능을 향상시킬 수 있다.Also, according to an embodiment of the present invention, Lite HTM, RH-STM, NOrec-STM, etc. among different threads in a multicore environment can be managed through an efficient concurrency control technique based on global clock and lock. And single global lock can be performed simultaneously, thereby improving the processing performance of the transaction.
도 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 illustrating an 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 showing an overall flow of processing a transaction in a transaction processing system according to an embodiment of the present invention.
4 is a diagram showing an example of a fallback path table in the transaction processing system according to the embodiment of the present invention.
5 is a diagram showing a transition automata of a fallback path in a transaction processing system according to an embodiment of the present invention.
FIG. 6 is a diagram for explaining a concurrency control technique between HTM and STM in a multicore 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 using a concurrency control technique in a transaction processing system according to an embodiment of the present invention.
FIG. 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.
10 is a diagram illustrating an example of a NOrec-STM algorithm using a concurrency control technique 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 illustrating an 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
분석부(110)는 이전에 처리된 이전 트랜잭션에 관한 트랜잭션 정보를 기반으로, 워크로드로부터 개시 명령된 트랜잭션(현재 트랜잭션)에 대한 크기(길이), 컨텐션(contention) 정도 및 연속 발생된 쓰기(write) 횟수 중 적어도 하나의 특성을 분석한다.The
즉, 분석부(110)는, 폴백 경로 테이블에 저장된 이전에 처리된 트랜잭션의 정보를 기반으로, HTM(Lite HTM)으로 처리되지 못한 현재의 트랜잭션의 특성을 파악할 수 있다.That is, the
여기서, 폴백 경로 테이블(폴백 패스 테이블)은, 이전에 처리된 트랜잭션의 특성을 분석하여, 최적의 트랜잭션 처리 기법을 선정하기 위한 메타 데이터를 포함할 수 있다.Here, the fallback path table (fallback path table) may include metadata for analyzing characteristics of previously processed transactions and selecting an optimal transaction processing technique.
예를 들어, 도 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 include a number of consecutive writes ('Max_con_write') in a previously processed transaction and an abort ) Occurrence rate ('POSTFIX_capacity abort') in relation to the fallback path to the transaction processing scheme 'RH-STM'.
또한, 폴백 경로 테이블(400)은, 이전 처리된 트랜잭션에서 수행 사이클('Transaction_cycle') 및 현재 스레드에서 발생한 메모리 용량 초과에 따른 중지(abort) 발생 비율('Local_capacity abort')에 관한 메타 데이터를, 트랜잭션 처리 기법 '싱글 글로벌 락(SGL)'에 대한 폴백 경로와 연관시켜 유지할 수 있다.In addition, the fallback path table 400 stores the metadata related to the execution cycle ('Transaction_cycle') in the previously processed transaction and the abort occurrence rate ('Local_capacity abort') according to the memory capacity exceeded in the current thread, It can be maintained in association 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 stores metadata related to a halt occurrence ratio ('Valid_abort') due to a conflict between the shared memory HyTM and the buffer generated in the collision validation step, using the transaction processing technique NOrec- Quot; STM ". < / RTI >
선정부(120)는 HTM(Hardware Transactional Memory)을 제외한, RH-STM, NOrec STM 및 싱글 글로벌 락(Single Global Lock)을 포함하는 트랜잭션 처리 기법 중에서, 상기 특성에 부합하는 어느 하나의 제1 트랜잭션 처리 기법을 선정한다.The
일례로, 선정부(120)는 선정된 폴백 경로(fall-back path) 테이블로부터 식별되는 상기 각 트랜잭션 처리 기법과 연관되는 메타 데이터를 이용하여, 상기 특성에 부합하는 상기 제1 트랜잭션 처리 기법을 선정할 수 있다.For example, the
즉, 선정부(120)는 상기 HTM에 의해 처리되지 못한 트랜잭션에 대해, 현재의 특성(크기(길이), 컨텐션 정도 및 연속 발생된 쓰기(write) 횟수 등)에 부합하는 최적의 제1 트랜잭션 처리 기법을, RH-STM, NOrec STM 및 싱글 글로벌 락 중에서 선정하고, 상기 제1 트랜잭션 처리 기법에 해당하는 폴백 경로를, Lite HTM 처리 모듈에 제공할 수 있다.That is, the
구체적으로, 선정부(120)는 상기 트랜잭션의 처리 중 메모리 용량 초과에 따른 중지(abort) 발생 비율이 임계치(예, '30%')에 도달하면, 상기 RH-STM을, 상기 제1 트랜잭션 처리 기법으로 선정할 수 있다.Specifically, when the ratio of abort occurrence due to exceeding the memory capacity reaches a threshold value (for example, '30%') during the processing of the transaction, the selecting
또한, 선정부(120)는 상기 트랜잭션의 처리 중 충돌 검증(validation) 시 발생되는 하이브리드 트랜잭셔널 메모리(HyTM)와 버퍼 간의 충돌로 인한 중지 발생 비율이 임계치(예, '70%')에 도달하면, 상기 NOrec STM을, 상기 제1 트랜잭션 처리 기법으로 선정할 수 있다.In addition, the
또한, 선정부(120)는 상기 트랜잭션의 처리 중 연속 발생된 쓰기 횟수가 임계치('1')에 도달하면, 상기 싱글 글로벌 락(SGL)을, 상기 제1 트랜잭션 처리 기법으로 선정할 수 있다.The
처리부(130)는 선정된 상기 제1 트랜잭션 처리 기법에 기초하여, 상기 트랜잭션을 처리한다. 즉, 처리부(130)는 상기 제1 트랜잭션 처리 기법에 해당하는 폴백 경로로 상기 트랜잭션을 이동시켜 처리할 수 있다.The
처리부(130)는 설정된 재시도 횟수 이내에서, 상기 HTM을 이용한 상기 트랜잭션의 처리가 이루어지지 않으면, 상기 트랜잭션의 현재의 특성에 적합한 제1 트랜잭션 처리 기법에 기초하여, 상기 트랜잭션을 처리할 수 있다.The
실시예에 따라, 처리부(130)는 상기 제1 트랜잭션 처리 기법에 따라 상기 트랜잭션을 처리하는 동안, 상기 트랜잭션의 특성이 변경되면, 변경되는 특성에 따른 제2 트랜잭션 처리 기법으로 전이하여 상기 트랜잭션을 처리할 수 있다.According to an embodiment, when processing the transaction according to the first transaction processing technique, when the characteristic of the transaction is changed, the
상기 폴백 경로 테이블에는, 각 트랜잭션 처리 기법에서 다른 트랜잭션 처리 기법으로 분기하기 위한 특성(메타 데이터)이 저장될 수 있으며, 처리부(130)는 상기 폴백 경로 테이블을 참조하여, 제1 트랜잭션 처리 기법에 따라 트랜잭션을 처리 중에 변경된 트랜잭션의 특성에 최적화된 제2 트랜잭션 처리 기법으로 트랜잭션을 처리할 수 있다.In the fallback path table, properties (meta data) for branching to different transaction processing techniques in each transaction processing technique may be stored. The
다시 말해, 처리부(130)는 HTM으로 처리되지 못하는 트랜잭션에 대해, 항상 트랜잭션 특성에 최적화된 트랜잭션 처리 기법으로 처리하여 트랜잭션의 처리 성능을 높일 수 있다.In other words, the
일례로, 처리부(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
또한, 처리부(130)에서 제1 트랜잭션 처리 기법('RH-STM')에서 POSTFIX HTM이 트랜잭션을 처리하지 못한 경우, 값을 메모리에 직접 반영하기 위해 모든 스레드를 대기 상태로 전환하며 이는 성능에 악영향을 미칠 수 있다. 이러한 점을 고려하여, 처리부(130)는, 제1 트랜잭션 처리 기법('RH-STM')에 따라 트랜잭션을 처리하는 동안, POSTFIX HTM에서 메모리 용량 초과에 따른 중지(capacity abort) 발생 비율이 70% 이상이면(B 조건), 트랜잭션의 크기와 상관없이 병렬 수행이 가능한 제2 트랜잭션 처리 기법('NOrec-STM')으로 전환하여 상기 트랜잭션을 처리할 수 있다.If the POSTFIX HTM fails to process the transaction in the first transaction processing technique ('RH-STM') in the
상기 A, B 조건에 모두 해당하지 않을 경우, 처리부(130)는, 제1 트랜잭션 처리 기법('RH-STM')을 유지한 상태로 트랜잭션을 처리할 수 있다(C 조건).If all of the conditions A and B are not satisfied, the
다른 일례로, 처리부(130)에서 제1 트랜잭션 처리 기법('싱글 글로벌 락')에 따라 트랜잭션을 처리 시 트랜잭션을 단일 스레드로 처리하기 때문에 트랜잭션의 크기가 클 경우 대기시간이 길어질 수 있다. 이러한 점을 고려하여, 처리부(130)는, 제1 트랜잭션 처리 기법('싱글 글로벌 락')에 따라 트랜잭션을 처리 시, 현재 스레드에서 메모리 용량 초과에 따른 중지(capacity abort) 발생 비율이 30% 이상 발생할 경우(D 조건), 제2 트랜잭션 처리 기법('RH-STM')으로 전환하여 트랜잭션을 보다 빠르게 처리할 수 있다.In another example, when the transaction is processed according to the first transaction processing technique ('single global lock') in the
또한, 처리부(130)는, 제1 트랜잭션 처리 기법('싱글 글로벌 락')에 따라 트랜잭션을 처리 시, 상기 트랜잭션의 수행 사이클이 HTM으로 처리될 수 없는 크기를 가질 경우(E 조건), 제2 트랜잭션 처리 기법('NOrec-STM')을 이용하여 큰 트랜잭션을 처리할 수 있다.In addition, when the transaction is processed in accordance with the first transaction processing technique ('single global lock'), the
상기 D, E 조건에 모두 해당하지 않을 경우, 처리부(130)는, 제1 트랜잭션 처리 기법('싱글 글로벌 락')을 유지한 상태로 트랜잭션을 처리할 수 있다(F 조건). If both of the conditions D and E are not satisfied, the
또 다른 일례로, 처리부(130)에서 제1 트랜잭션 처리 기법('NOrec-STM')에 따라 트랜잭션을 처리 시 읽기(read), 쓰기(write) 명령 세트를 버퍼에 저장하여 처리할 수 있으나, 트랜잭션의 컨텐션(contention) 정도가 높은 경우 반복적으로 충돌 검증(Validation) 단계에서 다른 트랜잭션과 충돌이 감지될 수 있다. 이러한 점을 고려하여, 처리부(130)는, 제1 트랜잭션 처리 기법('NOrec-STM')에 따라 트랜잭션을 처리 중, 충돌이 일정 비율(예, '80%') 이상 발생되는 경우(G 조건), 제2 트랜잭션 처리 기법(싱글 글로벌 락)으로 전이하여, 트랜잭션을 안전하게 처리할 수 있다.As another example, the
이때, 처리부(130)는, 충돌이 일정 비율(예, '20%') 이하로 적게 발생되면(H 조건), 트랜잭션의 컨텐션(contention) 정도가 낮다고 판단하여 제2 트랜잭션 처리 기법('RH-STM')으로 전이하여 상대적으로 빠른 처리 속도로 트랜잭션을 처리할 수 있다.At this time, the
상기 G, H 조건에 모두 해당되지 않을 경우, 처리부(130)는, 제1 트랜잭션 처리 기법('NOrec-STM')을 유지한 상태로 트랜잭션을 처리할 수 있다(I 조건).If neither the G nor the H condition is satisfied, the
이와 같이, 처리부(130)는, HTM으로 처리되지 않는 트랜잭션에 대해, RH-STM, NOrec STM 및 싱글 글로벌 락(Single Global Lock) 중 어느 하나의 제1 트랜잭션 처리 기법에 따라 처리하는 동안에도, 트랜잭션의 특성 변화에 부합하는 최적화된 제2 트랜잭션 처리 기법으로 지속적으로 전환해서 처리할 수 있어 트랜잭션의 처리 성능을 보다 높일 수 있다.In this way, the
실시예에 따라, 처리부(130)는 멀티 코어 환경에서 서로 다른 스레드에 의해 수행되는 각 트랜잭션이 상기 HTM을 이용하여 처리되지 않으면, 상기 각 트랜잭션의 특성을 고려하여 선정되는 각각의 제1 트랜잭션 처리 기법에 기초하여, 상기 각 트랜잭션의 동시 처리를 허용할 수 있다.According to an embodiment, if a transaction performed by a different thread in a multi-core environment is not processed using the HTM, the
이와 같은 멀티 코어 환경에서 서로 다른 스레드에 의해 수행되는 각 트랜잭션 간의 충돌 방지를 위해, 트랜잭션 처리 시스템(100)은, 동시성 제어를 실시하는 제어부(140)를 더 포함할 수 있다.In order to prevent conflicts between respective transactions performed by different threads in such a multicore environment, the
제어부(140)는 임의의 스레드에서 상기 제1 트랜잭션 처리 기법에 따라 처리되는 상기 트랜잭션이 정상 종료(commit)하면, 글로벌 클락(global clock)을 업데이트 한다.The
이를 통해, 제어부(140)는 상기 트랜잭션의 처리에 따른 하이브리드 트랜잭셔널 메모리(HyTM)의 수정을 타 스레드에 손쉽게 알림으로써, 각 트랜잭션 간의 충돌을 효과적으로 방지할 수 있다.Accordingly, the
또한, 제어부(140)는 트랜잭션 처리 기법에 따라, 락 변수('mutex Lock' 또는 'commit Lock')를 설정(acquire)하여, 멀티 코어 환경에서 서로 다른 스레드가 각 트랜잭션을 처리할 때 발생될 수 있는 충돌을 효과적으로 방지할 수 있다.In addition, the
구체적으로, 제어부(140)는 상기 제1 트랜잭션 처리 기법이, 싱글 글로벌 락인 경우, 제1 락 변수('mutex Lock')를 설정하여 상기 HTM을 강제로 대기상태로 전환하고, 제2 락 변수('commit Lock')를 설정하여 RH-STM 또는 NOrec STM에서 서로 다른 스레드에서 동시에 트랜잭션이 정상 종료(commit)하는 것을 방지할 수 있다. 처리부(130)는 상기 제1 및 제2 락 변수를 설정한 상태에서, 상기 싱글 글로벌 락에 따라 상기 트랜잭션을 처리할 수 있다.Specifically, when the first transaction processing technique is a single global lock, the
이와 같이, 본 발명의 일실시예에 따르면, Lite HTM에서 우선적으로 트랜잭션 처리를 수행하고, Lite HTM으로 처리할 수 없는 트랜잭션에 대해, 길이 및 컨텐션 정도와 같은 특성 분석에 기반하여, RH-STM, NOrec-STM, 싱글 글로벌 락(Single Global Lock) 중 어느 하나의 최적한 트랜잭션 처리 기법에 따라 처리 함으로써, 트랜잭션 처리 성능을 높일 수 있다.As described above, according to the embodiment of the present invention, for the transactions that are preferentially processed in the Lite HTM and can not be processed by the Lite HTM, the RH-STM , NOrec-STM, and Single Global Lock, thereby improving the transaction processing performance.
또한, 본 발명의 일실시예에 따르면, 이전 트랜잭션의 처리 결과 정보를 폴백 경로 테이블에 저장하고, 분석을 통해 트랜잭션 길이 및 컨텐션 정도를 파악하여, 현재 수행되는 트랜잭션의 특성에 맞는 최적의 폴백 경로를 제공 함으로써, 트랜잭션의 특성에 기반한 적응적인 하이브리드 트랜잭셔널 메모리 시스템을 제공할 수 있다.According to an embodiment of the present invention, the process result information of the previous transaction is stored in the fallback path table, the transaction length and the contention degree are analyzed through analysis, and an optimal fallback path It is possible to provide an adaptive hybrid transactional memory system based on the characteristics of the transaction.
또한, 본 발명의 일실시예에 따르면, 글로벌 클락(global clock) 및 락(Lock) 기반의 효율적인 동시성 제어 기법을 통해, 멀티 코어 환경에서 서로 다른 스레드 사이에서 Lite HTM, RH-STM, NOrec-STM 및 싱글 글로벌 락과 같은 각 트랜잭션 처리 기법이 동시에 수행될 수 있도록 제어하여, 트랜잭션의 처리 성능을 향상시킬 수 있다.Also, according to an embodiment of the present invention, Lite HTM, RH-STM, NOrec-STM, etc. among different threads in a multicore environment can be managed through an efficient concurrency control technique based on global clock and lock. And single global lock can be performed simultaneously, thereby improving the processing performance of the transaction.
도 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)의 환경에서 동작할 수 있다.Referring to FIG. 2, a
여기서, 폴백 코디네이터(fall-back coordinator)(210) 및 트랜잭션 처리 모듈(220)를 포함하여 구성될 수 있다.Here, a fall-
폴백 코디네이터(210)는 이전 처리된 트랜잭션의 처리 결과 정보를 바탕으로, 워크로드로부터 개시되는 현재 트랜잭션의 특성에 부합하는 폴백 경로를 Lite HTM 처리 모듈(221)에 제공하는 역할을 한다.The
상세하게는, 폴백 코디네이터(210)는 폴백 패스 핸들러(fall-back path handler)(211) 및 폴백 패스 테이블(fall-back path)(212)을 세부 구성으로 포함할 수 있다.In detail, the
폴백 패스 핸들러(211)는 워크로드(workloads)로부터 개시되는 트랜잭션이, 설정된 재시도 횟수 이내에서 Lite HTM 처리 모듈(221)에서 처리되지 않으면, 폴백 패스 테이블(212)에 저장된 이전 트랜잭션의 처리 결과 정보(트랜잭션 정보)를 바탕으로, 현재 개시된 트랜잭션의 특성에 부합하는 최적의 폴백 경로를 선정할 수 있다.The fallback path handler 211 determines that the processing result information of the previous transaction stored in the fallback path table 212 is not included in the fallback path table 212 if the transaction started from the workloads is not processed in the Lite HTM processing module 221 within the set number of retries. (Transaction information), it is possible to select an optimal fallback path that matches the characteristics of the currently started transaction.
폴백 패스 핸들러(211)는 현재 개시된 트랜잭션에 대해, 크기(길이)와 컨텐션(contention) 정도 및 연속 발생된 쓰기(write) 횟수 중 적어도 하나의 특성을 분석할 수 있다.The fallback path handler 211 may analyze at least one characteristic of the currently initiated transaction, such as the size (length), the degree of contention, and the number of consecutive writes.
폴백 패스 테이블(212)은 이전에 처리된 트랜잭션의 처리 결과 정보(트랜잭션 정보)를 저장하고, 최적의 폴백 경로를 선정하기 위한 메타 데이터를, 폴백 경로 각각으로 유지하는 역할을 한다.The fallback path table 212 stores the processing result information (transaction information) of the previously processed transaction and maintains the metadata for selecting the optimal fallback path in each fallback path.
또한, 폴백 패스 테이블(212)은 각 폴백 경로에서 트랜잭션을 수행하는 동안, 각 트랜잭션 처리 기법의 특성을 고려하여 다른 트랜잭션 처리 기법으로 분기하기 위한 특성을 저장할 수 있다.In addition, the fallback path table 212 may store characteristics for branching to other transaction processing techniques in consideration of the characteristics of each transaction processing technique during a transaction in each fallback path.
일례로, 도 4를 참조하면, 폴백 패스 테이블(212, 400)은 이전에 처리된 트랜잭션의 특성을 분석하여, 최적의 폴백 경로를 선정하기 위한 메타 데이터를, 폴백 경로('RH-STM', '싱글 글로벌 락' 및 'NOrec-STM') 각각으로 유지할 수 있다.Referring to FIG. 4, the fallback path tables 212 and 400 analyze the characteristics of the previously processed transaction and transmit metadata for selecting the optimal fallback path to the fallback path ('RH-STM', ' 'Single Global Lock' and 'NOrec-STM'), respectively.
구체적으로, 폴백 패스 테이블(212, 400)은 연속 발생된 쓰기(write) 횟수('Max_con_write') 및 메모리 용량 초과에 따른 중지(abort) 발생 비율('POSTFIX_capacity abort')에 관한 메타 데이터를, 폴백 경로('RH-STM')에 연관시켜 유지할 수 있다.Specifically, the fallback path tables 212 and 400 store the metadata related to the number of consecutive writes ('Max_con_write') and the abort occurrence rate ('POSTFIX_capacity abort' Path (" RH-STM ").
또한, 폴백 패스 테이블(212, 400)은 현재 트랜잭션의 수행 사이클('Transaction_cycle') 및 현재 스레드에서 발생한 메모리 용량 초과에 따른 중지(abort) 발생 비율('Local_capacity abort')에 관한 메타 데이터를, 폴백 경로('싱글 글로벌 락')에 연관시켜 유지할 수 있다.The fallback path tables 212 and 400 also store the metadata related to the execution cycle ('Transaction_cycle') of the current transaction and the abort occurrence rate ('Local_capacity abort') according to the memory capacity exceeded in the current thread, Path ('single global lock').
또한, 폴백 패스 테이블(212, 400)은 충돌 검증(validation) 단계에서 발생되는 공유 메모리(HyTM)와 버퍼 간의 충돌로 인한 중지 발생 비율('Valid_abort')에 관한 메타 데이터를, 폴백 경로('NOrec-STM')에 연관시켜 유지할 수 있다.The fallback path tables 212 and 400 also store the metadata related to the stop occurrence ratio ('Valid_abort') due to the collision between the shared memory HyTM and the buffer generated in the collision validation step, -STM ').
트랜잭션 처리 모듈(220)은, 하이브리드 트랜잭셔널 메모리(hybrid transactional memory)를 기반으로 멀티 코어 환경에서 워크로드로부터 개시된 트랜잭션을 처리하고, 트랜잭션이 정상 처리되면, 다른 스레드에서 공유 메모리의 수정을 알 수 있도록 글로벌 클락(global clock)을 업데이트 할 수 있다.The
트랜잭션 처리 모듈(220)은, Lite HTM 처리 모듈(221), RH-STM 처리 모듈(222), NOrec-STM 처리 모듈(223) 및 싱글 글로벌 락(Single global lock) 처리 모듈(224)를 포함하여 구성될 수 있다.The
Lite HTM 처리 모듈(221)은 HTM(Hardware Transactional Memory)을 이용한 트랜잭션 처리를 수행하는 모듈로써, Intel TSX의 기본적인 HTM 처리 환경을 제공할 수 있다.Lite HTM processing module 221 is a module for performing transaction processing using HTM (Hardware Transactional Memory), and can provide a basic HTM processing environment of Intel TSX.
Lite HTM 처리 모듈(221)은 하드웨어 기반의 낙관적인 전략을 사용하여 트랜잭션을 수행하며, 트랜잭션의 충돌 혹은 예기치 못한 원인에 의해 중단(abort)될 경우, 정해진 횟수만큼 트랜잭션 처리를 재시도할 수 있다.The Lite HTM processing module 221 performs a transaction using a hardware-based optimistic strategy. When the transaction is aborted due to a collision or unexpected cause of a transaction, the Lite HTM processing module 221 can retry the transaction processing a predetermined number of times.
만약 재시도 횟수 내에서 트랜잭션이 처리되지 못할 경우, 폴백 패스 핸들러(211)는, 이전 처리된 트랜잭션의 처리 결과 정보가 저장되는 폴백 패스 테이블(212)을 참조하여 상기 트랜잭션의 특성에 부합하는 최적의 폴백 경로(RH-STM, NOrec STM, Single Global Lock)를 선정할 수 있다.If the transaction can not be processed within the retry count, the fallback path handler 211 refers to the fallback path table 212 in which the processed result information of the previously processed transaction is stored, You can select the fallback path (RH-STM, NOrec STM, Single Global Lock).
RH-STM 처리 모듈(222)은 트랜잭션을, STM과 부분적인 HTM으로 처리하는 모듈로서, STM 내에 삽입된 일부분의 HTM('PREFIX HTM', 'POSTFIX HTM')을 이용하여, 캐시 일관성 프로토콜 기반의 충돌 감지 기법에 따라 동시성 제어를 수행할 수 있다.The RH-STM processing module 222 is a module for processing a transaction into an STM and a partial HTM. The RH-STM processing module 222 uses a part of the HTM ('PREFIX HTM', 'POSTFIX HTM' It is possible to perform concurrency control according to the collision detection technique.
만약 일부분의 HTM('PREFIX HTM', 'POSTFIX HTM')을 이용하여 트랜잭션을 수행하는 동안 충돌이 발생하거나 혹은 예기치 못한 원인에 의해 트랜잭션이 중단될 경우, RH-STM 처리 모듈(222)은 트랜잭션을 원 상태로 복구(roll-back)한 후, 싱글 글로벌 락(Single Global Lock) 처리 모듈(224)을 통해 처리할 수 있다.If a conflict occurs during a transaction using a part of the HTM ('PREFIX HTM', 'POSTFIX HTM') or if the transaction is aborted due to an unexpected cause, the RH-STM processing module 222 It can be rolled back to the original state and then processed through the Single Global
NOrec-STM 처리 모듈(223)은 상기 트랜잭션을 STM으로 처리하기 위한 모듈로서, 트랜잭션을 처리하는 동안 발생되는 읽기('read') 및 쓰기('write') 명령 세트를 버퍼에 저장할 수 있다.The NOrec-
NOrec-STM 처리 모듈(223)은 상기 트랜잭션의 처음과 끝에서 글로벌 클락(global clock)의 변화를 감지하고, 상기 글로벌 클락의 값이 변경(업데이트)된 경우, 버퍼에 저장되어 있는 읽기('read') 및 쓰기('write') 명령 세트의 값과, 공유 메모리의 값을 비교하여 충돌 검증을 수행할 수 있다.The NOrec-
싱글 글로벌 락 처리 모듈(224)은 반복적으로 중단되는 트랜잭션을 처리하기 위한 모듈로서, 모든 스레드를 대기 상태로 전환 함으로써 상기 트랜잭션의 정상 처리를 보장할 수 있다.The single global
도 3은 본 발명의 일실시예에 따른 트랜잭션 처리 시스템에서, 트랜잭션을 처리하는 전체 흐름을 도시한 도면이다.3 is a diagram showing an 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
Lite HTM 처리 모듈(301)은 워크로부터 트랜잭션이 시작되면, HTM을 이용하여 트랜잭션을 처리할 수 있다(단계 ).The Lite
Lite HTM 처리 모듈(301)은 현재 수행 중인 폴백 경로(Fall-back path)와의 병렬 수행을 위해 글로벌 클락(global clock)을 검사하여 동시성 제어를 수행할 수 있다(단계 ). The Lite
즉, Lite HTM 처리 모듈(301)은 HTM을 이용하여 트랜잭션을 처리하는 동안, 동시성 관리부를 통해 각 처리 모듈과의 동시성 체크를 수행하여, 각 처리 모듈과의 병렬 처리가 가능해지도록 할 수 있다.That is, the Lite
Lite HTM 처리 모듈(301)은 정해진 재시도 횟수(임계치) 만큼 HTM 상에서 해당 트랜잭션을 처리할 수 있다(단계 ).Lite
상기 단계 에서 정해진 재시도 횟수 이내에 트랜잭션이 처리되지 못할 경우, 폴백 코디네이터(310) 내 폴백 패스 핸들러(311)는, 폴백 패스 테이블(312)에 저장된 이전에 처리된 트랜잭션의 정보를 기반으로, 현재의 트랜잭션의 특성을 파악하고, 상기 특성에 부합하는 최적의 폴백 경로를 선정할 수 있다(단계 ④).If the transaction can not be processed within the retry count determined in the above step, the
Lite HTM 처리 모듈(301)은, 상기 단계 ④에서 폴백 패스 핸들러(311)에 의해 선정된 폴백 경로에 따라, 상기 트랜잭션이 RH-STM, NOrec STM, Single Global Lock 중 하나의 기법을 통해 트랜잭션을 처리되도록 전달할 수 있다(단계 ).Lite
상기 단계 에서 선정된 폴백 경로에 따른, RH-STM 처리 모듈(302), NOrec STM 처리 모듈(303) 및 싱글 글로벌 락 처리 모듈(304) 중 적어도 하나의 처리 모듈은, 정상 종료(commit)할 때까지 트랜잭션 처리를 재시도할 수 있다(단계 ).At least one processing module of the RH-
각 처리 모듈(Lite HTM 처리 모듈(301), RH-STM 처리 모듈(302), NOrec STM 처리 모듈(303) 및 싱글 글로벌 락 처리 모듈(304))은, 정상 종료(commit)된 트랜잭션에 관한 정보를, 폴백 코디네이터(310) 내의 폴백 패스 테이블(312)에 저장, 업데이트하여, 다음 트랜잭션 폴백 경로 선정 시 사용되도록 할 수 있다(단계 ).Each of the processing modules (Lite
도 4는 본 발명의 일실시예에 따른 트랜잭션 처리 시스템에서, 폴백 패스 테이블의 일례를 도시한 도면이다.4 is a diagram showing an example of a fallback path table in the transaction processing system according to the 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 determines at least one of a size (length), a degree of contention, and a number of consecutive writes It is possible to analyze one characteristic and select the fallback path optimal to the characteristic by referring to the fallback path table 400 shown in FIG.
상기 트랜잭션 처리 시스템은, 이전에 처리된 트랜잭션의 특성을 분석하여, 최적의 폴백 경로를 선정하기 위한 메타 데이터를, 폴백 경로('RH-STM', '싱글 글로벌 락' 및 'NOrec-STM') 각각으로 유지하는 폴백 패스 테이블(400)을 마련할 수 있다.('RH-STM', 'Single Global Lock', and 'NOrec-STM') for analyzing characteristics of a previously processed transaction and for selecting metadata for the optimal fallback path, The fallback path table 400 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)을 마련할 수 있다.For example, the transaction processing system may determine the number of consecutive writes ('Max_con_write') and the abort occurrence rate ('POSTFIX_capacity abort) according to the memory capacity overflow for the fallback path (' RH-STM ' ') And associates the metadata related to the current thread with the current transaction's execution cycle (' Transaction_cycle ') and the abort occurrence rate (' Quot; Local_capacity abort ") and associates meta data relating to the fallback path ('NOrec-STM') with the stop generation ratio ('Valid_abort') caused by the collision between the shared memory HyTM and the buffer generated in the collision validation step '), And the fallback path table 400 can be provided.
상기 트랜잭션 처리 시스템은, 폴백 패스 테이블(400)을 참조하여, 제1 트랜잭션 처리 기법에 따라 트랜잭션을 처리하는 동안, 트랜잭션의 특성이 변경되면, 상기 변경되는 특성에 따른 제2 트랜잭션 처리 기법으로 전이하여 트랜잭션을 처리할 수 있다.The transaction processing system refers to the fallback path table 400 and, while processing a transaction according to the first transaction processing technique, changes the characteristic of the transaction to a second transaction processing technique according to the changed property The transaction can be processed.
이를 위해, 폴백 패스 테이블(400)은 각 트랜잭션 처리 기법의 특성을 고려하여 다른 트랜잭션 처리 기법으로 분기하기 위한 특성을 포함할 수 있다.To this end, the fallback path table 400 may include characteristics for branching to other transaction processing techniques considering characteristics of each transaction processing technique.
트랜잭션 처리기법의 일례로, RH-STM의 경우, 동시성 제어 기법을 필요로 하지 않기 때문에 속도가 빠른 반면, HTM의 메모리 한계로 인해 길이가 긴 트랜잭션(long transaction)을 처리하기 어려우며, 트랜잭션 처리에 실패한 경우 모든 스레드를 대기 상태로 전환한 후에 처리해야 하기 때문에 트랜잭션 중단에 대한 오버헤드가 클 수 있다. 또한, RH-STM 내부에서 PREFIX HTM 및 POSTFIX HTM은, 쓰기(write)의 발생 시점을 기준으로 전환되며, 쓰기(write) 개수가 적을 경우 성능 향상 보다 HTM 기법 전환에 따른 오버헤드가 더 클 수 있다.In the case of RH-STM, RH-STM is fast because it does not require concurrency control. On the other hand, it is difficult to handle a long transaction due to HTM's memory limit. The overhead of transaction abort can be significant because all threads must be put in a wait state before processing. Also, in RH-STM, PREFIX HTM and POSTFIX HTM are switched based on the time of writing, and when the number of writes is small, overhead due to switching of HTM technique may be larger than performance improvement .
이러한 점을 고려하여, 상기 트랜잭션 처리 시스템은, RH-STM에 따라 트랜잭션을 처리하는 동안 최대 연속으로 발생하는 쓰기(write) 횟수와, STM 내에 삽입된 일부의 HTM('POSTFIX HTM')에서 발생한 메모리 용량 초과로 인한 중지 발생 비율('capacity abort')을, 다른 트랜잭션 처리 기법으로 분기하기 위한 특성으로서, 폴백 패스 테이블(400) 내 메타 데이터('Max_con_write', 'POSTFIX_capacity abort')에 저장할 수 있다.In consideration of this point, the transaction processing system determines the number of times of writing that occurs consecutively in the course of processing a transaction according to the RH-STM and the number of writes occurring in some HTM ('POSTFIX HTM') inserted in the STM ('Max_con_write', 'POSTFIX_capacity abort') in the fallback path table 400 as a property for branching 'capacity abort' due to the excess capacity to other transaction processing techniques.
트랜잭션 처리기법의 다른 일례로, 싱글 글로벌 락(Single Global Lock)의 경우, 트랜잭션의 정상 처리를 보장할 수는 있지만 처리 속도가 매우 느리기 때문에 HTM과 STM으로도 트랜잭션이 처리될 수 없는 경우에 실행해야 하는 점을 고려하여, 상기 트랜잭션 처리 시스템은, 트랜잭션을 처리하는 동안 상기 트랜잭션의 수행 사이클 및 현재 스레드에서 발생한 메모리 용량 초과로 인한 중지 발생 비율('capacity abort')을, 다른 트랜잭션 처리 기법으로 분기하기 위한 특성으로서, 폴백 패스 테이블(400) 내 메타 데이터('Transaction_cycle', 'Local_capacity abort')에 저장할 수 있다.Another example of transaction processing techniques is Single Global Lock, which can guarantee the normal processing of transactions, but should be executed if HTM and STM can not handle transactions because the processing speed is very slow. Quot; capacity abort " due to an execution cycle of the transaction and an excess memory capacity occurring in the current thread during the transaction processing, the transaction processing system branches the transaction processing technique to another transaction processing technique (&Quot; Transaction_cycle ", " Local_capacity abort ") in the fallback path table 400.
트랜잭션 처리기법의 또 다른 일례로, NOrec-STM의 경우, 버퍼를 이용하여 트랜잭션을 처리하기 때문에 길이가 긴 트랜잭션을 처리하기에 용이하지만, 충돌 검증(validation) 단계에서 공유 메모리와 버퍼 간의 지속적인 충돌이 발생할 시, 반복적인 중단(abort)으로 인해 스레드가 대기 상태로 빠질 수 있다는 점을 고려하여, 상기 트랜잭션 처리 시스템은, 충돌 검증(validation) 단계에서 발생되는 공유 메모리(HyTM)와 버퍼 간의 충돌로 인한 중지 발생 비율('Valid_abort')을, 다른 트랜잭션 처리 기법으로 분기하기 위한 특성으로서, 폴백 패스 테이블(400) 내 메타 데이터('Valid_abort')에 저장할 수 있다.As another example of transaction processing technique, NOrec-STM is easy to handle long transaction because it processes the transaction using buffer. However, in case of collision validation, continuous conflict between shared memory and buffer In consideration of the fact that a thread may be put into a standby state due to a repetitive abort when an event occurs, the transaction processing system may not be able to handle a conflict due to a conflict between the shared memory HyTM generated in the conflict validation step and the buffer (&Apos; Valid_abort ') in the fallback path table 400 as a property for branching to a different transaction processing technique.
상기 트랜잭션 처리 시스템은, 일정 주기마다 폴백 패스 테이블(400)에 저장된 정보를 업데이트 하고, 폴백 패스 테이블(400)에 저장된 정보를 바탕으로 현재의 트랜잭션 특성에 따른 폴백 경로를 선정할 수 있다.The transaction processing system may update the information stored in the fallback path table 400 every predetermined period and select a fallback path according to the current transaction characteristics based on the information stored in the fallback path table 400. [
도 5는 본 발명의 일실시예에 따른 트랜잭션 처리 시스템에서, 폴백 패스의 전이 오토마타(transition automata)를 도시한 도면이다.5 is a diagram showing a transition automata of a fallback path in a transaction processing system according to an embodiment of the present invention.
도 5를 참조하면, 본 발명의 일실시예에 따른 트랜잭션 처리 시스템은, 도 5에 도시된 폴백 경로의 전이 오토마타에 근거하여, 트랜잭션의 특성에 가장 최적화된 폴백 경로로 변경하여 제공할 수 있다.5, the transaction processing system according to an embodiment of the present invention can change and provide a fallback path that is optimized for the characteristics of a transaction, based on the transition automata of the fallback path shown in FIG.
즉, 트랜잭션 처리 시스템은, HTM에 의해 처리되지 않는 트랜잭션을, 트랜잭션의 특성에 부합하는 제1 트랜잭션 처리 기법에 따라 처리하는 동안, 트랜잭션의 특성이 변경되면, 상기 변경되는 특성에 따른 제2 트랜잭션 처리 기법으로 전이하여 트랜잭션을 처리하여, 트랜잭션의 처리 성능을 향상시킬 수 있다.That is, while the transaction processing system processes a transaction that is not handled by the HTM according to a first transaction processing technique conforming to the characteristics of the transaction, if the characteristics of the transaction are changed, the second transaction processing Transaction, and improve transaction performance of the transaction.
일례로, 제1 트랜잭션 처리 기법('RH-STM')에 따라 트랜잭션의 첫 번째 쓰기(write)를 수행 시 읽기(read)를 수행하는 PREFIX HTM을 커밋(commit)하고, POSTFIX HTM을 시도하게 되는데, 쓰기와 읽기가 반복될 경우 PREFIX HTM은 시작과 동시에 커밋되어 불필요한 작업을 증가시킬 수 있고, POSTFIX HTM이 처리해야 할 크기는 증가하기 때문에 메모리 용량 초과에 따른 중지(capacity abort)가 발생될 확률이 높아질 수 있다.For example, in the first write operation of the transaction according to the first transaction processing scheme ('RH-STM'), the PREFIX HTM which performs a read operation is committed and the POSTFIX HTM is attempted , The PREFIX HTM can be committed at the same time as it starts to write and read repeatedly, which can increase unnecessary work and POSTFIX HTM will increase the size to handle, so the probability of capacity abort Can be increased.
이러한 점을 고려하여, 상기 트랜잭션 처리 시스템은, 제1 트랜잭션 처리 기법('RH-STM')에 따라 트랜잭션을 처리하는 동안, 연속으로 처리한 쓰기(write)의 수가 '1'인 경우, A 조건에 따라 제2 트랜잭션 처리 기법('싱글 글로벌 락')으로 전이하여 상기 트랜잭션을 처리할 수 있다.In consideration of this point, the transaction processing system, when processing the transaction according to the first transaction processing technique ('RH-STM'), if the number of consecutively processed writes is '1' To a second transaction processing scheme (" single global lock ") to process the transaction.
또한, 제1 트랜잭션 처리 기법('RH-STM')에서 POSTFIX HTM이 트랜잭션을 처리하지 못한 경우, 값을 메모리에 직접 반영하기 위해 모든 스레드를 대기 상태로 전환하며 이는 성능에 악영향을 미칠 수 있다.Also, if the POSTFIX HTM fails to process the transaction in the first transaction processing technique ('RH-STM'), it switches all threads to wait 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 consideration of this point, the transaction processing system determines that the capacity abort occurrence ratio in the POSTFIX HTM exceeds 70% during the transaction processing according to the first transaction processing technique ('RH-STM'), (NOrec-STM), which can be performed in parallel, regardless of the size of the transaction, according to the B condition, the transaction can be processed.
상기 A, B 조건에 모두 해당하지 않을 경우, 상기 트랜잭션 처리 시스템은, 제1 트랜잭션 처리 기법('RH-STM')을 유지한 상태로 트랜잭션을 처리할 수 있다(C 조건).If all of the conditions A and B are not satisfied, the transaction processing system can process the transaction with the first transaction processing technique ('RH-STM') (condition C).
다른 일례로, 제1 트랜잭션 처리 기법('싱글 글로벌 락')에 따라 트랜잭션을 처리 시 트랜잭션을 단일 스레드로 처리하기 때문에 트랜잭션의 크기가 클 경우 대기시간이 길어질 수 있다.In another example, when processing a transaction according to the first transaction processing technique ('single global lock'), the transaction is processed as a single thread, so that the waiting time may become long if the transaction size is large.
이러한 점을 고려하여, 상기 트랜잭션 처리 시스템은, 제1 트랜잭션 처리 기법('싱글 글로벌 락')에 따라 트랜잭션을 처리 시, 현재 스레드에서 메모리 용량 초과에 따른 중지(capacity abort) 발생 비율이 30% 이상 발생할 경우, 보다 빠른 처리를 위해, D 조건에 따라 제2 트랜잭션 처리 기법('RH-STM')으로 전환하여 트랜잭션을 처리할 수 있다.Taking this into consideration, the transaction processing system is configured such that, when a transaction is processed according to a first transaction processing technique ('single global lock'), a rate of occurrence of a capacity abort due to a memory capacity exceeding 30% If it occurs, the transaction can be processed by switching to the second transaction processing technique ('RH-STM') according to the D condition for faster processing.
또한, 상기 트랜잭션 처리 시스템은, 제1 트랜잭션 처리 기법('싱글 글로벌 락')에 따라 트랜잭션을 처리 시 상기 트랜잭션의 수행 사이클을 측정한 결과, HTM으로 처리될 수 없는 크기를 가질 경우, E 조건에 따라 제2 트랜잭션 처리 기법('NOrec-STM')을 이용하여 큰 트랜잭션을 처리할 수 있다.In addition, when the transaction processing system measures the execution cycle of the transaction when processing a transaction according to the first transaction processing technique ('single global lock'), if the transaction processing system has a size that can not be processed by the HTM, Accordingly, it is possible to process a large transaction using the second transaction processing technique ('NOrec-STM').
상기 D, E 조건에 모두 해당하지 않을 경우, 상기 트랜잭션 처리 시스템은, 제1 트랜잭션 처리 기법('싱글 글로벌 락')을 유지한 상태로 트랜잭션을 처리할 수 있다(F 조건). If both of the conditions D and E are not satisfied, the transaction processing system can process the transaction with the first transaction processing technique ('single global lock') (F condition).
또 다른 일례로, 상기 트랜잭션 처리 시스템은 제1 트랜잭션 처리 기법('NOrec-STM')에 따라 트랜잭션을 처리 시 읽기(read), 쓰기(write) 명령 세트를 버퍼에 저장하여 처리할 수 있으나, 트랜잭션의 컨텐션(contention) 정도가 높은 경우 반복적으로 충돌 검증(Validation) 단계에서 다른 트랜잭션과 충돌이 감지될 수 있다.In another example, the transaction processing system can process a transaction according to a first transaction processing technique ('NOrec-STM') by storing a set of read and write instructions in a buffer, The collision with another transaction can be detected repeatedly at the validation step when the contention degree of the transaction is high.
이러한 점을 고려하여, 상기 트랜잭션 처리 시스템은, 제1 트랜잭션 처리 기법('NOrec-STM')에 따라 트랜잭션을 처리 중, 충돌이 일정 비율(예, '80%') 이상 발생되는 경우, G 조건에 따라 제2 트랜잭션 처리 기법(싱글 글로벌 락)으로 전이하여, 트랜잭션을 안전하게 처리할 수 있다.Taking this into consideration, the transaction processing system may be configured to determine whether or not a G-condition (e.g., " NOrec-STM " To a second transaction processing technique (a single global lock), and transactions can be safely handled.
이때, 상기 트랜잭션 처리 시스템은, 충돌이 일정 비율(예, '20%') 이하로 적게 발생되면, 트랜잭션의 컨텐션(contention) 정도가 낮다고 판단하여 H 조건에 따라 처리 속도가 상대적으로 빠른 제2 트랜잭션 처리 기법('RH-STM')으로 전이하여 트랜잭션을 처리할 수 있다.At this time, the transaction processing system determines that the contention degree of the transaction is low if the collision occurs less than a certain rate (for example, 20%), Transaction processing technique ('RH-STM').
상기 G, H 조건에 모두 해당되지 않을 경우, 상기 트랜잭션 처리 시스템은 제1 트랜잭션 처리 기법('NOrec-STM')을 유지한 상태로 트랜잭션을 처리할 수 있다(I 조건).If both of the G and H conditions are not satisfied, the transaction processing system can process the 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 can perform transaction processing that is not processed by the HTM, during processing according to the first transaction processing technique of either RH-STM, NOrec STM, or Single Global Lock, It is possible to switch to and optimize the second transaction processing technique in accordance with the characteristic change of the transaction, thereby improving the processing performance of the transaction.
도 6은 본 발명의 일실시예에 따른 트랜잭션 처리 시스템에서, 멀티 코어 환경에서의 HTM 및 STM 간의 동시성 제어 기법을 설명하기 위한 도면이다.FIG. 6 is a diagram for explaining a concurrency control technique between HTM and STM in a multicore 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, the transaction processing system according to an embodiment of the present invention processes the transactions in the Lite HTM preferentially and processes the RH-STM, NOrec- STM, and single global lock.
이때, 상기 트랜잭션 처리 시스템은, 멀티 코어 환경에서 서로 다른 스레드가 트랜잭션을 처리 시, 공유 메모리로서 HTM 및 STM이 결합된 하이브리드 트랜잭셔널 메모리를 이용하는 경우, 글로벌 클락(global clock) 및 락(Lock) 기반의 효율적인 동시성 제어 기법을 통해, 서로 다른 스레드 사이에서 Lite HTM, RH-STM, NOrec-STM 및 싱글 글로벌 락과 같은 각 트랜잭션 처리 기법이 동시에 수행될 수 있도록 제어하여, 트랜잭션의 처리 성능을 향상시킬 수 있다.At this time, in the case of using a hybrid transactional memory in which HTM and STM are combined as a shared memory when a different thread processes a transaction in a multicore environment, a global clock and a lock are used, Based concurrency control techniques to control transaction processing techniques such as Lite HTM, RH-STM, NOrec-STM, and single global lock between different threads simultaneously to improve transaction processing performance. .
일례로, 도 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 can read the changed value of the variable x in the hybrid transactional memory, which is a shared memory, Since the existing value of y is read as it is, the consistency of the transaction may be broken.
또한, 멀티 코어 환경에서 서로 다른 스레드 사이에서 Lite HTM, RH-STM, NOrec-STM 및 싱글 글로벌 락과 같은 각 트랜잭션 처리 기법이 동시에 수행될 경우 각 기법에 따라 트랜잭션을 처리하는 속도가 다르기 때문에 불필요한 충돌이 발생할 수 있다.Also, when each transaction processing technique such as Lite HTM, RH-STM, NOrec-STM and single global lock is executed concurrently between different threads in a multicore environment, the processing speed of each transaction is different according to each technique. Can occur.
상기 트랜잭션 처리 시스템은, 멀티 코어 환경에서 발생되는 상술한 HTM 및 STM 간의 동시성 제어 문제를 효율적으로 제어하기 위해, 글로벌 클락(global clock)과 두 가지 종류의 락(Lock) 변수(mutex Lock, commit Lock)을 사용하여, 4가지 트랜잭션 처리 기법('HTM', 'RH-STM', 'NOrec-STM', '싱글 글로벌 락')의 일관성 수행을 보장할 수 있다. 이때, 'NOrec-STM'의 경우, 상기 트랜잭션 처리 시스템은 기존의 버퍼 방식을 사용하여 다른 트랜잭션 처리 기법과의 동시성 수행을 보장할 수 있다. In order to efficiently control concurrency control problems between the HTM and the STM generated in a multicore environment, the transaction processing system includes a global clock and two types of lock variables (mutex lock, commit lock ) Can be used to ensure consistency of the four transaction processing techniques ('HTM', 'RH-STM', 'NOrec-STM', 'single global lock'). At this time, in the case of 'NOrec-STM', the transaction processing system can guarantee concurrency with other transaction processing techniques using the existing buffering scheme.
구체적으로, 상기 트랜잭션 처리 시스템은, 모든 트랜잭션 처리 기법('HTM', 'RH-STM', 'NOrec-STM', '싱글 글로벌 락')에서 트랜잭션을 처리 시, 공유 메모리(하이브리드 트랜잭셔널 메모리)에 쓰기(write)를 수행한 후에 글로벌 클락(global clock)을 업데이트 할 수 있다. 이를 통해, 다른 스레드에서 글로벌 클락의 변경을 통해, 공유 메모리의 쓰기(write) 발생을 감지할 수 있다.Specifically, the transaction processing system may include a shared memory (a hybrid transactional memory, a shared memory, etc.) when processing a transaction in all transaction processing schemes ('HTM', 'RH-STM', 'NOrec- ), And then update the global clock. This allows the other thread to detect the write of the shared memory by changing the global clock.
또한, 상기 트랜잭션 처리 시스템은, 트랜잭션 처리 기법 중 '싱글 글로벌 락'에 따라 트랜잭션을 처리 시, 제1 락 변수('mutex Lock')를 설정하여, HTM을 강제로 대기상태로 전환할 수 있다.In addition, the transaction processing system can set the first lock variable ('mutex lock') when the transaction is processed according to the 'single global lock' among the transaction processing techniques, thereby forcibly switching the HTM to the wait state.
또한, 상기 트랜잭션 처리 시스템은, 트랜잭션 처리 기법 중 'Lite HTM' 또는 RH-STM'에 따라 트랜잭션을 처리 시, 상기 제1 락 변수('mutex Lock') 검사를 통해 '싱글 글로벌 락'이 타 스레드에서 수행 중인지 확인 가능하게 할 수 있다.In addition, the transaction processing system, when processing a transaction according to 'Lite HTM' or RH-STM 'among the transaction processing techniques, checks the first lock variable (' mutex lock ' Or the like.
또한, 상기 트랜잭션 처리 시스템은, 트랜잭션 처리 기법 중 STM에서 정상 종료(commit)할 때 사용되는 제2 락 변수('commit Lock')를 설정하여, 서로 다른 스레드에서 동시에 정상 종료(commit)하는 것을 방지할 수 있다.In addition, the transaction processing system sets a second lock variable ('commit lock') to be used when the STM performs a normal termination (commit) among the transaction processing techniques, thereby preventing a normal termination (commit) can do.
이와 같이, 상기 트랜잭션 처리 시스템은, 글로벌 클락(global clock) 및 락(Lock) 기반의 효율적인 동시성 제어 기법을 통해, 멀티 코어 환경에서 서로 다른 스레드에 의해 수행되는 각 트랜잭션 사이의 충돌을 효과적으로 방지할 수 있다.As described above, the transaction processing system can efficiently prevent collision between each transaction performed by different threads in a multicore environment through an effective 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 using a concurrency control technique in a transaction processing system according to an embodiment of the present invention.
도 7을 참조하면, 본 발명의 일실시예에 따른 트랜잭션 처리 시스템은, HTM을 이용하여 트랜잭션을 처리 시, 락(Lock) 검사를 통해 메모리 충돌 가능성을 확인하여, 트랜잭션을 정상 종료(commit) 할 수 있다.Referring to FIG. 7, a transaction processing system according to an embodiment of the present invention checks the possibility of a memory collision through a lock check when a transaction is processed using the HTM, and commits a transaction normally .
상기 트랜잭션 처리 시스템은, HTM을 이용하여 트랜잭션을 처리 시, 다른 스레드에서 싱글 글로벌 락이 수행 중인지 확인하기 위해, 제1 락 변수('mutex_Lock')를 검사할 수 있다. 즉, 상기 트랜잭션 처리 시스템은, 제1 락 변수('mutex_Lock')가 설정되어 있는 경우 상기 HTM을 중단할 수 있다(Line 1).The transaction processing system may check the first lock variable ('mutex_Lock') to check whether a single global lock is being performed in another thread when processing a transaction using the HTM. That is, the transaction processing system can suspend the HTM if the first lock variable ('mutex_Lock') is set (Line 1).
상기 트랜잭션 처리 시스템은, 동시에 수행 중인 STM이 있는지 검사하고 (Line 2), 제2 락 변수('commit_Lock')를 검사하여 STM이 정상 종료(commit)인지 확인할 수 있다.The transaction processing system can check whether there is a concurrent STM (Line 2) and check whether the STM is in a normal commit (commit) by examining a second lock variable ('commit_Lock').
상기 트랜잭션 처리 시스템은 제2 락 변수('commit_Lock')가 설정되어 있지 않으면, 상기 HTM을 중단하고(Line 3), 다른 스레드에서 정상 종료(commit)하고 있지 않다면, 글로벌 클락('global_clock')을 업데이트 한 후(Line 4), 상기 HTM을 정상 종료할 수 있다(Line 5).The transaction processing system stops the HTM (Line 3) if the second lock variable ('commit_Lock') is not set, and sets the global clock ('global_clock') if it is not normally committed After updating (Line 4), the HTM can be terminated normally (Line 5).
도 8은 본 발명의 일실시예에 따른 트랜잭션 처리 시스템에서, 동시성 제어 기법을 적용한 싱글 글로벌 락(SGL) 알고리즘의 일례를 도시한 도면이다.FIG. 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, a transaction processing system according to an embodiment of the present invention includes a first lock variable ('mutex_Lock') for forcibly switching an HTM to a wait state when processing a transaction using a single global lock (SGL) ) And a second lock variable ('commit_Lock') for preventing commit of the RH-STM and the NOrec-STM, and updates the global clock, It is possible to notify other threads 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 can process and commit a transaction according to a single global lock (SGL) scheme by performing an SGL_begin_currency algorithm ('Begin') and an SGL_Commit_currency algorithm (a 'single global lock transaction').
먼저, 상기 트랜잭션 처리 시스템은 SGL_begin_currency 알고리즘을 통해 제2 락 변수('commit_Lock')를 검사하여, 커밋 중인 STM이 존재하는지 확인할 수 있다(Line 1).First, the transaction processing system checks the second lock variable ('commit_Lock') through the SGL_begin_currency algorithm to check whether a committed STM exists (Line 1).
제2 락 변수('commit_Lock')가 설정되어 커밋 중인 STM이 존재할 경우, 상기 트랜잭션 처리 시스템은, 싱글 글로벌 락(SGL)을 이용한 트랜잭션 처리를 대기할 수 있다(Line 2).If a second lock variable ('commit_Lock') is set and there is a committed STM, the transaction processing system may wait for transaction processing using a single global lock (Line 2).
제2 락 변수('commit_Lock')가 설정 해제되어 커밋 중인 STM이 존재하지 않을 경우, 상기 트랜잭션 처리 시스템은, 다른 스레드에서 STM 처리에 따른 공유 메모리(HyTM) 접근을 방지하기 위해 제2 락 변수('commit_Lock')를 설정할 수 있다(Line 3).When the second lock variable ('commit_Lock') is unset and no committed STM exists, the transaction processing system sets the second lock variable (HyTM) to prevent access to the shared memory (HyTM) 'commit_Lock') (Line 3).
또한, 상기 트랜잭션 처리 시스템은, 제1 락 변수('mutex_Lock')를 설정하여 HTM을 대기 상태로 전환 함으로써, HTM과 싱글 글로벌 락(SGL)의 처리에 따른 충돌을 방지할 수 있다(Line 4).In addition, the transaction processing system can prevent a conflict due to processing of the HTM and the single global lock (SGL) by setting the first lock variable ('mutex_Lock') and putting the HTM into a standby state (Line 4) .
상기 트랜잭션 처리 시스템은, 제1 및 제2 락 변수('mutex_Lock' 및 'commit_Lock')를 설정한 상태에서, 싱글 글로벌 락(SGL)을 통해 트랜잭션을 처리할 수 있다(Line 5).The transaction processing system may process a transaction via a single global lock (Line 5) with first and second lock variables ('mutex_Lock' and 'commit_Lock') set.
이후, 상기 트랜잭션 처리 시스템은, SGL_Commit_currency 알고리즘을 통해 제1 및 제2 락 변수('mutex_Lock' 및 'commit_Lock')를 모두 설정 해제(Lock 해제)하고, 공유 메모리인 하이브리드 트랜잭셔널 메모리(HyTM)의 업데이트를 다른 스레드에서도 알 수 있도록 글로벌 클락을 업데이트 할 수 있다(Line 6~8).Thereafter, the transaction processing system unset (unlock) the first and second lock variables ('mutex_Lock' and 'commit_Lock') through the SGL_Commit_currency algorithm, You can update the global clock so that other threads know the update (Line 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, the transaction processing system according to an embodiment of the present invention executes a transaction of a portion of HTMs, i.e., 'PREFIX HTM' and 'POSTFIX HTM' inserted in the STM when processing a transaction using RH- , And can perform a lock check and a global clock (global clock) check.
상기 트랜잭션 처리 시스템은, Begin 알고리즘(Line 1 내지 6)과, RH-STM을 통한 트랜잭션 처리 알고리즘(Line 7 내지 16) 및 Commit 알고리즘(Line 17 내지 28)을 수행 함으로써, RH-STM 기법에 따라 트랜잭션을 처리, 커밋할 수 있다.The transaction processing system performs transaction processing according to the RH-STM technique by performing Begin algorithms (
먼저, 상기 트랜잭션 처리 시스템은, Begin 알고리즘을 통해, 'Prefix HTM'이 실행 가능한지 검사하고, 실행 가능하다면 'Prefix HTM'을 통해 트랜잭션을 처리한다(Line 1).First, the transaction processing system checks whether a 'Prefix HTM' is executable through a Begin algorithm and processes a transaction through 'Prefix HTM' (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 executable, the transaction processing system may process the transaction using the STM and store the global clock in a local clock for conflict checking (see Line 3 ). In addition, the transaction processing system increases the in-flight STM variable so that the HTM can identify whether the STM is executed (Line 4), checks the second lock variable ('commit_Lock'), (Line 5). If the second lock variable ('commit_Lock') is released and there are no committed threads, the transaction processing system processes the transaction using the STM (Line 6).
다음으로, 상기 트랜잭션 처리 시스템은, RH-STM을 통한 트랜잭션 처리 알고리즘에서 읽기(read) 함수와 쓰기(write) 함수를 통해, 트랜잭션의 읽기(read) 및 쓰기(write)를 수행할 수 있다.Next, the transaction processing system can perform read and write operations of 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 being executed by executing a read function, and if the 'prefix HTM' is running, concurrency control based on a cache coherence protocol is possible. You can execute a read command (Line 7).
'prefix HTM'이 현재 구동하고 있지 않을 경우, 상기 트랜잭션 처리 시스템은, STM을 이용해 트랜잭션을 처리하고, 글로벌 클락(global clock)의 변화를 확인하여, 글로벌 클락이 다른 스레드에 의해 다른 값으로 업데이트 될 경우, 상기 STM을 통한 트랜잭션 처리를 중단할 수 있다(Line 8~9).If the 'prefix HTM' is not currently running, the transaction processing system processes the transaction using the STM, checks for a change in the global clock, and updates the global clock to a different value by another thread , The transaction processing through the STM can be stopped (
글로벌 클락의 값이 유지되어 STM을 통해 트랜잭션을 처리하는 동안, 최초의 쓰기 함수('Fitst_write')가 시도되면, 트랜잭션의 읽기(read) 명령을 처리 중이던 'prefix_HTM'을 커밋(commit)하고(Line 10), 'postfix_HTM'으로 전환하여 읽기(read) 및 쓰기(write) 명령 세트를 수행할 수 있다(Line 11).If the first write function ('Fitst_write') is attempted while processing the transaction through the STM because the value of the global clock is maintained, commit the 'prefix_HTM' that was in the process of reading the transaction's read command 10) and 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).At this time, if 'postfix_HTM' is not activated, the transaction processing system checks the second lock variable 'commit_Lock' to check whether it is being committed in another thread (Line 15) and, for safe processing, ('Commit_Lock') to put the HTM in a wait state and switch the STM to an uncommittable state through the first lock variable ('mutex_Lock') (
끝으로, 상기 트랜잭션 처리 시스템은, Commit 알고리즘을 통해, RH-STM 내에서 트랜잭션을 처리하고 있는 기법에 따라 다른 커밋을 수행할 수 있다.Finally, the transaction processing system can perform other commits according to the technique of transaction processing in the RH-STM, through the Commit algorithm.
예를 들어, RH-STM 내부의 'prefix_HTM'으로 트랜잭션의 수행이 완료되었다면, 이는 read-only 트랜잭션이므로, 상기 트랜잭션 처리 시스템은, HTM을 종료할 수 있다(Line 17~18).For example, if the transaction is completed with 'prefix_HTM' in the RH-STM, it is a read-only transaction, so the transaction processing system can terminate the HTM (Line 17-18).
또는, RH-STM 내부의 'postfix HTM'으로 트랜잭션의 수행이 완료되었다면, 상기 트랜잭션 처리 시스템은, STM 처리하는 다른 스레드에서 공유 메모리(HyTM)의 변화를 식별할 수 있도록 글로벌 클락(global clock)의 값을 증가시킨 후, 트랜잭션을 커밋할 수 있다(Line 19~22).Alternatively, if the execution of the transaction is completed with the 'postfix HTM' in the RH-STM, the transaction processing system may use the global clock to identify the change of the shared memory (HyTM) After increasing the value, you can commit the transaction (Line 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).The value of the global clock can be increased to identify the change in the shared memory (HyTM) in the other thread that is processing STM (Line 23-28).
도 10은 본 발명의 일실시예에 따른 트랜잭션 처리 시스템에서, 동시성 제어 기법을 적용한 NOrec-STM 알고리즘의 일례를 도시한 도면이다.10 is a diagram illustrating an example of a NOrec-STM algorithm using a concurrency control technique 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 set of read and write commands in a buffer when processing a transaction using NOrec-STM, ), It is possible to examine the global clock change and check the conflict by comparing the shared memory with the buffer.
상기 트랜잭션 처리 시스템은, Begin 알고리즘(Line 1 내지 3)과, 검증 단계(validation phase 알고리즘)(Line 4 내지 8) 및 Commit 알고리즘(Line 9 내지 12)을 수행 함으로써, NOrec-STM 기법에 따라 트랜잭션을 처리, 커밋할 수 있다.The transaction processing system performs a transaction according to the NOrec-STM scheme by performing a Begin algorithm (
먼저, 상기 트랜잭션 처리 시스템은, Begin 알고리즘을 수행하여, 글로벌 클락(global clock)의 변화 감지를 위해 상기 글로벌 클락을 로컬 클락(Local clock)에 저장하고(Line 1), HTM에서 STM의 실행 여부를 HTM이 식별할 수 있도록 in-flight STM 변수를 증가시킨 후 NOrec-STM 기법에 따라 트랜잭션을 처리할 수 있다(Line 2~3).First, the transaction processing system executes a Begin algorithm, stores the global clock in a local clock (Line 1) to detect a change in a global clock (Line 1), and determines whether to execute the STM in the HTM After the in-flight STM variable is incremented to identify the HTM, the transaction can be processed according to the NOrec-STM method (
다음으로, 상기 트랜잭션 처리 시스템은, 커밋하기 전, 공유 메모리와 버퍼 사이에서 충돌이 발생했는지 여부를 검사하기 위해 validation phase 알고리즘을 수행하여, 제2 락 변수('commit_Lock')가 설정되어 있는 동안, 글로벌 클락의 값이 변경되지 않고 로컬 클락(Local clock)의 값과 일치하는지 검사할 수 있다(Line 5).Next, the transaction processing system performs a validation phase algorithm to check whether a conflict has occurred between the shared memory and the buffer before committing, and while the second lock variable ('commit_Lock') is set, You can check whether the value of the global clock matches the value of the local clock without changing it (Line 5).
상기 트랜잭션 처리 시스템은, 글로벌 클락의 값이 로컬 클락의 값과 일치하지 않고, 공유 메모리의 값과 버퍼의 값이 불일치하면, 트랜잭션 처리를 중단하고(Line 6~7), 로컬 클락의 값을 새로운 글로벌 클락의 값으로 업데이트 하여, 다른 스레드에서 HTM 처리를 통한 커밋이 진행되는 것을 방지할 수 있다(Line 8).When 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 (Line 6-7) It can be updated to the value of the global clock to prevent the commit through HTM processing in other threads from proceeding (Line 8).
또한, 상기 트랜잭션 처리 시스템은, Commit 알고리즘을 수행하여 제2 락 변수('commit_Lock')를 설정하고, 커밋(commit)을 수행할 수 있다(Line 9~10).In addition, the transaction processing system can perform commit and set a second lock variable ('commit_Lock') by executing a commit algorithm (Line 9 to 10).
상기 커밋이 완료되면, 상기 트랜잭션 처리 시스템은, 제2 락 변수('commit_Lock')를 설정 해제하고 in-flight STM 변수를 감소시킬 수 있다(Line 11~12).Upon completion of the commit, the transaction processing system can unset the second lock variable ('commit_Lock') and reduce the in-flight STM variable (Line 11-12).
이하, 도 11에서는 본 발명의 실시예들에 따른 트랜잭션 처리 시스템(100)의 작업 흐름을 상세히 설명한다.Hereinafter, the operation flow of the
도 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 can be performed by the
도 11을 참조하면, 단계(1110)에서, 트랜잭션 처리 시스템(100)은, 이전에 처리된 이전 트랜잭션에 관한 트랜잭션 정보를 기반으로, 개시 명령된 트랜잭션에 대한 크기, 컨텐션(contention) 정도 및 연속 발생된 쓰기(write) 횟수 중 적어도 하나의 특성을 분석한다.Referring to Figure 11, at
즉, 트랜잭션 처리 시스템(100)은 폴백 경로 테이블에 저장된 이전에 처리된 트랜잭션의 정보를 기반으로, HTM(Lite HTM)으로 처리되지 못한 현재의 트랜잭션의 특성을 파악할 수 있다.That is, the
여기서, 폴백 경로 테이블(폴백 패스 테이블)은, 이전에 처리된 트랜잭션의 특성을 분석하여, 최적의 트랜잭션 처리 기법을 선정하기 위한 메타 데이터를 포함할 수 있다.Here, the fallback path table (fallback path table) may include metadata for analyzing characteristics of previously processed transactions and selecting an optimal transaction processing technique.
단계(1120)에서, 트랜잭션 처리 시스템(100)은, HTM(Hardware Transactional Memory)을 제외한, RH-STM, NOrec STM 및 싱글 글로벌 락(Single Global Lock)을 포함하는 트랜잭션 처리 기법 중에서, 상기 특성에 부합하는 어느 하나의 제1 트랜잭션 처리 기법을 선정한다.In
즉, 트랜잭션 처리 시스템(100)은, 상기 HTM에 의해 처리되지 못한 트랜잭션에 대해, 현재의 특성(크기(길이), 컨텐션 정도 및 연속 발생된 쓰기(write) 횟수 등)에 부합하는 최적의 제1 트랜잭션 처리 기법을, RH-STM, NOrec STM 및 싱글 글로벌 락 중에서 선정하고, 상기 제1 트랜잭션 처리 기법에 해당하는 폴백 경로를, Lite HTM 처리 모듈에 제공할 수 있다.That is, the
단계(1130)에서, 트랜잭션 처리 시스템(100)은, 선정된 상기 제1 트랜잭션 처리 기법에 기초하여, 상기 트랜잭션을 처리한다.In
즉, 트랜잭션 처리 시스템(100)은, 설정된 재시도 횟수 이내에서, 상기 HTM을 이용한 처리가 이루어지지 않는 트랜잭션에 대해, 현재의 특성에 적합한 제1 트랜잭션 처리 기법에 해당하는 폴백 경로로 상기 트랜잭션을 이동시켜 처리할 수 있다.That is, within the set number of retries, the
또한, 트랜잭션 처리 시스템(100)은, HTM으로 처리되지 못하는 트랜잭션에 대해, 상기 폴백 경로 테이블을 참조하여, 제1 트랜잭션 처리 기법에 따라 트랜잭션을 처리 중에 변경된 트랜잭션의 특성에 최적화된 제2 트랜잭션 처리 기법으로 트랜잭션을 처리하여, 트랜잭션의 처리 성능을 높일 수 있다.In addition, the
또한, 트랜잭션 처리 시스템(100)은, 멀티 코어 환경에서 서로 다른 스레드에 의해 수행되는 각 트랜잭션 간의 충돌 방지를 위해, 글로벌 클락(global clock)과 락(Lock) 기반으로 동시성 제어를 수행할 수 있다.In addition, the
즉, 트랜잭션 처리 시스템(100)은, 각 제1 트랜잭션 처리 기법에 따라 처리되는 상기 트랜잭션이 정상 종료(commit)하면, 글로벌 클락(global clock)을 업데이트 하여, 상기 트랜잭션의 처리에 따른 하이브리드 트랜잭셔널 메모리(HyTM)의 수정을 타 스레드에 알리고, 제1 트랜잭션 처리 기법에 따라 제1 락 변수('mutex Lock') 또는 제2 락 변수('commit Lock')를 선택적으로 설정(acquire)/설정 해제하여, 멀티 코어 환경에서 서로 다른 스레드가 각 트랜잭션을 처리할 때 발생될 수 있는 충돌을 효과적으로 방지할 수 있다.That is, the
이와 같이, 본 발명의 일실시예에 따르면, Lite HTM에서 우선적으로 트랜잭션 처리를 수행하고, Lite HTM으로 처리할 수 없는 트랜잭션에 대해, 길이 및 컨텐션 정도와 같은 특성 분석에 기반하여, RH-STM, NOrec-STM, 싱글 글로벌 락(Single Global Lock) 중 어느 하나의 최적한 트랜잭션 처리 기법에 따라 처리 함으로써, 트랜잭션 처리 성능을 높일 수 있다.As described above, according to the embodiment of the present invention, for the transactions that are preferentially processed in the Lite HTM and can not be processed by the Lite HTM, the RH-STM , NOrec-STM, and Single Global Lock, thereby improving the transaction processing performance.
본 발명의 실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(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:
130:
140:
Claims (12)
HTM(Hardware Transactional Memory)을 제외한, RH-STM, NOrec STM 및 싱글 글로벌 락(Single Global Lock)을 포함하는 트랜잭션 처리 기법 중에서, 상기 특성에 부합하는 어느 하나의 제1 트랜잭션 처리 기법을 선정하는 단계; 및
선정된 상기 제1 트랜잭션 처리 기법에 기초하여, 상기 트랜잭션을 처리하는 단계
를 포함하는 트랜잭션 처리 방법.Analyzing characteristics of at least one of a size, a contention degree and a consecutively generated number of writes for a transaction to be started based on transaction information about a previous transaction that has been processed before;
Selecting any one of the first transaction processing schemes matching the above property among the transaction processing schemes including RH-STM, NOrec STM, and Single Global Lock except HTM (Hardware Transactional Memory); And
Processing the transaction based on the selected first transaction processing technique
/ RTI >
상기 제1 트랜잭션 처리 기법을 선정하는 단계는,
선정된 폴백 경로(fall-back path) 테이블로부터 식별되는 상기 각 트랜잭션 처리 기법과 연관되는 메타 데이터를 이용하여, 상기 특성에 부합하는 상기 제1 트랜잭션 처리 기법을 선정하는 단계
를 포함하는 트랜잭션 처리 방법.The method according to claim 1,
Wherein the selecting the first transaction processing technique comprises:
Selecting the first transaction processing technique conforming to the property using metadata associated with each transaction processing technique identified from a selected fall-back path table,
/ RTI >
상기 제1 트랜잭션 처리 기법을 선정하는 단계는,
상기 트랜잭션의 처리 중 메모리 용량 초과에 따른 중지(abort) 발생 비율이 임계치에 도달하면,
상기 RH-STM을, 상기 제1 트랜잭션 처리 기법으로 선정하는 단계
를 포함하는 트랜잭션 처리 방법.The method according to claim 1,
Wherein the selecting the first transaction processing technique comprises:
If the rate of abort occurrence due to the memory capacity exceeding the threshold during processing of the transaction,
Selecting the RH-STM as the first transaction processing technique
/ RTI >
상기 제1 트랜잭션 처리 기법을 선정하는 단계는,
상기 트랜잭션의 처리 중 충돌 검증(validation) 시 발생되는 하이브리드 트랜잭셔널 메모리(HyTM)와 버퍼 간의 충돌로 인한 중지 발생 비율이 임계치에 도달하면,
상기 NOrec STM을, 상기 제1 트랜잭션 처리 기법으로 선정하는 단계
를 포함하는 트랜잭션 처리 방법.The method according to claim 1,
Wherein the selecting the first transaction processing technique comprises:
When the rate of interruption due to the collision between the hybrid transactional memory HyTM and the buffer, which is generated during the validation of the transaction, reaches the threshold value,
Selecting the NOrec STM as the first transaction processing technique
/ RTI >
상기 제1 트랜잭션 처리 기법을 선정하는 단계는,
상기 트랜잭션의 처리 중 연속 발생된 쓰기 횟수가 임계치에 도달하면,
상기 싱글 글로벌 락을, 상기 제1 트랜잭션 처리 기법으로 선정하는 단계
를 포함하는 트랜잭션 처리 방법.The method according to claim 1,
Wherein the selecting the first transaction processing technique comprises:
If the number of consecutive writes during the processing of the transaction reaches a threshold value,
Selecting the single global lock as the first transaction processing technique
/ RTI >
상기 트랜잭션을 처리하는 단계는,
설정된 재시도 횟수 이내에서, 상기 HTM을 이용한 상기 트랜잭션의 처리가 이루어지지 않으면,
상기 제1 트랜잭션 처리 기법에 기초하여, 상기 트랜잭션을 처리하는 단계
를 포함하는 트랜잭션 처리 방법.The method according to claim 1,
Wherein the processing the transaction comprises:
If processing of the transaction using the HTM is not performed within the set number of retries,
Based on the first transaction processing technique, processing the transaction
/ RTI >
상기 제1 트랜잭션 처리 기법에 해당하는 폴백 경로로 상기 트랜잭션을 이동시켜 처리하는 단계; 및
상기 제1 트랜잭션 처리 기법에 따라 상기 트랜잭션을 처리하는 동안, 상기 트랜잭션의 특성이 변경되면, 상기 변경되는 특성에 따른 제2 트랜잭션 처리 기법으로 전이하여 상기 트랜잭션을 처리하는 단계
를 더 포함하는 트랜잭션 처리 방법.The method according to claim 1,
Moving the transaction to a fallback path corresponding to the first transaction processing technique and processing the transaction; And
When the characteristics of the transaction are changed while processing the transaction according to the first transaction processing technique, processing the transaction by transitioning to a second transaction processing technique according to the changed property
The transaction processing method further comprising:
멀티 코어 환경에서 서로 다른 스레드에 의해 수행되는 각 트랜잭션이 상기 HTM을 이용하여 처리되지 않으면,
상기 각 트랜잭션의 특성을 고려하여 선정되는 각각의 제1 트랜잭션 처리 기법에 기초하여, 상기 각 트랜잭션의 동시 처리를 허용하는 단계
를 더 포함하는 트랜잭션 처리 방법.The method according to claim 1,
If each transaction performed by a different thread in a multicore environment is not handled using the HTM,
Allowing simultaneous processing of each transaction based on each first transaction processing technique selected in consideration of the characteristics of each transaction;
Further comprising:
임의의 스레드에서 상기 제1 트랜잭션 처리 기법에 따라 처리되는 상기 트랜잭션이 정상 종료(commit)하면,
글로벌 클락(global clock)을 업데이트 하여, 상기 트랜잭션의 처리에 따른 하이브리드 트랜잭셔널 메모리(HyTM)의 수정을 타 스레드에 알리는 단계
를 더 포함하는 트랜잭션 처리 방법.The method according to claim 1,
If the transaction being processed in accordance with the first transaction processing technique in any thread commits normally,
Updating the global clock to notify the other thread of the modification of the hybrid transactional memory HyTM according to the processing of the transaction
The transaction processing method further comprising:
상기 제1 트랜잭션 처리 기법이, 싱글 글로벌 락인 경우,
제1 락 변수('mutex Lock')를 설정하여, 상기 HTM을 강제로 대기상태로 전환하는 단계;
제2 락 변수('commit Lock')를 설정하여, RH-STM 또는 NOrec STM에서, 서로 다른 스레드에서 동시에 트랜잭션이 정상 종료(commit)하는 것을 방지하는 단계; 및
상기 제1 및 제2 락 변수를 설정한 상태에서, 상기 싱글 글로벌 락에 따라 상기 트랜잭션을 처리하는 단계
를 더 포함하는 트랜잭션 처리 방법.10. The method of claim 9,
If the first transaction processing scheme is a single global lock,
Setting a first lock variable ('mutex lock') and forcibly switching the HTM to a standby state;
Setting a second lock variable ('commit Lock') prevents RH-STM or NOrec STM from concurrently committing transactions on different threads at the same time; And
Processing the transaction in accordance with the single global lock, with the first and second lock variables being set
The transaction processing method further comprising:
HTM을 제외한, RH-STM, NOrec STM 및 싱글 글로벌 락을 포함하는 트랜잭션 처리 기법 중에서, 상기 특성에 부합하는 어느 하나의 제1 트랜잭션 처리 기법을 선정하는 선정부; 및
선정된 상기 제1 트랜잭션 처리 기법에 기초하여, 상기 트랜잭션을 처리하는 처리부
를 포함하는 트랜잭션 처리 시스템.An analysis unit for analyzing at least one of a size, a contention degree and a consecutively generated number of writes for a transaction to be started based on transaction information regarding a previous transaction that has been processed before;
A selection unit that selects any one of the first transaction processing schemes matching the characteristic among the transaction processing schemes including the RH-STM, the NOrec STM, and the single global lock except for the HTM; And
Based on the selected first transaction processing technique,
The transaction processing system comprising:
상기 처리부는,
상기 제1 트랜잭션 처리 기법에 해당하는 폴백 경로로 상기 트랜잭션을 이동시켜 처리하고,
상기 제1 트랜잭션 처리 기법에 따라 상기 트랜잭션을 처리하는 동안, 상기 트랜잭션의 특성이 변경되면, 상기 변경되는 특성에 따른 제2 트랜잭션 처리 기법으로 전이하여 상기 트랜잭션을 처리하는
트랜잭션 처리 시스템.12. The method of claim 11,
Wherein,
Moving the transaction to a fallback path corresponding to the first transaction processing technique,
When the characteristics of the transaction are changed while processing the transaction according to the first transaction processing technique, the transaction is transferred to the second transaction processing technique according to the changed property to process the transaction
Transaction processing system.
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 true KR20190088641A (en) | 2019-07-29 |
KR102007117B1 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) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20080076981A (en) * | 2005-12-30 | 2008-08-20 | 인텔 코오퍼레이션 | Unbounded transactional memory systems |
KR20120104364A (en) * | 2009-12-15 | 2012-09-20 | 인텔 코오퍼레이션 | Performing mode switching in an unbounded transactional memory (utm) system |
KR20160107233A (en) * | 2014-01-13 | 2016-09-13 | 에이알엠 리미티드 | A data processing system and method for handling multiple transactions |
KR20160113205A (en) * | 2014-03-26 | 2016-09-28 | 인텔 코포레이션 | Software replayer for transactional memory programs |
KR20160113207A (en) * | 2014-03-26 | 2016-09-28 | 인텔 코포레이션 | Enabling maximum concurrency in a hybrid transactional memory system |
-
2018
- 2018-01-19 KR KR1020180006959A patent/KR102007117B1/en active IP Right Grant
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20080076981A (en) * | 2005-12-30 | 2008-08-20 | 인텔 코오퍼레이션 | Unbounded transactional memory systems |
KR20120104364A (en) * | 2009-12-15 | 2012-09-20 | 인텔 코오퍼레이션 | Performing mode switching in an unbounded transactional memory (utm) system |
KR20160107233A (en) * | 2014-01-13 | 2016-09-13 | 에이알엠 리미티드 | A data processing system and method for handling multiple transactions |
KR20160113205A (en) * | 2014-03-26 | 2016-09-28 | 인텔 코포레이션 | Software replayer for transactional memory programs |
KR20160113207A (en) * | 2014-03-26 | 2016-09-28 | 인텔 코포레이션 | Enabling maximum concurrency in a hybrid transactional memory system |
Also Published As
Publication number | Publication date |
---|---|
KR102007117B1 (en) | 2019-08-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Giles et al. | Softwrap: A lightweight framework for transactional support of storage class memory | |
US8037476B1 (en) | Address level log-based synchronization of shared data | |
US7653791B2 (en) | Realtime-safe read copy update with per-processor read/write locks | |
US8464261B2 (en) | System and method for executing a transaction using parallel co-transactions | |
US8402464B2 (en) | System and method for managing contention in transactional memory using global execution data | |
US8914620B2 (en) | Method and system for reducing abort rates in speculative lock elision using contention management mechanisms | |
US8417897B2 (en) | System and method for providing locale-based optimizations in a transactional memory | |
US8881153B2 (en) | Speculative thread execution with hardware transactional memory | |
US7765364B2 (en) | Concurrent execution of critical sections by eliding ownership of locks | |
US9183043B2 (en) | Systems and methods for adaptive integration of hardware and software lock elision techniques | |
US8103838B2 (en) | System and method for transactional locking using reader-lists | |
US9652169B2 (en) | Adaptive concurrency control using hardware transactional memory and locking mechanism | |
KR20170121219A (en) | Apparatus and method for generating trace data in response to transaction execution | |
US20180260231A1 (en) | Enhanced performance for graphical processing unit transactional memory | |
US20170052726A1 (en) | Execution of program region with transactional memory | |
US9311260B2 (en) | Context preservation during thread level speculative execution | |
CN112035222B (en) | Transaction operation merging execution method and device based on log analysis synchronization | |
US7337274B2 (en) | Computer and control method | |
KR101885030B1 (en) | Transaction processing method in hybrid transactional memory system and transaction processing apparatus | |
KR20190088641A (en) | Method and system for processing transaction | |
US11734051B1 (en) | RTOS/OS architecture for context switching that solves the diminishing bandwidth problem and the RTOS response time problem using unsorted ready lists | |
KR102184841B1 (en) | Method and device for recovering transaction in hybrid transactional memory | |
KR102150597B1 (en) | Method for operating hybrid transactional memory system with optimal retry policy, and hybrid transactional memory system | |
US9990269B2 (en) | Apparatus and method for controlling debugging of program instructions including a transaction | |
CN111930693A (en) | Transaction merging execution method and device based on log analysis synchronization |
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 |