[go: up one dir, main page]

KR20150087743A - Method and apparatus for controlling a memory synchronization on multi-threading processor - Google Patents

Method and apparatus for controlling a memory synchronization on multi-threading processor Download PDF

Info

Publication number
KR20150087743A
KR20150087743A KR1020140008012A KR20140008012A KR20150087743A KR 20150087743 A KR20150087743 A KR 20150087743A KR 1020140008012 A KR1020140008012 A KR 1020140008012A KR 20140008012 A KR20140008012 A KR 20140008012A KR 20150087743 A KR20150087743 A KR 20150087743A
Authority
KR
South Korea
Prior art keywords
memory
thread
pool
memory pool
synchronization
Prior art date
Legal status (The legal status 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 status listed.)
Withdrawn
Application number
KR1020140008012A
Other languages
Korean (ko)
Inventor
오재천
이동훈
Original Assignee
주식회사 인프라웨어
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 인프라웨어 filed Critical 주식회사 인프라웨어
Priority to KR1020140008012A priority Critical patent/KR20150087743A/en
Publication of KR20150087743A publication Critical patent/KR20150087743A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)

Abstract

본 발명은 멀티 쓰레딩 프로세서 (multi-threading processor) 에서의 메모리 동기화 제어 방법 및 장치에 관한 것으로서, 보다 상세하게는 시스템 메모리에 하나 이상의 쓰레드에 대응하는 메모리풀 (Memory-Pool) 을 생성하여 쓰레드 별로 대응하는 메모리풀 각각에 대한 동기화를 제어하는 방법 및 장치에 관한 것이다.
본 발명에 따른 멀티 쓰레딩 프로세서에서의 메모리 동기화 제어 방법은, 쓰레드의 생성에 대응하여 시스템 메모리로부터 할당된 메모리풀을 생성하는 단계, 메모리풀을 구분할 수 있는 식별자를 등록하는 단계, 메모리풀에 대한 동기화변수를 생성하여 쓰레드와 매핑 (mapping) 하는 단계, 메모리풀로부터 쓰레드에 메모리를 할당하는 단계, 쓰레드의 소멸에 대응하여 할당 받은 메모리를 메모리풀로 반환하는 단계, 메모리풀에 대한 시스템 메모리를 해제하는 단계 및 동기화변수를 삭제하는 단계를 포함한다.
본 발명의 멀티 쓰레딩 프로세서에서의 메모리 동기화 제어 방법에 따르면, 시스템 메모리에 하나 이상의 쓰레드에 대응하는 메모리풀 (Memory-Pool) 을 생성하여 쓰레드 별로 대응하는 메모리풀 각각에 대해 동기화를 수행함으로써, 메모리 동기화에 소요되는 대기시간을 절약하고, 하드웨어 및 메모리를 효율적으로 사용할 수 있는 효과가 있다.
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory synchronization control method and apparatus in a multi-threading processor, and more particularly, to a memory-pool control method and apparatus for a memory- And more particularly to a method and apparatus for controlling synchronization for each of the memory pools.
A memory synchronization control method in a multi-threading processor according to the present invention includes: generating a memory pool allocated from a system memory in response to generation of a thread; registering an identifier capable of identifying a memory pool; Mapping the thread to a thread, allocating memory to the thread from the memory pool, returning the allocated memory to the memory pool in response to the thread's expiration, releasing the system memory for the memory pool, And deleting the step and synchronization variable.
According to the memory synchronization control method in the multithreading processor of the present invention, a memory pool corresponding to one or more threads is created in the system memory to perform synchronization for each corresponding memory pool for each thread, It is possible to save the waiting time required for the hardware and the memory, and to use the hardware and the memory efficiently.

Description

멀티 쓰레딩 프로세서에서의 메모리 동기화 제어 방법 및 장치{METHOD AND APPARATUS FOR CONTROLLING A MEMORY SYNCHRONIZATION ON MULTI-THREADING PROCESSOR}METHOD AND APPARATUS CONTROLLING A MEMORY SYNCHRONIZATION ON MULTI-THREADING PROCESSOR BACKGROUND OF THE INVENTION [0001]

본 발명은 멀티 쓰레딩 프로세서 (multi-threading processor) 에서의 메모리 동기화 제어 방법 및 장치에 관한 것으로서, 보다 상세하게는 시스템 메모리에 하나 이상의 쓰레드에 대응하는 메모리풀 (Memory-Pool) 을 생성하여 쓰레드 별로 대응하는 메모리풀 각각에 대한 동기화를 제어하는 방법 및 장치에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory synchronization control method and apparatus in a multi-threading processor, and more particularly, to a memory-pool control method and apparatus for a memory- And more particularly to a method and apparatus for controlling synchronization for each of the memory pools.

최근 컴퓨팅 장치에 관한 집적 회로 기술이 발전함에 따라, 멀티 코어 (multi-core) CPU 및 대용량의 메모리 기술을 활용한 멀티 쓰레딩 프로세서 (Multi-Threading Processor) 가 보편화 되고 있다.Background of the Invention [0002] With the development of integrated circuit technology for computing devices, a multi-core CPU and a multi-threading processor utilizing a large-capacity memory technology have become popular.

종래 일반적으로 사용되는 메모리 동기화 방식에서는 다수의 쓰레드가 사용된다 하더라도 한 순간에 하나의 쓰레드에서만 메모리에 접근할 수 있기 때문에, 나머지 쓰레드에서는 메모리 접근에 대한 잠금이 해제될 때까지 메모리에 대한 접근이 불가능 했다. 또한, 다수의 쓰레드에서 메모리 할당과 해제를 빈번하게 할수록 메모리 동기화로 인한 대기시간으로 인해 성능저하가 발생하는 문제점이 있었다. 이와 관련하여 다수의 쓰레드와 메모리의 동기화를 위한 일부 기술 또한 쓰레드에서 메모리에 대한 접근방식을 개선하였을 뿐, 멀티 코어 CPU 및 대용량의 메모리를 바탕으로 한 멀티 쓰레딩 프로세서를 제대로 활용하지 못하는 문제점이 있었다.In the conventional memory synchronization method, even though a plurality of threads are used, since only one thread can access the memory at a moment, the remaining threads can not access the memory until the memory access is released. did. Further, as the memory allocation and release are frequently performed in a plurality of threads, there is a problem that performance is deteriorated due to waiting time due to memory synchronization. In this regard, some techniques for synchronizing a plurality of threads and memories have also improved the approach to memory in a thread, but have not been able to utilize a multi-core CPU and a multi-threading processor based on a large amount of memory.

따라서, 멀티 쓰레딩 프로세서에서 쓰레드와 메모리를 동기화함에 있어, 멀티 코어 CPU 및 대용량의 메모리를 효율적으로 활용할 수 있는 메모리 동기화 방법 및 장치에 관한 개발이 요구되었다.Therefore, in order to synchronize a thread and a memory in a multi-threading processor, development of a memory synchronization method and apparatus capable of efficiently utilizing a multi-core CPU and a large-capacity memory has been required.

본 발명이 해결하고자 하는 과제는 멀티 쓰레딩 프로세서에서, 시스템 메모리에 하나 이상의 쓰레드에 대응하는 메모리풀 (Memory-Pool) 을 생성하여 쓰레드 별로 대응하는 메모리풀 각각에 대해 동기화를 수행함으로써, 메모리 동기화에 소용되는 대기시간을 절약함에 있다.SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems occurring in the prior art, and it is an object of the present invention to provide a multi-threading processor capable of generating a memory-pool corresponding to one or more threads in a system memory, In order to reduce the waiting time.

본 발명이 해결하고자 다른 하는 과제는 멀티 쓰레딩 프로세서에서 메모리 동기화에 소요되는 대기시간을 최소화하여 수행함으로써, 하드웨어 및 메모리를 효율적으로 사용함에 있다.Another object of the present invention is to efficiently utilize hardware and memory by minimizing the waiting time required for memory synchronization in a multi-threading processor.

본 발명의 과제들은 이상에서 언급한 과제로 제한되지 않으며, 언급되지 않은 또 다른 과제들은 아래의 기재로부터 당업자에게 명확하게 이해될 수 있을 것이다.The problems of the present invention are not limited to the above-mentioned problems, and other problems not mentioned can be clearly understood by those skilled in the art from the following description.

전술한 바와 같은 과제를 해결하기 위한 본 발명에 따른 멀티 쓰레딩 프로세서에서의 메모리 동기화 제어 방법은, 쓰레드의 생성에 대응하여 시스템 메모리로부터 할당된 메모리풀을 생성하는 단계, 메모리풀을 구분할 수 있는 식별자를 등록하는 단계, 메모리풀에 대한 동기화변수를 생성하여 쓰레드와 매핑 (mapping) 하는 단계, 메모리풀로부터 쓰레드에 메모리를 할당하는 단계, 쓰레드의 소멸에 대응하여 할당 받은 메모리를 메모리풀로 반환하는 단계, 메모리풀에 대한 시스템 메모리를 해제하는 단계 및 동기화변수를 삭제하는 단계를 포함한다.According to an aspect of the present invention, there is provided a method for controlling memory synchronization in a multi-threading processor, the method comprising: generating a memory pool allocated from a system memory in response to generation of a thread; Creating a synchronization variable for the memory pool and mapping it to the thread, allocating memory to the thread from the memory pool, returning the memory allocated to the thread to the memory pool, Releasing system memory for the memory pool, and deleting the synchronization variable.

본 발명의 다른 특징에 따르면, 쓰레드에 메모리풀로부터 메모리를 할당하는 단계는, 메모리풀에 대한 동기화변수를 고정하는 단계, 쓰레드에 메모리풀의 메모리를 할당하고, 식별자를 메모리에 기록하는 단계 및 메모리풀에 대한 동기화변수의 고정을 해제하는 단계를 포함하는 것을 특징으로 한다.According to another aspect of the invention, allocating memory from a memory pool to a thread includes: pinning a synchronization variable for the memory pool; allocating memory for the thread to the thread; writing the identifier to the memory; And unlocking the synchronization variable for the pool.

본 발명의 또 다른 특징에 따르면, 메모리풀을 해제하는 단계는, 메모리로부터 식별자를 검출하는 단계, 식별자를 가지는 메모리풀에 대한 동기화변수를 고정하는 단계, 메모리를 메모리풀로 반환하는 단계 및 메모리풀에 대한 동기화변수의 고정을 해제하는 단계를 포함하는 것을 특징으로 한다.According to another aspect of the present invention, the step of releasing the memory pool comprises the steps of: detecting an identifier from memory; pinning a synchronization variable for the memory pool having the identifier; returning the memory to the memory pool; And releasing the fixation of the synchronization variable with respect to the synchronization variable.

본 발명의 또 다른 특징에 따르면, 쓰레드는 복수 개인 것을 특징으로 한다.According to another aspect of the present invention, a plurality of threads are provided.

전술한 바와 같은 과제를 해결하기 위하여 본 발명의 일 실시예에 따른 컴퓨터 판독가능매체는 명령어들의 세트를 포함하는 컴퓨터 판독가능매체로서, 명령어들의 세트는, 쓰레드의 생성에 대응하여 시스템 메모리로부터 할당된 메모리풀을 생성하고, 메모리풀을 구분할 수 있는 식별자를 등록하고, 메모리풀에 대한 동기화변수를 생성하여 쓰레드와 매핑 (mapping) 하고, 메모리풀로부터 쓰레드에 메모리를 할당하고, 쓰레드의 소멸에 대응하여 할당 받은 메모리를 메모리풀로 반환하고, 메모리풀에 대한 시스템 메모리를 해제하고, 동기화변수를 삭제하게 하는 것을 특징으로 한다.According to an aspect of the present invention, there is provided a computer-readable medium including a set of instructions, the set of instructions including instructions for: It creates a memory pool, registers an identifier that can identify the memory pool, creates a synchronization variable for the memory pool, maps it to the thread, allocates memory from the memory pool to the thread, Returning the allocated memory to the memory pool, releasing the system memory for the memory pool, and deleting the synchronization variable.

본 발명의 다른 특징에 따르면, 쓰레드에 메모리풀로부터 메모리를 할당하게 하는 명령어들의 세트는, 메모리풀에 대한 동기화변수를 고정하고, 쓰레드에 메모리풀의 메모리를 할당하고, 식별자를 메모리에 기록하고, 메모리풀에 대한 동기화변수의 고정을 해제하게 하는 명령어들의 세트를 포함하는 것을 특징으로 한다.In accordance with another aspect of the present invention, a set of instructions for causing a thread to allocate memory from a memory pool includes fixing a synchronization variable for the memory pool, allocating memory for the memory pool to the thread, And a set of instructions to cause the unlocking of the synchronization variables for the memory pool.

본 발명의 또 다른 특징에 따르면, 메모리풀을 해제하게 하는 명령어들의 세트는, 메모리로부터 상기 식별자를 검출하고, 식별자를 가지는 메모리풀에 대한 동기화변수를 고정하고, 메모리를 메모리풀로 반환하고, 메모리풀에 대한 동기화변수의 고정을 해제하게 하는 명령어들의 세트를 포함하는 것을 특징으로 한다.In accordance with another aspect of the present invention, a set of instructions for causing a memory pool to be released includes detecting the identifier from memory, fixing a synchronization variable for the memory pool having the identifier, returning the memory to the memory pool, And a set of instructions for causing the synchronization variable for the pool to be unlocked.

본 발명의 또 다른 특징에 따르면, 쓰레드는 복수 개인 것을 특징으로 한다.According to another aspect of the present invention, a plurality of threads are provided.

전술한 바와 같은 과제를 해결하기 위한 본 발명에 따른 멀티 쓰레딩 프로세서에서의 메모리 동기화 제어 장치는, 쓰레드의 생성에 대응하여 시스템 메모리로부터 할당된 메모리풀을 생성하고, 메모리풀을 구분할 수 있는 식별자를 등록하고, 메모리풀에 대한 동기화변수를 생성하여 쓰레드와 매핑 (mapping) 하고, 메모리풀로부터 쓰레드에 메모리를 할당하고, 쓰레드의 소멸에 대응하여 할당 받은 메모리를 메모리풀로 반환하고, 메모리풀에 대한 시스템 메모리를 해제하고, 동기화변수를 삭제하는 제어부 및 쓰레드의 생성 및 소멸을 인식하여 제어부에 전달하는 인식부를 포함한다.According to an aspect of the present invention, there is provided an apparatus for controlling a memory synchronization in a multithreading processor, the apparatus comprising: a memory pool allocated from a system memory in response to generation of a thread; And allocates memory to the thread from the memory pool, returns the allocated memory to the memory pool in response to the termination of the thread, and writes the system to the memory pool A control unit for releasing the memory and deleting the synchronization variable, and a recognition unit for recognizing generation and disappearance of the thread and transmitting the recognition to the control unit.

본 발명의 멀티 쓰레딩 프로세서에서의 메모리 동기화 제어 방법 및 장치에 따르면, 시스템 메모리에 하나 이상의 쓰레드에 대응하는 메모리풀 (Memory-Pool) 을 생성하여 쓰레드 별로 대응하는 메모리풀 각각에 대해 동기화를 수행함으로써, 메모리 동기화에 소요되는 대기시간을 절약하는 효과가 있다.According to the method and apparatus for controlling memory synchronization in a multi-threading processor of the present invention, a memory pool corresponding to one or more threads is created in a system memory to perform synchronization for each corresponding memory pool for each thread, This has the effect of saving the waiting time for memory synchronization.

본 발명의 멀티 쓰레딩 프로세서에서의 메모리 동기화 제어 방법 및 장치에 따르면, 메모리 동기화에 소요되는 대기시간을 최소화하여 수행함으로써, 하드웨어 및 메모리를 효율적으로 사용할 수 있는 효과가 있다.According to the method and apparatus for controlling memory synchronization in the multithreading processor of the present invention, it is possible to efficiently utilize hardware and memory by minimizing the waiting time required for memory synchronization.

본 발명에 따른 효과는 이상에서 예시된 내용에 의해 제한되지 않으며, 더욱 다양한 효과들이 본 명세서 내에 포함되어 있다.The effects according to the present invention are not limited by the contents exemplified above, and more various effects are included in the specification.

도 1은 본 발명의 일 실시예에 따른 멀티 쓰레딩 프로세서에서의 메모리 동기화 제어 알고리즘의 개략적인 구성을 도시한 것이다.
도 2a 및 도 2b는 멀티 쓰레딩 프로세서에서의 일반적인 메모리 동기화 구조 및 본 발명의 일 실시예에 따른 메모리 동기화 구조의 일 태양을 도시한 것이다.
도 3은 본 발명의 일 실시예에 따른 멀티 쓰레딩 프로세서에서의 메모리 동기화 제어 방법의 절차도이다.
도 4a 및 도 4b는 본 발명의 일 실시예에 따른 멀티 쓰레딩 프로세서에서의 메모리 동기화 제어 방법의 절차도이다.
1 shows a schematic configuration of a memory synchronization control algorithm in a multithreading processor according to an embodiment of the present invention.
2A and 2B illustrate a general memory synchronization structure in a multi-threading processor and an embodiment of a memory synchronization structure according to an embodiment of the present invention.
3 is a flowchart of a method for controlling memory synchronization in a multi-threading processor according to an embodiment of the present invention.
4A and 4B are flowcharts of a method for controlling memory synchronization in a multi-threading processor according to an embodiment of the present invention.

본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 것이며, 단지 본 실시예들은 본 발명의 개시가 완전하도록 하며, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 발명은 청구항의 범주에 의해 정의될 뿐이다.BRIEF DESCRIPTION OF THE DRAWINGS The advantages and features of the present invention and the manner of achieving them will become apparent with reference to the embodiments described in detail below with reference to the accompanying drawings. The present invention may, however, be embodied in many different forms and should not be construed as being limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art. Is provided to fully convey the scope of the invention to those skilled in the art, and the invention is only defined by the scope of the claims.

비록 제1, 제2 등이 다양한 구성요소들을 서술하기 위해서 사용되나, 이들 구성요소들은 이들 용어에 의해 제한되지 않음은 물론이다. 이들 용어들은 단지 하나의 구성요소를 다른 구성요소와 구별하기 위하여 사용하는 것이다. 따라서 이하에서 언급되는 제1 구성요소는 본 발명의 기술적 사상 내에서 제2 구성요소일 수도 있음은 물론이다.Although the first, second, etc. are used to describe various components, it goes without saying that these components are not limited by these terms. These terms are used only to distinguish one component from another. Therefore, it is needless to say that the first component mentioned below may be the second component within the technical spirit of the present invention.

본 명세서에서 도면부호를 사용함에 있어, 도면이 상이한 경우라도 동일한 구성을 도시하고 있는 경우에는 별도로 명시하지 않는 이상 동일한 도면부호를 사용한다.In the drawings, the same reference numerals are used for the same elements in different drawings unless otherwise indicated.

본 발명의 여러 실시예들의 각각 특징들이 부분적으로 또는 전체적으로 서로 결합 또는 조합 가능하며, 당업자가 충분히 이해할 수 있듯이 기술적으로 다양한 연동 및 구동이 가능하며, 각 실시예들이 서로에 대하여 독립적으로 실시 가능할 수도 있고 연관 관계로 함께 실시 가능할 수도 있다.It is to be understood that each of the features of the various embodiments of the present invention may be combined or combined with each other partially or entirely and technically various interlocking and driving is possible as will be appreciated by those skilled in the art, It may be possible to cooperate with each other in association.

본 명세서에서 전송이란, 수신객체와 전송객체 간에 정보 및 신호를 직접 전송하는 것에 한정하지 않고, 다른 구성요소를 경유하여 전송하는 것을 포함한다.Transmission is not limited to transmission of information and signals directly between a receiving object and a transmitting object, but includes transmission through other components.

본 명세서에서 쓰레드란 컴퓨팅 프로그램 내에서, 특히 프로세스 내에서의 작업을 실행하는 제어흐름 또는 실행단위를 의미하며, 멀티 쓰레딩 프로세서 (multi-threading processor) 란 컴퓨팅 프로그램 내에서 복수 개의 쓰레드가 동시에 동작하여 여러 작업을 동시에 처리하거나 한 작업을 병렬로 분할하여 처리할 수 있는 프로세서를 의미한다.In this specification, a thread refers to a control flow or an execution unit that executes a task in a computing program, in particular, a process. A multi-threading processor is a program in which a plurality of threads operate simultaneously Means a processor that can process a task concurrently or divide one task in parallel.

본 명세서에서 시스템 메모리란 스택 (stack) 영역, 힙 (heap) 영역, 데이터 (data) 영역 및 코드 (code) 영역 등 사용자 또는 컴퓨팅 프로그램에 의해 사용되는 각종 변수의 저장 영역 및 명령어들의 영역을 포함한 전체 영역을 의미한다.As used herein, a system memory refers to an entire memory including a storage area of various variables used by a user or a computing program, such as a stack area, a heap area, a data area, and a code area, Area.

메모리풀 (Memory-Pool) 이란 컴퓨팅 프로그램이 실행되는 동안 필요에 의해서 할당 및 해제가 되는 메모리 영역에 해당하는 힙 영역의 메모리를 특정 크기로 할당한 블록 단위의 메모리를 의미하며, 메모리풀에서 메모리를 할당한다 함은, 메모리풀이 생성된 힙 영역의 메모리를, 메모리를 필요로 하는 곳에 할당하는 것을 의미한다.A memory-pool is a block-by-block memory having a specific size allocated to a heap area corresponding to a memory area that is allocated and released as needed during execution of a computing program. Assignment means allocating the memory of the heap area in which the memory pool is created to a place where memory is needed.

이하, 첨부된 도면을 참조하여 본 발명의 다양한 실시예들을 상세히 설명한다.Various embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

도 1은 본 발명의 일 실시예에 따른 멀티 쓰레딩 프로세서에서의 메모리 동기화 제어 알고리즘의 개략적인 구성을 도시한 것이다.1 shows a schematic configuration of a memory synchronization control algorithm in a multithreading processor according to an embodiment of the present invention.

도 1을 참조하면, 본 발명의 일 실시예에 따른 멀티 쓰레딩 프로세서에서의 메모리 동기화 제어 알고리즘을 수행하는 장치 (100) (이하 ‘메모리 동기화 제어 장치’라 함) 는 인식부 (110) 및 제어부 (120) 를 포함한다.1, an apparatus 100 for performing a memory synchronization control algorithm in a multithreading processor according to an embodiment of the present invention (hereinafter, referred to as a 'memory synchronization control apparatus') includes a recognition unit 110 and a control unit 120).

본 발명의 일 실시예에 따른 메모리 동기화 제어 장치 (100) 는 멀티 쓰레드를 활용하여 컴퓨팅 작업을 수행할 수 있는 기능을 구비하는 장치로서, 컴퓨터, 노트북, 스마트폰 (smart phone), 테플릿 (tablet) 컴퓨터 등의 단말일 수 있으며, 멀티 쓰레드 프로세서가 수행 가능한 중앙처리장치 및 시스템 메모리를 구비한 장치라면 어느 특정한 단말에 국한되지 않는다.The memory synchronization control apparatus 100 according to an embodiment of the present invention is an apparatus having a function capable of performing a computing task utilizing a multi-thread, and includes a computer, a notebook, a smart phone, a tablet ) Computers, and the present invention is not limited to any particular terminal as long as it is a device having a central processing unit and a system memory capable of executing a multithreaded processor.

메모리 동기화 제어 장치 (100) 의 인식부 (110) 는 쓰레드의 생성 및 소멸을 인식하여 후술할 제어부 (120) 에 전달한다. The recognition unit 110 of the memory synchronization control apparatus 100 recognizes the generation and disappearance of the thread and delivers the thread to the control unit 120 to be described later.

쓰레드는 실행 중인 프로그램을 의미하는 프로세스 (process) 에서 실행 제어만 분리한 실행 단위로서, 프로세서를 사용하는 기본 단위인 동시에 명령어를 독릭접으로 실행할 수 있는 하나의 제어흐름을 나타낸다. 본 발명의 일 실시예에 따른 메모리 동기화 제어 장치 (100) 의 인식부 (110) 가 인식하는 쓰레드의 생성은, 하나의 프로세스에서 생성된 하나 이상의 쓰레드 및 다수의 프로세스로부터 생성된 각각의 쓰레드를 모두 포함하며, 쓰레드의 소멸 또한 전술한 쓰레드들을 모두 포함하여 인식한다.A thread is a unit of execution in which only execution control is separated in a process which means a program being executed. It is a basic unit using a processor and represents a single control flow that can execute an instruction singly. The generation of a thread recognized by the recognition unit 110 of the memory synchronization control apparatus 100 according to an exemplary embodiment of the present invention is performed by using one or more threads created in one process and each thread And the extinction of the thread also includes all of the above-mentioned threads.

제어부 (120) 는 인식부 (110) 로부터 전달받은 쓰레드의 생성 및 소멸에 대응하여 시스템 메모리에 저장된 프로그램이나 명령어 세트를 실행하는 등의 연산을 수행함으로써, 메모리풀 및 메모리풀에 대한 동기화변수와 식별자를 생성하거나 해제한다. 또한, 메모리풀로부터 쓰레드에 메모리를 할당하고, 할당한 메모리를 메모리풀로 반환하도록 구성된다. 이러한 제어부 (120) 의 메모리 동기화 제어를 수행하는 과정 및 방법에 관해서는 도 3 및 도 4에서 상세히 후술한다.The control unit 120 performs operations such as executing a program or a set of instructions stored in the system memory in response to the generation and destruction of the thread received from the recognition unit 110, thereby obtaining a synchronization variable for the memory pool and the memory pool, . It is also configured to allocate memory from the memory pool to the thread and return the allocated memory to the memory pool. A process and a method for performing the memory synchronization control of the controller 120 will be described later in detail with reference to FIGS. 3 and 4. FIG.

도 2a는 멀티 쓰레딩 프로세서에서의 일반적인 메모리 동기화 구조를 도시한 것이고, 도 2b는 본 발명의 일 실시예에 따른 메모리 동기화 구조의 일 태양을 도시한 것이다.FIG. 2A illustrates a general memory synchronization structure in a multithreading processor, and FIG. 2B illustrates an embodiment of a memory synchronization structure in accordance with an embodiment of the present invention.

도 2a는 멀티 쓰레딩 프로세서에서의 일반적인 메모리 동기화 구조를 표현한 것으로서 중앙처리장치 (210), 프로세스 (220) 및 시스템 메모리 (230) 를 포함한다. 도 2a에서는 중앙처리장치 (210) 가 4개의 코어를 가지는 쿼드 코어 (quad-core) 프로세서인 것으로 상정한다.2A depicts a general memory synchronization architecture in a multithreaded processor, including a central processing unit 210, a process 220, and a system memory 230. As shown in FIG. In FIG. 2A, it is assumed that the central processing unit 210 is a quad-core processor having four cores.

도 2a에 도시된 바와 같이, 컴퓨팅 장치의 CPU에 해당하는 중앙처리장치 (210) 가 4개의 코어를 가지는 쿼드 코어로 구성되어 각각의 코어는 프로세스 (220) 에서 1개씩의 쓰레드를 생성한 경우, 각각의 쓰레드는 시스템 메모리 (230) 의 영역 중 전역변수 및 정적변수가 저장되는 데이터 영역 (240) 에 생성된 동기화변수를 통해 시스템 메모리 (230) 와 동기화를 수행함으로써, 프로세스의 작업수행에 필요한 메모리 영역인 힙 영역 (250) 의 메모리를 할당받는다.As shown in FIG. 2A, when a central processing unit 210 corresponding to a CPU of a computing device is configured with a quad core having four cores, and each core generates one thread in the process 220, Each thread synchronizes with the system memory 230 through a synchronization variable generated in a data area 240 in which a global variable and a static variable in the system memory 230 are stored, And the memory of the heap area 250, which is an area, is allocated.

즉 종래의 방법에 의하면, 4개의 멀티 코어 (multi-core) 를 가지는 중앙처리장치 (210) 가 프로세스 (220) 를 통해 각각 한 개의 쓰레드를 생성하여 시스템 메모리 (230) 와 동기화 하는 경우, 시스템 메모리 (230) 의 데이터 영역 (240) 에 생성된 1개의 동기화변수와 동기화를 수행하기 때문에, 한 순간에 하나의 쓰레드에서만 시스템 메모리 (230) 에 접근할 수 있으며, 나머지 쓰레드에서는 현재 접근이 허용된 쓰레드가 힙 영역 (250) 으로부터 메모리를 할당 받아 메모리 접근에 대한 잠금이 해제될 때까지 시스템 메모리 (230) 에 대한 접근이 불가능하다. 또한, 여러 개의 쓰레드에서 메모리 할당과 해제를 빈번하게 할수록 메모리 동기화로 인한 대기시간으로 인해 성능저하가 발생한다.That is, according to the conventional method, when the central processing unit 210 having four multi-cores generates one thread through the process 220 and synchronizes with the system memory 230, Since synchronization is performed with one synchronization variable generated in the data area 240 of the thread 230, only one thread can access the system memory 230 at a certain moment, and in the remaining thread, Access to the system memory 230 is disabled until the memory access is released and the memory is allocated from the heap area 250. In addition, the more memory allocation and deallocation are made in multiple threads, the lower the performance due to the waiting time due to memory synchronization.

도 2b는 본 발명의 일 실시예에 따른 멀티 쓰레딩 프로세서에서의 메모리 동기화 구조를 도시한 것으로서 물리적으로는 도 2a와 마찬가지로 중앙처리장치 (210), 프로세스 (220) 및 시스템 메모리 (230) 를 포함한다. 즉 본 발명에 따른 멀티 쓰레딩 프로세서에서의 메모리 동기화 제어 방법의 경우 종래의 프로세서를 이용하여 구현할 수 있다.2B illustrates a memory synchronization structure in a multi-threading processor according to an embodiment of the present invention. As shown in FIG. 2A, the memory includes a central processing unit 210, a process 220, and a system memory 230 . That is, the memory synchronization control method in the multi-threading processor according to the present invention can be implemented using a conventional processor.

도 2b에서 도시한 바와 같이, 본 발명의 일 실시예에 따른 메모리 동기화 구조는 도 2a와 달리 시스템 메모리 (230) 의 데이터 영역 (240) 에 프로세스 (220) 를 통해 생성된 각각의 쓰레드에 대응하여 동기화변수가 생성되고, 각각의 동기화변수를 통해 시스템 메모리 (230) 의 힙 영역 (250) 에 생성된 메모리풀에 대해 동기화를 수행함으로써, 다른 쓰레드에서의 시스템 메모리 (230) 에 대한 접근 여부와 관계없이 시스템 메모리 (230) 에 접근하여 메모리풀로부터 메모리를 할당 받을 수 있다. 즉, 시스템 메모리 (230) 접근에 대한 동기화가 아닌 각각의 메모리풀 접근에 대한 동기화를 구현함으로써, 메모리 동기화에 소요되는 시간을 최소화하여 중앙처리장치 (210) 및 프로세스 (220) 의 병렬처리를 수행한다.As shown in FIG. 2B, the memory synchronization structure according to an embodiment of the present invention corresponds to each thread generated through the process 220 in the data area 240 of the system memory 230, unlike FIG. 2A Synchronization variables are generated and synchronized with the generated memory pool in the heap area 250 of the system memory 230 via each synchronization variable to determine whether or not access to the system memory 230 in the other thread It is possible to access the system memory 230 without allocating memory from the memory pool. That is, by implementing synchronization for accessing each memory pool rather than synchronizing access to the system memory 230, the parallel processing of the central processing unit 210 and the process 220 is performed by minimizing the time required for the memory synchronization do.

도 3은 본 발명의 일 실시예에 따른 멀티 쓰레딩 프로세서에서의 메모리 동기화 제어 방법의 절차도이다. 설명의 편의를 위해 도 1을 참조하여 설명한다.3 is a flowchart of a method for controlling memory synchronization in a multi-threading processor according to an embodiment of the present invention. Will be described with reference to Fig. 1 for convenience of explanation.

먼저, 인식부 (110) 가 쓰레드의 생성을 인식하면, 제어부 (120) 는 쓰레드의 생성에 대응하여 시스템 메모리를 할당하여 메모리풀을 생성한다 (S300). 이때, 인식부 (110) 는 전술한 바와 같이, 하나의 프로세스에서 생성된 하나 이상의 쓰레드 및 다수의 프로세스로부터 생성된 각각의 쓰레드를 모두 포함하여 쓰레드의 생성을 인식하며 이를 제어부로 전달한다.First, when the recognition unit 110 recognizes generation of a thread, the control unit 120 allocates a system memory corresponding to generation of a thread to generate a memory pool (S300). At this time, as described above, the recognition unit 110 recognizes generation of a thread including all of the threads generated from one or more threads and a plurality of processes, and transmits the recognized thread to the controller.

메모리풀이 생성되면, 제어부 (120) 는 메모리풀에 대한 식별자를 등록한다 (S310). 식별자란, 다수의 메모리풀이 생성된 경우 각각의 메모리풀을 구분할 수 있는 고유 코드를 말하며, 식별자를 가진 메모리풀을 이용하여 이후 메모리의 할당 및 반환이 특정 영역에 대해 수행되게 함으로써, 메모리의 빈 공간 또는 메모리의 사용 가능한 영역이 여러 개의 조각으로 나뉘는 메모리 단편화 현상으로 인한 속도 저하를 방지할 수 있다.When the memory pool is created, the controller 120 registers an identifier for the memory pool (S310). The identifier is a unique code that can distinguish each memory pool when a plurality of memory pools are created. By using a memory pool having an identifier so that allocation and return of the memory is performed for a specific area, Or a speed reduction due to a memory fragmentation phenomenon in which a usable area of the memory is divided into several pieces.

메모리풀에 대한 식별자가 등록되면 (S310), 제어부 (120) 는 메모리풀에 대한 동기화변수를 생성하여 쓰레드와 매핑 (mapping) 한다 (S320). 이와 같은 매핑은 쓰레드에 등록되어 있는 식별자를 통해 수행 될 수 있으며, 매핑을 통해 쓰레드 생성 시 전용 메모리풀을 쓰레드 별로 할당할 수 있다. 또한, 복수 개의 쓰레드 생성에 대응하여 복수 개의 메모리풀이 생성된 경우, 메모리풀 각각에 대한 동기화 변수를 생성하여 관리함으로써, 여러 쓰레드에서 동시에 하나의 메모리풀에 접근하는 것을 방지하고, 시스템 메모리 전체가 아닌 각각의 메모리풀과 쓰레드 간에 동기화를 수행 할 수 있다.When an identifier for the memory pool is registered (S310), the controller 120 generates a synchronization variable for the memory pool and maps it to the thread (S320). Such a mapping can be performed through an identifier registered in a thread, and a dedicated memory pool can be allocated for each thread when a thread is created through mapping. In addition, when a plurality of memory pools are created corresponding to a plurality of threads, by creating and managing synchronization variables for each of the memory pools, it is possible to prevent a plurality of threads from simultaneously accessing one memory pool, Synchronization between each memory pool and the thread can be performed.

제어부 (120) 는 메모리풀과 쓰레드의 매핑이 완료되면 메모리풀로부터 쓰레드에 메모리를 할당한다 (S330). 이때, 제어부 (120) 는 메모리풀의 동기화변수에 대한 잠금의 설정 및 해제를 통해 쓰레드와 메모리풀 간의 동기화를 수행하며, 할당 받은 메모리에 메모리풀의 식별자를 기록함으로써 이후 메모리의 반환 시 할당 받은 메모리풀에 다시 메모리를 반환할 수 있다. 이러한 메모리풀의 메모리 할당에 관해서는 도 4a에서 상세히 후술한다.When the mapping between the memory pool and the thread is completed, the controller 120 allocates memory to the thread from the memory pool (S330). At this time, the control unit 120 performs synchronization between the thread and the memory pool through setting and releasing the lock on the synchronization variable of the memory pool, and records the identifier of the memory pool in the allocated memory, You can return memory to the pool again. The memory allocation of such a memory pool will be described later in detail in FIG. 4A.

쓰레드의 작업이 완료되어 쓰레드가 소멸하면, 제어부 (120) 는 쓰레드가 할당 받았던 메모리를 메모리풀로 반환하며 (S340), 이때, 전술한 바와 같이 할당 받은 메모리에 기록된 메모리풀의 식별자를 통해 할당 받은 메모리풀로 메모리를 반환할 수 있다. 이러한 메모리의 반환에 관해서는 도 4b에서 상세히 후술한다.When the operation of the thread is completed and the thread disappears, the controller 120 returns the memory allocated to the thread to the memory pool (S340). At this time, the controller 120 allocates It can return memory to the memory pool it receives. The return of such a memory will be described later in detail in Fig. 4B.

제어부 (120) 는 메모리풀로 메모리의 반환이 완료되면, 메모리풀에 대한 시스템 메모리를 해제하고 (S350), 현재 쓰레드에 대한 동기화변수를 삭제한다 (S360). 이때, 메모리풀 및 메모리풀로부터 쓰레드에 할당되는 메모리는 시스템 메모리의 영역 중 프로세스의 작업수행에 필요한 힙 영역의 메모리를 말하며, 동기화변수의 생성 및 삭제는 시스템 메모리의 데이터 영역에서 수행된다.When the return of the memory to the memory pool is completed, the controller 120 releases the system memory for the memory pool (S350) and deletes the synchronization variable for the current thread (S360). In this case, the memory allocated to the threads from the memory pool and the memory pool refers to the memory of the heap area required for performing the operation of the process among the areas of the system memory, and the creation and deletion of the synchronization variables are performed in the data area of the system memory.

도 4a는 본 발명의 일 실시예에 따른 멀티 쓰레딩 프로세서에서의 메모리 동기화 제어 방법에 있어 메모리풀로부터 쓰레드에 메모리를 할당하는 절차도이다. 설명의 편의를 위해 도 1을 참조하여 설명한다.FIG. 4A is a flowchart illustrating a method of allocating memory to a thread from a memory pool in a memory synchronization control method in a multithreading processor according to an embodiment of the present invention. Referring to FIG. Will be described with reference to Fig. 1 for convenience of explanation.

메모리풀로부터 쓰레드로 메모리를 할당하는 작업이 시작되면, 제어부 (120) 는 메모리풀에 대한 동기화변수를 고정한다 (S331). 이와 같이, 동기화변수를 고정함으로써, 쓰레드 별로 전용 메모리풀을 할당하는 효과가 있으며, 여러 쓰레드에서 동시에 하나의 메모리풀에 접근하는 것을 방지한다.When the task of allocating memory from the memory pool to the thread is started, the controller 120 fixes the synchronization variable for the memory pool (S331). Thus, by fixing the synchronization variables, it is possible to allocate a dedicated memory pool for each thread, and prevent multiple threads from simultaneously accessing one memory pool.

메모리풀에 대한 동기화변수가 고정되면, 제어부 (120) 는 쓰레드에 메모리풀의 메모리를 할당하고 (S332), 할당된 메모리에 메모리풀에 대한 식별자를 기록한다 (S333). 할당된 메모리에 메모리풀에 대한 식별자를 기록하여, 이후 메모리를 반환하는 경우, 메모리를 할당 받은 메모리풀에 반환이 수행되게 함으로써, 메모리의 빈 공간 또는 메모리의 사용 가능한 영역이 여러 개의 조각으로 나뉘는 메모리 단편화 현상으로 인한 속도 저하를 방지할 수 있다.If the synchronization variable for the memory pool is fixed, the controller 120 allocates the memory of the memory pool to the thread (S332), and records the identifier for the memory pool in the allocated memory (S333). If an identifier for a memory pool is written to the allocated memory, and then the memory is returned, the empty space of the memory or the usable area of the memory is divided into several pieces The speed reduction due to the fragmentation phenomenon can be prevented.

메모리의 할당 및 메모리풀에 대한 식별자의 기록이 수행되면, 메모리풀에 대한 동기화변수의 고정을 해제함으로써 (S334), 메모리풀로부터 쓰레드로의 메모리 할당 작업이 완료된다.When the assignment of the memory and the recording of the identifier for the memory pool are performed, the memory allocation operation from the memory pool to the thread is completed by releasing the lock of the synchronization variable for the memory pool (S334).

도 4b는 본 발명의 일 실시예에 따른 멀티 쓰레딩 프로세서에서의 메모리 동기화 제어 방법에 있어 할당 받은 메모리를 메모리풀로 반환하는 절차도이다. 설명의 편의를 위해 도 1을 참조하여 설명한다.FIG. 4B is a flowchart illustrating a method of controlling a memory synchronization in a multithreading processor according to an exemplary embodiment of the present invention. Referring to FIG. Will be described with reference to Fig. 1 for convenience of explanation.

인식부 (110) 가 쓰레드의 소멸을 인식하면, 제어부 (120) 는 쓰레드가 할당 받은 메모리를 메모리풀로 반환하는 작업을 시작하며, 먼저, 할당된 메모리로부터 메모리풀에 대한 식별자를 검출한다 (S341). 제어부 (120) 는 할당 받은 메모리를 해당 메모리를 할당 한 메모리풀로 반환하기 위해 식별자를 검출하고 (S341), 해당 메모리풀에 대한 동기화변수를 고정한다 (S342). 메모리를 반환하는 과정 또한, 메모리를 반환하는 과정에서 쓰레드의 접근을 막기 위해 동기화변수를 고정하며, 동기화변수가 고정되면 해당 메모리를 할당해 준 메모리풀로 메모리를 반환하고 (S343), 메모리의 반환이 완료되면 해당 메모리풀에 대한 동기화변수의 고정을 해제함으로써 (S344), 할당 받은 메모리를 메모리풀로 반환하는 작업이 완료된다.If the recognition unit 110 recognizes the termination of the thread, the control unit 120 starts to return the memory allocated to the thread to the memory pool. First, the memory unit 120 detects an identifier for the memory pool from the allocated memory (S341 ). The control unit 120 detects an identifier to return the allocated memory to the memory pool to which the memory is allocated (S341), and fixes the synchronization variable for the memory pool (S342). In order to prevent the thread from accessing the memory during the process of returning the memory, the synchronization variable is fixed. If the synchronization variable is fixed, the memory is returned to the memory pool to which the memory is allocated (S343) The operation of returning the allocated memory to the memory pool is completed by releasing the lock of the synchronization variable for the memory pool (S344).

도 3 내지 도 5에서 전술한 쓰레드와 메모리풀 간의 동기화 과정은, 생성된 쓰레드에 대응하는 메모리풀을 생성함으로써, 복수의 쓰레드에 대해 동시에 또는 병행하여 수행될 수 있으며, 쓰레드 별로 대응하는 메모리풀 각각에 대해 동기화를 수행함으로써, 메모리 동기화에 소요되는 대기시간을 줄일 수 있다.The synchronization process between the thread and the memory pool described above with reference to FIGS. 3 to 5 can be performed simultaneously or in parallel with respect to a plurality of threads by generating a memory pool corresponding to the generated thread, The waiting time required for the memory synchronization can be reduced.

첨부된 블록도의 각 블록과 흐름도의 각 단계의 조합들은 컴퓨터 프로그램 인스트럭션들에 의해 수행될 수도 있다. 이들 컴퓨터 프로그램 인스트럭션들은 범용 컴퓨터, 특수용 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비의 프로세서에 탑재될 수 있으므로, 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비의 프로세서를 통해 수행되는 그 인스트럭션들이 블록도의 각 블록 또는 흐름도의 각 단계에서 설명된 기능들을 수행하는 수단을 생성하게 된다. 이들 컴퓨터 프로그램 인스트럭션들은 특정 방식으로 기능을 구현하기 위해 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비를 지향할 수 있는 컴퓨터 이용 가능 또는 컴퓨터 판독 가능 메모리에 저장되는 것도 가능하므로, 그 컴퓨터 이용가능 또는 컴퓨터 판독 가능 메모리에 저장된 인스트럭션들은 블록도의 각 블록 또는 흐름도 각 단계에서 설명된 기능을 수행하는 인스트럭션 수단을 내포하는 제조 품목을 생산하는 것도 가능하다. 컴퓨터 프로그램 인스트럭션들은 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비 상에 탑재되는 것도 가능하므로, 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비 상에서 일련의 동작 단계들이 수행되어 컴퓨터로 실행되는 프로세스를 생성해서 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비를 수행하는 인스트럭션들은 블록도의 각 블록 및 흐름도의 각 단계에서 설명된 기능들을 실행하기 위한 단계들을 제공하는 것도 가능하다.Each block of the accompanying block diagrams and combinations of steps of the flowchart may be performed by computer program instructions. These computer program instructions may be loaded into a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus so that the instructions, which may be executed by a processor of a computer or other programmable data processing apparatus, And means for performing the functions described in each step are created. These computer program instructions may also be stored in a computer usable or computer readable memory capable of directing a computer or other programmable data processing apparatus to implement the functionality in a particular manner so that the computer usable or computer readable memory It is also possible for the instructions stored in the block diagram to produce a manufacturing item containing instruction means for performing the functions described in each block or flowchart of the block diagram. Computer program instructions may also be stored on a computer or other programmable data processing equipment so that a series of operating steps may be performed on a computer or other programmable data processing equipment to create a computer- It is also possible that the instructions that perform the processing equipment provide the steps for executing the functions described in each block of the block diagram and at each step of the flowchart.

본 명세서에서, 각 블록은 특정된 논리적 기능 (들) 을 실행하기 위한 하나 이상의 실행 가능한 인스트럭션들을 포함하는 모듈, 세그먼트 또는 코드의 일부를 나타낼 수 있다. 또, 몇 가지 대체 실행 예들에서는 블록들에서 언급된 기능들이 순서를 벗어나서 발생하는 것도 가능함을 주목해야 한다. 예컨대, 잇달아 도시되어 있는 두 개의 블록들은 사실 실질적으로 동시에 수행되는 것도 가능하고 또는 그 블록들이 때때로 해당하는 기능에 따라 역순으로 수행되는 것도 가능하다.In this specification, each block may represent a portion of a module, segment, or code that includes one or more executable instructions for executing the specified logical function (s). It should also be noted that in some alternative implementations, the functions mentioned in the blocks may occur out of order. For example, two blocks shown in succession may actually be executed substantially concurrently, or the blocks may sometimes be performed in reverse order according to the corresponding function.

본 명세서에 개시된 실시예들과 관련하여 설명된 방법 또는 알고리즘의 단계는 프로세서에 의해 실행되는 하드웨어, 소프트웨어 모듈 또는 그 2 개의 결합으로 직접 구현될 수도 있다. 소프트웨어 모듈은 RAM 메모리, 플래시 메모리, ROM 메모리, EPROM 메모리, EEPROM 메모리, 레지스터, 하드 디스크, 착탈형 디스크, CD-ROM 또는 당업계에 알려진 임의의 다른 형태의 저장 매체에 상주할 수도 있다. 예시적인 저장 매체는 프로세서에 커플링 되며, 그 프로세서는 저장 매체로부터 정보를 판독할 수 있고 저장 매체에 정보를 기입할 수 있다. 다른 방법으로, 저장 매체는 프로세서와 일체형일 수도 있다. 프로세서 및 저장 매체는 주문형 집적회로 (ASIC) 내에 상주할 수도 있다. ASIC는 사용자 단말기 내에 상주할 수도 있다. 다른 방법으로, 프로세서 및 저장 매체는 사용자 단말기 내에 개별 컴포넌트로서 상주할 수도 있다.The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software module may reside in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable disk, a CD-ROM or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor, which is capable of reading information from, and writing information to, the storage medium. Alternatively, the storage medium may be integral with the processor. The processor and the storage medium may reside within an application specific integrated circuit (ASIC). The ASIC may reside within the user terminal. Alternatively, the processor and the storage medium may reside as discrete components in a user terminal.

이상으로 실시예를 들어 본 발명을 더욱 상세하게 설명하였으나, 본 발명은 반드시 이러한 실시예로 국한되는 것은 아니고, 본 발명의 기술사상을 벗어나지 않는 범위 내에서 다양하게 변형 실시될 수 있다. 따라서 본 발명에 개시된 실시예들은 본 발명의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 발명의 기술 사상의 범위가 한정되는 것은 아니다. 본 발명의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the present invention is not limited to the disclosed exemplary embodiments, but various changes and modifications may be made without departing from the spirit and scope of the invention. Therefore, the embodiments disclosed in the present invention are not intended to limit the scope of the present invention but to limit the scope of the technical idea of the present invention. The scope of protection of the present invention should be construed according to the following claims, and all technical ideas within the scope of equivalents should be construed as falling within the scope of the present invention.

100: 메모리 동기화 제어 장치
110: 인식부
120: 제어부
210: 중앙처리장치
220: 프로세스
230: 시스템메모리
240: 데이터 영역
250: 힙 영역
100: Memory synchronization control device
110:
120:
210: central processing unit
220: Process
230: System memory
240: data area
250: Heap area

Claims (9)

쓰레드의 생성에 대응하여 시스템 메모리로부터 할당된 메모리풀을 생성하는 단계;
상기 메모리풀을 구분할 수 있는 식별자를 등록하는 단계;
상기 메모리풀에 대한 동기화변수를 생성하여 상기 쓰레드와 매핑 (mapping) 하는 단계;
상기 메모리풀로부터 상기 쓰레드에 메모리를 할당하는 단계;
상기 쓰레드의 소멸에 대응하여 할당 받은 상기 메모리를 상기 메모리풀로 반환하는 단계;
상기 메모리풀에 대한 시스템 메모리를 해제하는 단계; 및
상기 동기화변수를 삭제하는 단계를 포함하는, 멀티 쓰레딩 프로세서 (multi-threading processor) 에서의 메모리 동기화 제어 방법.
Generating an allocated memory pool from system memory in response to creation of a thread;
Registering an identifier capable of identifying the memory pool;
Generating a synchronization variable for the memory pool and mapping the thread to the synchronization variable;
Allocating memory to the thread from the memory pool;
Returning the allocated memory corresponding to the extinction of the thread to the memory pool;
Releasing system memory for the memory pool; And
And deleting the synchronization variable. ≪ Desc / Clms Page number 19 >
제1항에 있어서,
상기 쓰레드에 상기 메모리풀로부터 메모리를 할당하는 단계는,
상기 메모리풀에 대한 상기 동기화변수를 고정하는 단계;
상기 쓰레드에 상기 메모리풀의 메모리를 할당하고, 상기 식별자를 상기 메모리에 기록하는 단계; 및
상기 메모리풀에 대한 상기 동기화변수의 고정을 해제하는 단계를 포함하는, 멀티 쓰레딩 프로세서의 메모리 동기화 제어 방법.
The method according to claim 1,
Wherein allocating memory from the memory pool to the thread comprises:
Fixing the synchronization variable for the memory pool;
Allocating a memory of the memory pool to the thread, and writing the identifier to the memory; And
Unlocking the synchronization variable for the memory pool. ≪ Desc / Clms Page number 22 >
제1항에 있어서,
상기 메모리풀을 해제하는 단계는,
상기 메모리로부터 상기 식별자를 검출하는 단계;
상기 식별자를 가지는 상기 메모리풀에 대한 상기 동기화변수를 고정하는 단계;
상기 메모리를 상기 메모리풀로 반환하는 단계 및
상기 메모리풀에 대한 상기 동기화변수의 고정을 해제하는 단계를 포함하는, 멀티 쓰레딩 프로세서의 메모리 동기화 제어 방법.
The method according to claim 1,
Wherein releasing the memory pool further comprises:
Detecting the identifier from the memory;
Fixing the synchronization variable for the memory pool having the identifier;
Returning the memory to the memory pool; and
Unlocking the synchronization variable for the memory pool. ≪ Desc / Clms Page number 22 >
제1항에 있어서,
상기 쓰레드는 복수 개인 것을 특징으로 하는, 멀티 쓰레딩 프로세서의 메모리 동기화 제어 방법.
The method according to claim 1,
Wherein the threads are a plurality of threads.
명령어들의 세트를 포함하는 컴퓨터 판독 가능 매체로서,
상기 명령어들의 세트는, 컴퓨팅 장치에 의해 실행되는 경우에 상기 컴퓨팅 장치로 하여금,
쓰레드 생성에 대응하여 시스템 메모리로부터 할당된 메모리풀을 생성하고,
상기 메모리풀을 구분할 수 있는 식별자를 등록하고,
상기 메모리풀에 대한 동기화변수를 생성하여 상기 쓰레드와 매핑 (mapping) 하고,
상기 메모리풀로부터 상기 쓰레드에 메모리를 할당하고,
상기 쓰레드의 소멸에 대응하여 할당 받은 상기 메모리를 상기 메모리풀로 반환하고,
상기 메모리풀에 대한 시스템 메모리를 해제하고,
상기 동기화변수를 삭제하게 하는 것을 특징으로 하는, 컴퓨터 판독 가능 매체.
24. A computer-readable medium comprising a set of instructions,
Wherein the set of instructions cause the computing device to, when executed by the computing device,
Generating a memory pool allocated from the system memory in response to thread creation,
Registers an identifier capable of identifying the memory pool,
Generating a synchronization variable for the memory pool, mapping the thread to the thread,
Allocating memory from the memory pool to the thread,
Returning the allocated memory to the memory pool in response to the extinction of the thread,
Releasing system memory for the memory pool,
And to delete the synchronization variable.
제5항에 있어서,
상기 쓰레드에 상기 메모리풀로부터 메모리를 할당하게 하는 명령어들의 세트는,
상기 메모리풀에 대한 상기 동기화변수를 고정하고,
상기 쓰레드에 상기 메모리풀의 메모리를 할당하고, 상기 식별자를 상기 메모리에 기록하고,
상기 메모리풀에 대한 상기 동기화변수의 고정을 해제하게 하는 명령어들의 세트를 포함하는, 컴퓨터 판독 가능 매체.
6. The method of claim 5,
The set of instructions causing the thread to allocate memory from the memory pool,
Fixing the synchronization variable for the memory pool,
Allocating a memory of the memory pool to the thread, writing the identifier to the memory,
The set of instructions causing the memory pool to freeze the synchronization variable for the memory pool.
제5항에 있어서,
상기 메모리풀을 해제하게 하는 명령어들의 세트는,
상기 메모리로부터 상기 식별자를 검출하고,
상기 식별자를 가지는 상기 메모리풀에 대한 상기 동기화변수를 고정하고,
상기 메모리를 상기 메모리풀로 반환하고,
상기 메모리풀에 대한 상기 동기화변수의 고정을 해제하게 하는 명령어들의 세트를 포함하는, 컴퓨터 판독 가능 매체.
6. The method of claim 5,
The set of instructions causing the memory pool to be released comprises:
Detecting the identifier from the memory,
Fixing the synchronization variable for the memory pool having the identifier,
Returning the memory to the memory pool,
The set of instructions causing the memory pool to freeze the synchronization variable for the memory pool.
제5항에 있어서,
상기 쓰레드는 복수 개인 것을 특징으로 하는, 컴퓨터 판독 가능 매체.
6. The method of claim 5,
The computer-readable medium of claim 1, wherein the threads are plural.
쓰레드의 생성에 대응하여 시스템 메모리로부터 할당된 메모리풀을 생성하고, 상기 메모리풀을 구분할 수 있는 식별자를 등록하고, 상기 메모리풀에 대한 동기화변수를 생성하여 상기 쓰레드와 매핑 (mapping) 하고, 상기 메모리풀로부터 상기 쓰레드에 메모리를 할당하고, 상기 쓰레드의 소멸에 대응하여 할당 받은 상기 메모리를 상기 메모리풀로 반환하고, 상기 메모리풀에 대한 시스템 메모리를 해제하고, 상기 동기화변수를 삭제하는 제어부; 및
상기 쓰레드의 생성 및 소멸을 인식하여 상기 제어부에 전달하는 인식부를 포함하는, 멀티 쓰레딩 프로세서 (multi-threading processor) 에서의 메모리 동기화 제어 장치.
A memory pool allocated from the system memory in response to generation of a thread, an identifier for identifying the memory pool, a synchronization variable for the memory pool, mapping the thread to the memory, A controller for allocating a memory to the thread from the pool, returning the memory allocated in response to the termination of the thread to the memory pool, releasing the system memory for the memory pool, and deleting the synchronization variable; And
And a recognition unit for recognizing generation and disappearance of the thread and transmitting the thread to the control unit.
KR1020140008012A 2014-01-22 2014-01-22 Method and apparatus for controlling a memory synchronization on multi-threading processor Withdrawn KR20150087743A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020140008012A KR20150087743A (en) 2014-01-22 2014-01-22 Method and apparatus for controlling a memory synchronization on multi-threading processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020140008012A KR20150087743A (en) 2014-01-22 2014-01-22 Method and apparatus for controlling a memory synchronization on multi-threading processor

Publications (1)

Publication Number Publication Date
KR20150087743A true KR20150087743A (en) 2015-07-30

Family

ID=53876873

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020140008012A Withdrawn KR20150087743A (en) 2014-01-22 2014-01-22 Method and apparatus for controlling a memory synchronization on multi-threading processor

Country Status (1)

Country Link
KR (1) KR20150087743A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109254834A (en) * 2017-07-13 2019-01-22 普天信息技术有限公司 A kind of multithreading starting synchronous method
KR102500172B1 (en) 2022-11-16 2023-02-14 젬텍(주) Method, control device and system for synchronizing memory between device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109254834A (en) * 2017-07-13 2019-01-22 普天信息技术有限公司 A kind of multithreading starting synchronous method
CN109254834B (en) * 2017-07-13 2021-05-14 普天信息技术有限公司 Multithreading starting synchronization method
KR102500172B1 (en) 2022-11-16 2023-02-14 젬텍(주) Method, control device and system for synchronizing memory between device

Similar Documents

Publication Publication Date Title
JP7087029B2 (en) Improved functional callback mechanism between the central processing unit (CPU) and the auxiliary processor
CN108139946B (en) Method for efficient task scheduling in the presence of conflicts
CN106790599B (en) A kind of symbiosis virtual machine communication method based on multicore without lock buffer circle
CN105511969B (en) Method for mutual exclusion between cross-process threads
CN106569891B (en) Method and device for scheduling and executing tasks in storage system
US9069790B2 (en) Multi-threaded message passing journal
CN104424030B (en) Method and device for sharing memory by multi-process operation
CN110209493B (en) Memory management method, device, electronic equipment and storage medium
US12217083B2 (en) Hardware transactional memory-assisted flat combining
JP2008112400A (en) Technique for making exclusive control efficient
KR20170093800A (en) Technologies for fast synchronization barriers for many-core processing
US8595726B2 (en) Apparatus and method for parallel processing
US20240378242A1 (en) Scalable range locks
TWI508024B (en) System and method for launching callable functions
US11016883B2 (en) Safe manual memory management
US8893137B2 (en) Transaction-based shared memory protection for high availability environments
US20120059997A1 (en) Apparatus and method for detecting data race
US10824424B2 (en) Efficient lock-free multi-word compare-and-swap
Gidenstam et al. Cache-aware lock-free queues for multiple producers/consumers and weak memory consistency
CN103703449B (en) Computer-implemented method, system and apparatus for memory consolidation
KR20150087743A (en) Method and apparatus for controlling a memory synchronization on multi-threading processor
CN105094993B (en) The method and device that a kind of multi-core processor, data synchronize
US9418175B2 (en) Enumeration of a concurrent data structure
CN116680080A (en) Memory management method and device, electronic equipment and storage medium
CN105955971A (en) Key value buffer memory implementation method and device

Legal Events

Date Code Title Description
PA0109 Patent application

Patent event code: PA01091R01D

Comment text: Patent Application

Patent event date: 20140122

PG1501 Laying open of application
PC1203 Withdrawal of no request for examination
WITN Application deemed withdrawn, e.g. because no request for examination was filed or no examination fee was paid