KR101088563B1 - Method Of Controlling Multi-Core Processor, Apparatus For Controlling Multi-Core Processor, Multi-Core Processor, And Record Medium For Performing Method Of Controlling Multi-Core Processor - Google Patents

Method Of Controlling Multi-Core Processor, Apparatus For Controlling Multi-Core Processor, Multi-Core Processor, And Record Medium For Performing Method Of Controlling Multi-Core Processor Download PDF

Info

Publication number
KR101088563B1
KR101088563B1 KR1020090130431A KR20090130431A KR101088563B1 KR 101088563 B1 KR101088563 B1 KR 101088563B1 KR 1020090130431 A KR1020090130431 A KR 1020090130431A KR 20090130431 A KR20090130431 A KR 20090130431A KR 101088563 B1 KR101088563 B1 KR 101088563B1
Authority
KR
South Korea
Prior art keywords
core
program
cores
executed
parallel processing
Prior art date
Application number
KR1020090130431A
Other languages
Korean (ko)
Other versions
KR20110073714A (en
Inventor
정기석
황영시
Original Assignee
포항공과대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 포항공과대학교 산학협력단 filed Critical 포항공과대학교 산학협력단
Priority to KR1020090130431A priority Critical patent/KR101088563B1/en
Publication of KR20110073714A publication Critical patent/KR20110073714A/en
Application granted granted Critical
Publication of KR101088563B1 publication Critical patent/KR101088563B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/22Microcontrol or microprogram arrangements
    • G06F9/28Enhancement of operational speed, e.g. by using several microcontrol devices operating in parallel
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)
  • Power Sources (AREA)

Abstract

멀티코어프로세서에서 코어자원의 효율적인 관리를 위한 멀티코어프로세서 제어방법, 멀티코어프로세서 제어장치, 멀티코어프로세서 및 멀티코어프로세서 제어방법이 기록된 기록매체가 개시되어 있다. 멀티코어프로세서 제어방법은 병렬처리프로그래밍된 프로그램의 실행 시 프로그램의 병렬처리에 필요한 코어의 수를 판단하는 단계와, 상기 코어의 수를 판단하는 단계를 통해 얻은 정보를 이용하여 멀티코어프로세서에서 구동되는 코어의 수를 제어하는 단계를 포함한다. 따라서, 코어자원의 효율적인 관리로 프로그램의 실행시 필요한 멀티코어프로세서의 코어자원을 효율적으로 활용하여 높은 QoS(Quality of Service)를 가지게 되고 멀티코어 프로세서의 전력소모를 줄일 수 있다.Disclosed are a recording medium in which a multicore processor control method, a multicore processor control device, a multicore processor, and a multicore processor control method are recorded for efficient management of core resources in a multicore processor. The multi-core processor control method is driven by a multi-core processor using information obtained by determining the number of cores required for parallel processing of the program when the parallel program is executed, and determining the number of cores. Controlling the number of cores. Therefore, by efficiently managing core resources, the core resources of a multicore processor required for executing a program may be efficiently used to have a high quality of service (QoS) and to reduce power consumption of the multicore processor.

멀티코어프로세서, 멀티코어, 제어, On-Demand, 병렬처리 프로그래밍 Multicore Processor, Multicore, Control, On-Demand, Parallel Programming

Description

멀티코어프로세서 제어방법, 멀티코어프로세서 제어장치, 멀티코어프로세서 및 멀티코어프로세서 제어방법이 기록된 기록매체{Method Of Controlling Multi-Core Processor, Apparatus For Controlling Multi-Core Processor, Multi-Core Processor, And Record Medium For Performing Method Of Controlling Multi-Core Processor}Recording medium recording multi-core processor control method, multi-core processor control device, multi-core processor and multi-core processor control method (Method Of Controlling Multi-Core Processor, Apparatus For Controlling Multi-Core Processor, Multi-Core Processor, And Record) Medium For Performing Method Of Controlling Multi-Core Processor}

본 발명은 멀티코어프로세서 제어방법, 멀티코어프로세서 제어장치, 멀티코어프로세서에 관한 것으로, 더욱 상세하게는 멀티코어프로세서의 소비전력을 감소시키고 멀티코어프로세서의 코어자원을 효율적으로 관리하기 위한 멀티코어프로세서 제어방법, 멀티코어프로세서 제어장치 및 멀티코어프로세서에 관한 것이다.The present invention relates to a multicore processor control method, a multicore processor control device, a multicore processor, and more particularly, to reduce power consumption of a multicore processor and to efficiently manage core resources of the multicore processor. A control method, a multicore processor control apparatus, and a multicore processor.

멀티코어프로세서(Multi Core Processor)는 두개 이상의 코어를 가진 프로세서로써 기존의 싱글코어프로세서의 경우 프로세서의 클록속도를 빠르게 하여 프로세서의 성능을 개선하였으나 클록속도를 빠르게 하는 방식의 단점인 많은 전력소모와 프로세서의 발열을 개선하기 위해, 상대적으로 낮은 주파수에서 동작이 가능하고 싱글코어의 전력소모를 여러 코어에 분산시킬 수 있는 멀티코어프로세서 기술이 발전하였다. Multi-core processor is a processor with two or more cores. In the case of the conventional single-core processor, the performance of the processor is improved by increasing the clock speed of the processor, but the power consumption and the processor are disadvantages of the method of increasing the clock speed. To improve heat dissipation, multicore processor technology has been developed that can operate at a relatively low frequency and distribute the power consumption of a single core to multiple cores.

멀티코어프로세서를 사용하는 경우 동적 전력소모를 싱글코어프로세서의 동적 전력소모보다 감소시킬 수 있다. 하지만 멀티코어프로세서가 전력문제를 완전히 해결한 것은 아니다. 베터리 기술이 프로세서의 성능향상을 따라가지 못하기 때문에 여전히 휴대용 장치나 임베디드 시스템에 있어서 전력소모를 줄여 디지털 처리 장치의 구동시간을 사용자에게 안정적으로 제공하는 것은 디지털 처리 장치를 설계할 때에 설계자가 항상 고려해야 할 요소이다.When using a multicore processor, the dynamic power consumption can be reduced compared to that of a single core processor. But multicore processors don't completely solve the power problem. Since battery technology cannot keep up with processor performance, it is still a consideration for designers when designing digital processing devices that still provide reliable user time for digital processing devices by reducing power consumption in portable devices or embedded systems. The element to do.

기존의 전력소모를 줄이는 방식으로는 프로세서에 클록이 공급되어 동작하지 않지만 전원이 켜져 있다는 이유만으로 누설되는 전력을 감소시켜 디지털처리장치의 정적 전력소모를 감소시키는 방식이 사용되었다. 프로세서의 전력소모를 줄이는 또 다른 방법으로는 프로세서의 전체 사용률을 백분률 단위로 분석하여 프로세서의 코어 구동개수를 조절하는 방식인 On-Demand 방식이 있다.The conventional method of reducing power consumption is to reduce the static power consumption of the digital processing device by reducing the leakage power just because the processor is not clocked but powered on. Another way to reduce the power consumption of the processor is to analyze the processor's total utilization in percentage units and adjust the number of cores running on the processor.

도 1은 On-Demand 방식을 사용한 멀티코어프로세서 제어방법을 나타낸 도면이다. 도 1의 세로축은 멀티코어프로세서의 사용을 백분율 단위로 표시하였고 가로축은 초단위의 시간축이다. 멀티코어프로세서가 80%미만의 사용률을 보일 경우, 하나의 코어의 구동을 정지시키거나 낮은 성능으로 설정하여 전력의 소모를 줄이고 멀티코어프로세서가 80%이상의 사용률을 보일 경우, 정지시켰거나 낮은 성능으로 설정된 코어를 다시 구동시키거나 높은 사용률로 설정하여 멀티코어프로세서를 제어한다. 하지만 이러한 제어방식은 과거의 CPU 사용율을 기반으로 앞으로의 사용율을 예측하는 기법이기 때문에 예측이 실패했을 경우, 프로그램의 성능을 보장할 수 없는 문제점이 존재한다. 병렬처리프로그래밍 된 프로그램에 필요한 코어의 개수가 4개라고 가정할 때, On-Demand 방식을 사용할 경우, 도 1에서 9초에서 12초 구간(구간1)에서 On-Demand 방식에서 코어를 하나 비활성화 시키는 임계값인 80% 미만의 사용율을 보이고 있다. 이 때, On-Demand의 제어 방식을 적용할 경우, 코어를 1개 비활성화 시키고 3개의 코어만을 활성화 시키는 상황이 발생한다. 그러나 프로그램 구조상 프로세스가 4개 생성되는 상황이기 때문에 실제 필요한 코어의 수는 4개이다. 따라서 이와 같은 상황에서 On-Demand 방식은 프로그램의 서비스 품질(QoS: Quality of Service)를 보장하지 못하는 결과가 발생하게 된다.1 is a diagram illustrating a method of controlling a multicore processor using an on-demand method. The vertical axis of FIG. 1 indicates the use of a multicore processor in percentage and the horizontal axis is the time axis in seconds. If the multicore processor shows less than 80% utilization, stop one core or set it to low performance to reduce power consumption. The multicore processor is controlled by running the set core again or setting the high utilization rate. However, since this control method predicts future utilization based on past CPU utilization, there is a problem that the performance of the program cannot be guaranteed if the prediction fails. Assuming that the number of cores required for the parallel programming program is 4, in case of using the On-Demand method, one core is deactivated in the On-Demand method in 9 seconds to 12 seconds (section 1) in FIG. The utilization rate is below the 80% threshold. At this time, when the on-demand control method is applied, a situation arises in which one core is deactivated and only three cores are activated. However, due to the structure of the program, four processes are created, so the number of cores actually required is four. Therefore, in such a situation, the on-demand method does not guarantee the quality of service (QoS) of the program.

따라서, 본 발명의 목적은 병렬처리프로그래밍 된 프로그램의 서비스 품질을 유지하면서 프로세서의 전력소비를 효율적으로 줄이기 위한 멀티코어프로세서 제어방법을 제공하는 것이다.Accordingly, an object of the present invention is to provide a multicore processor control method for efficiently reducing the power consumption of a processor while maintaining the service quality of a parallel programmed program.

또한, 본 발명의 다른 목적은 상기 제어방법을 제공하는 멀티코어프로세서 제어장치를 제공하는 것이다. In addition, another object of the present invention is to provide a multi-core processor control device for providing the control method.

또한, 본 발명의 또 다른 목적은 상기 제어방법을 제공하는 멀티코어프로세서를 제공하는 것이다. Another object of the present invention is to provide a multicore processor providing the control method.

또한, 본 발명의 또 다른 목적은 상기 제어방법이 기록된 기록매체를 제공하는 것이다. Still another object of the present invention is to provide a recording medium on which the control method is recorded.

상술한 본 발명의 목적을 달성하기 위한 본 발명의 일 측면에 따른 멀티코어 프로세서 제어방법은 병렬처리 프로그래밍된 프로그램의 실행 시, 상기 프로그램의 병렬처리에 필요한 코어의 수를 판단하는 단계와, 상기 코어의 수를 판단하는 단계를 통해 얻은 정보를 이용하여 멀티코어프로세서에서 구동되는 코어의 수를 제어하는 단계를 포함한다. 상기 병렬처리에 필요한 코어의 수를 판단하는 단계로부터 얻은 정보는 상기 실행되는 프로그램이 병렬처리구간에 속하는지 여부에 대한 정보와 상기 실행되는 프로그램의 병렬처리에 필요한 코어의 수에 대한 정보를 포함할 수 있다. 상기 프로그램의 병렬처리에 필요한 코어의 수를 판단하는 단계는 상기 프로그램이 실행 시 상기 프로그램을 컴파일하는 컴파일러에서 자동으로 삽입한 코드가 실행되는 단계와 상기 코드가 실행되어 상기 실행되는 프로그램이 병렬처리구간에 속하는지 여부에 대한 정보와 상기 실행되는 프로그램의 병렬처리에 필요한 코어의 수에 대한 정보가 생성되는 단계를 포함할 수 있다. 상기 코어의 수를 판단하는 단계를 통해 얻은 정보를 이용하여 멀티코어프로세서에서 구동되는 코어의 수를 제어하는 단계는 상기 실행되는 프로그램이 병렬처리구간에 속하는지 여부에 대한 정보와 상기 실행되는 프로그램의 병렬처리에 필요한 코어의 수에 대한 정보에 기초하여 상기 병렬처리에 필요한 코어의 수만큼의 코어자원의 요청이 있을 때, 상기 프로그램에 현재 할당된 코어를 해제하고 상기 요청된 코어의 수만큼 코어를 재할당하는 단계를 포함할 수 있다. 상기 해제된 코어에 할당된 다른 프로세스가 없는지 판단하여 할당된 다른 프로세스가 없는 경우 코어를 재할당하는 것을 특징으로 할 수 있다. 상기 재할당 단계는 코어의 활성화 상태를 나타내는 비트를 이용하여 상기 프로그램에 현재 할당된 코어를 해제하고 요청한 코어자원의 수만큼 코어를 재 할당하는 단계를 포함할 수 있다. 상기 코어의 수를 판단하는 단계를 통해 얻은 정보를 이용하여 멀티코어프로세서에서 구동되는 코어의 수를 제어하는 단계는 상기 실행되는 프로그램이 병렬처리구간에 속하는 경우에는 상기 실행되는 프로그램의 병렬처리에 필요한 코어의 수만큼의 코어자원을 할당해 줄 것을 요청하는 단계와 상기 실행되는 프로그램이 병렬처리구간에 속하지 않는 경우에는 1개의 코어 자원만큼의 코어 자원을 할당해줄 것을 요청하는 단계를 포함하는 것을 특징으로 할 수 있다. According to an aspect of the present invention, there is provided a method for controlling a multicore processor, the method comprising: determining a number of cores required for parallel processing of a program when executing a parallel programmed program; And controlling the number of cores running in the multicore processor using the information obtained through the step of determining the number of. The information obtained from the step of determining the number of cores required for the parallel processing may include information on whether the executed program belongs to a parallel processing section and information on the number of cores required for parallel processing of the executed program. Can be. The determining of the number of cores required for the parallel processing of the program includes executing a code automatically inserted by a compiler that compiles the program when the program is executed and executing the code by executing the code. And information on whether the number of cores required for parallel processing of the executed program is generated. Controlling the number of cores running in a multicore processor by using the information obtained through the determining of the number of cores comprises: information on whether the executed program belongs to a parallel processing section and the information of the executed program. On the basis of the information on the number of cores required for parallel processing, when there is a request for core resources corresponding to the number of cores required for parallel processing, the core currently allocated to the program is released and the cores are allocated as many as the requested number of cores. Reallocation. The method may determine that there is no other process allocated to the released core, and reassign the core when no other process is allocated. The reallocating step may include releasing cores currently allocated to the program by using bits representing the activation state of cores and reallocating cores by the number of requested core resources. Controlling the number of cores running in a multicore processor by using the information obtained through determining the number of cores is necessary for parallel processing of the executed programs when the executed programs belong to a parallel processing section. Requesting to allocate as many core resources as the number of cores, and requesting to allocate as many core resources as one core resource if the executed program does not belong to the parallel processing section. can do.

상술한 본 발명의 다른 목적을 달성하기 위한 본 발명의 일 측면에 따른 멀티코어프로세서의 제어장치는 병렬처리프로그래밍 된 프로그램의 실행 시 상기 프로그램의 병렬처리에 필요한 코어의 수를 판단하는 병렬처리분석부와 상기 코어의 수를 판단하는 단계를 통해 얻은 정보를 이용하여 멀티코어프로세서에서 구동되는 코어의 수를 제어하는 코어제어부를 포함한다. 상기 병렬처리에 필요한 코어의 수를 판단하는 단계로부터 얻은 정보는 상기 실행되는 프로그램이 병렬처리구간에 속하는지 여부에 대한 정보와 상기 실행되는 프로그램의 병렬처리에 필요한 코어의 수에 대한 정보를 포함하는 것을 특징으로 할 수 있다. 상기 병렬처리분석부는 상기 프로그램이 실행 시 상기 프로그램을 컴파일하는 컴파일러에서 자동으로 삽입한 코드가 실행되고 상기 코드가 실행되어 상기 실행되는 프로그램이 병렬처리구간에 속하는지 여부에 대한 정보와 상기 실행되는 프로그램의 병렬처리에 필요한 코어의 수에 대한 정보가 생성되는 것을 특징으로 할 수 있다. 상기 코어제어부는 상기 실행되는 프로그램이 병렬처리구간에 속하는지 여부에 대한 정보와 상기 실행되는 프 로그램의 병렬처리에 필요한 코어의 수에 대한 정보에 기초하여 상기 병렬처리에 필요한 코어의 수만큼의 코어자원의 요청이 있을 때, 상기 프로그램에 현재 할당된 코어를 해제하고 상기 요청된 코어의 수만큼 코어를 재할당하는 것을 특징으로 할 수 있다. 상기 코어제어부는 상기 프로그램에 현재 할당된 코어를 해제하고 상기 요청된 코어의 수만큼 코어를 재할당함에 있어 상기 해제된 코어에 할당된 다른 프로세스가 없는지 판단하여 할당된 다른 프로세스가 없는 경우 코어를 재할당하는 것을 특징으로 할 수 있다. 상기 프로그램에 현재 할당된 코어를 해제하고 상기 요청된 코어의 수만큼 코어를 재할당함에 있어, 코어의 활성화 상태를 나타내는 비트를 이용하여 상기 프로그램에 현재 할당된 코어를 해제하고 요청한 코어자원의 수만큼 코어를 재할당하는 것을 특징으로 할 수 있다. In accordance with another aspect of the present invention, there is provided a control apparatus for a multicore processor, the parallel processing analysis unit configured to determine the number of cores required for parallel processing of a program when executing a parallel program. And a core controller configured to control the number of cores driven in the multicore processor by using the information obtained through the determining of the number of cores. The information obtained from the step of determining the number of cores required for the parallel processing includes information on whether the executed program belongs to a parallel processing section and information on the number of cores required for parallel processing of the executed program. It may be characterized by. The parallel processing analyzing unit executes the code automatically inserted by a compiler that compiles the program when the program is executed, and executes the code so that information about whether the executed program belongs to a parallel processing section and the executed program is executed. The information on the number of cores required for parallel processing of may be generated. The core control unit is configured to generate as many as the number of cores required for the parallel processing based on information on whether the executed program belongs to a parallel processing section and information on the number of cores required for parallel processing of the executed program. When there is a request for a core resource, it may be characterized by releasing cores currently allocated to the program and reallocating cores by the number of the requested cores. The core controller determines whether there are other processes allocated to the released core in releasing cores currently allocated to the program and reallocating cores by the requested number of cores. It may be characterized by the assignment. In releasing cores currently allocated to the program and reallocating cores by the requested number of cores, the cores currently allocated to the program are released using bits representing the activation status of cores and the number of core resources requested. And reassign cores.

상술한 본 발명의 또 다른 목적을 달성하기 위한 본 발명의 일 측면에 따른 멀티코어프로세서는 복수의 코어와 병렬처리프로그래밍 된 프로그램의 실행 시 상기 프로그램의 병렬처리에 필요한 코어의 수를 판단하고, 상기 코어의 수를 판단하는 단계를 통해 얻은 정보를 이용하여 구동되는 코어의 수를 제어하는 제어부를 포함할 수 있다.The multi-core processor according to an aspect of the present invention for achieving another object of the present invention is to determine the number of cores required for parallel processing of the program when executing a plurality of cores and a parallel processing programmed program, It may include a control unit for controlling the number of driven cores using the information obtained through the step of determining the number of cores.

또한, 상술한 본 발명의 또 다른 목적을 달성하기 위한 본 발명의 일 측면에 따른 멀티코어프로세서 제어방법이 기록된 기록매체는 병렬처리를 수행하는 디지털 처리 장치에 의해 실행될 수 있는 명령어의 프로그램이 유형적으로 구현되어 있으며, 상기 디지털 처리 장치에 의해 판독될 수 있는, 프로그램에 필요한 코어의 수를 판단하는 단계와 상기 코어의 수를 판단하는 단계를 통해 얻은 정보를 이용하여 코어를 제어하는 단계를 수행하는 프로그램을 기록할 수 있다.In addition, the recording medium in which the multi-core processor control method according to an aspect of the present invention is recorded to achieve another object of the present invention described above is a program of instructions that can be executed by a digital processing device that performs parallel processing And controlling the core by using the information obtained by determining the number of cores required for the program and the number of cores, which can be read by the digital processing apparatus. You can record the program.

상술한 바와 같이 본 발명의 실시예에 따른 멀티코어프로세서 제어방법, 멀티코어프로세서 제어장치, 멀티코어프로세서 및 멀티코어프로세서 제어방법이 기록된 기록매체에 따르면, 프로세서의 병렬처리에 있어 병렬처리프로그래밍 된 프로그램을 실행 시 필요한 코어의 수를 판단하고 상기 판단된 정보를 기초로 멀티코어프로세서의 구동되는 코어의 수를 제어한다.As described above, according to the recording medium in which the multi-core processor control method, the multi-core processor control device, the multi-core processor and the multi-core processor control method according to the embodiment of the present invention are recorded, the parallel processing of the processor The number of cores required to execute the program is determined, and the number of cores driven by the multicore processor is controlled based on the determined information.

따라서 멀티코어프로세서에서 구동되는 코어의 수를 제어함으로써 병렬처리프로그래밍 된 프로그램을 실행 시 프로그램의 서비스의 품질(QoS:Quality of Service)을 보장할 수 있고 또한 멀티코어프로세서의 전력관리를 효율적으로 할 수 있다.Therefore, by controlling the number of cores running on a multicore processor, it is possible to guarantee the quality of service (QoS) of the program when executing a parallel-programmed program and to efficiently manage power of the multicore processor. have.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들은 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.As the invention allows for various changes and numerous embodiments, particular embodiments will be illustrated in the drawings and described in detail in the written description. However, this is not intended to limit the present invention to specific embodiments, it should be understood to include all modifications, equivalents, and substitutes included in the spirit and scope of the present invention. Like reference numerals are used for like elements in describing each drawing.

제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나 의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.The terms first, second, etc. may be used to describe various components, but the components should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, the first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component. And / or < / RTI > includes any combination of a plurality of related listed items or any of a plurality of related listed items.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어"있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어"있다거나 "직접 접속되어"있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.It is to be understood that when an element is referred to as being "connected" or "connected" to another element, it may be directly connected or connected to the other element, . On the other hand, when a component is referred to as being "directly connected" or "directly connected" to another component, it should be understood that there is no other component in between.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다. The terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting of the present invention. Singular expressions include plural expressions unless the context clearly indicates otherwise. In this application, the terms "comprise" or "have" are intended to indicate that there is a feature, number, step, operation, component, part, or combination thereof described in the specification, and one or more other features. It is to be understood that the present invention does not exclude the possibility of the presence or the addition of numbers, steps, operations, components, components, or a combination thereof.

이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시예를 보다 상세하게 설명하고자 한다. 이하, 도면상의 동일한 구성요소에 대해서는 동일한 참조부호 를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.Hereinafter, with reference to the accompanying drawings, it will be described in detail a preferred embodiment of the present invention. Hereinafter, the same reference numerals are used for the same components in the drawings, and redundant description of the same components is omitted.

이하, 본 발명의 실시예에서는 멀티 코어 프로세서의 전력 관리를 위해 병렬처리 프로그래밍 모델을 이용하는 것으로 가정한다. 여기서, 상기 병렬처리 프로그래밍 모델은 프로그램 내에 병렬처리 구간 및 직렬처리 구간을 나타내는 정보(예를 들면, 라이브러리 함수)가 포함된 것을 의미한다. 예를 들어, 컴파일러가 병렬처리 프로그램 코드를 컴파일하면서 병렬처리 구간 여부 및 생성되는 프로세스의 수에 대한 정보를 커널에 제공할 수 있는 코드를 자동으로 삽입함으로써 실시간으로 응용프로그램이 구동될 때 컴파일러에 의해 자동으로 삽입된 코드가 실행되면서 멀티코어프로세서에 제어요청을 하는 구조를 가진다.Hereinafter, embodiments of the present invention assume that a parallel programming model is used for power management of a multi-core processor. Here, the parallel programming model means that information (eg, a library function) indicating a parallel processing section and a serial processing section is included in a program. For example, the compiler compiles the parallel program code and automatically inserts code that can provide the kernel with information about the parallelism interval and the number of processes generated by the compiler when the application is run in real time. Automatically inserted code is executed to control the multicore processor.

도 2는 본 발명의 일 실시예에 따른 병렬처리프로그래밍 된 프로그램을 실행할 경우 생성되는 프로세스 또는 스레드(Thread)를 도시한 도면이다. 도2를 참조하면 병렬처리프로그래밍 된 프로그램이 멀티코어프로세서에서 실행될 경우 병렬처리가 요구되는 구간(210)과 병렬처리가 요구되지 않는 구간(220)으로 구분될 수 있다. 이러한 병렬처리가 요구되는 구간(210)과 병렬처리가 요구되지 않는 구간(220)을 분석하여 프로그램이 실행될 때 요구되는 정확한 코어의 수 만큼을 멀티코어프로세서에 할당할 수 있다면 서비스의 품질(QoS:Quality of Service)을 보장할 수 있고 또한 멀티코어프로세서의 전력관리를 효율적으로 할 수 있다.FIG. 2 is a diagram illustrating a process or thread generated when executing a parallel programmed program according to an exemplary embodiment of the present invention. Referring to FIG. 2, when a program programmed in parallel processing is executed in a multicore processor, it may be divided into a section 210 in which parallel processing is required and a section 220 in which parallel processing is not required. The quality of service (QoS) can be analyzed by analyzing the section 210 where parallel processing is required and the section 220 where parallel processing is not required and assigning the exact number of cores required when the program is executed to the multicore processor. Quality of Service can be guaranteed and power management of multicore processors can be done efficiently.

도 3은 본 발명의 일 실시예에 따른 멀티코어프로세서의 코어를 제어하기 위한 방법을 설명하기 위한 순서도이다. 도 3을 참조하면, 본 발명의 일 실시예에 따른 멀티코어프로세서의 코어를 제어하기 위한 방법은 병렬처리분석단계(310)와 코 어제어단계(320)를 거쳐 멀티코어프로세서를 구성하고 있는 복수의 코어들을 제어한다.3 is a flowchart illustrating a method for controlling a core of a multicore processor according to an embodiment of the present invention. Referring to FIG. 3, a method for controlling cores of a multicore processor according to an exemplary embodiment of the present invention includes a plurality of cores configured through a parallel processing analysis step 310 and a core control step 320. To control the cores.

도 4는 본 발명의 일실시예에 따른 멀티코어프로세서(400)의 블록도이다. 도 4를 참조하면, 멀티코어프로세서(400)는 제어부(410)와 복수의 코어(413-1, 413-2, 413-3, 413-4)를 포함한다. 제어부(410)는 병렬처리 분석부(411) 코어제어부(412)로 구성된다. 병렬처리 분석부(411)는 각 병렬처리프로그래밍 된 프로그램의 병렬처리 구간을 분석하고 병렬처리 구간일 경우 사용되는 프로세스의 수만큼의 코어자원을 할당해 줄 것을 코어제어부(412)에 요청하고, 병렬처리구간이 아닐 경우, 1개의 코어 자원만큼 코어제어부(412)에 요청한다. 코어제어부(412)은 병렬처리프로그래밍 된 프로그램이 사용하는 코어자원을 저장 및 관리하며 새로운 코어할당요청이 있을 때, 요청을 처리하는 기능을 담당한다. 4 is a block diagram of a multicore processor 400 in accordance with an embodiment of the present invention. Referring to FIG. 4, the multicore processor 400 includes a controller 410 and a plurality of cores 413-1, 413-2, 413-3, and 413-4. The control unit 410 is composed of a parallel processing analysis unit 411 core control unit 412. The parallel processing analysis unit 411 analyzes the parallel processing sections of each parallel processing programmed program and requests the core control unit 412 to allocate as many core resources as the number of processes used in the case of the parallel processing sections. If not in the processing section, the core controller 412 requests one core resource. The core control unit 412 stores and manages core resources used by the programs programmed in parallel processing, and handles the request when there is a new core allocation request.

도 5는 본 발명의 일 실시예에 따른 병렬처리분석부(411)에서 수행되는 도 3의 병렬처리분석단계(310)를 구체적으로 나타낸 흐름도이다. 병렬처리분석부(411)에서는 실행되고 있는 병렬처리프로그래밍 된 프로그램을 종료할 것인지를 판단한다(단계 311). 병렬처리분석부(411)에서는 병렬처리프로그래밍 된 프로그램이 계속 실행 중이라면 병렬처리구간인지 여부와 병렬처리를 함에 있어서 필요한 코어의 수를 판단한다(단계 312). 병렬처리프로그래밍 된 프로그램의 경우, 프로그램의 코드를 분석하면 병렬처리 되는 구간인지 여부와 병렬처리에 필요한 프로세스의 수를 알 수 있다. 병렬처리분석부(411)에서는 병렬처리프로그래밍된 프로그램을 컴파일하는 컴파일러에 상기 프로그램의 병렬처리구간에 대한 정보와 상기 프로그램의 병 렬처리에 필요한 코어의 수에 대한 정보를 멀티코어프로세서에서 구동되는 코어의 수를 제어하는 코어제어부(412)에 전달해주는 코드를 자동으로 삽입하여 프로그램이 실행시 삽입된 코드가 함께 실행되어 코어제어부(412)에 대상 응용프로그램의 프로세스의 수만큼 코어자원을 요청할 수 있다(단계 314)5 is a flowchart specifically illustrating the parallel processing analysis step 310 of FIG. 3 performed by the parallel processing analysis unit 411 according to an embodiment of the present invention. The parallel processing analysis unit 411 determines whether to terminate the parallel processing programmed program being executed (step 311). The parallel processing analysis unit 411 determines whether the parallel processing section is a parallel processing section and the number of cores required for parallel processing if the program programmed in the parallel processing continues to be executed (step 312). In the case of a program that has been programmed for parallel processing, the code of the program can be analyzed to find out whether it is a parallel processing section and the number of processes required for parallel processing. In the parallel processing analysis unit 411, a core that is driven by a multicore processor provides a compiler for compiling a parallel processing programmed program with information about a parallel processing section of the program and information about the number of cores required for parallel processing of the program. The code transmitted to the core controller 412 that controls the number of times is automatically inserted so that when the program is executed, the inserted code is executed together so that the core controller 412 can request as many core resources as the number of processes of the target application program. (Step 314)

또한 병렬처리분석부(411)는 상기 프로그램의 병렬처리구간에 대한 정보로부터 판단한 결과 병렬처리구간이 아닐 경우 코어제어부(412)에 하나의 코어자원만을 요청하여(단계 313) 불필요한 코어의 구동으로 인한 전력소모를 줄일 수 있다. In addition, when the parallel processing analysis unit 411 determines from the information on the parallel processing section of the program, if it is not the parallel processing section, only one core resource is requested to the core control unit 412 (step 313). Power consumption can be reduced.

도 6은 본 발명의 일 실시예에 따른 멀티코어프로세서의 코어자원을 관리하는 코어관리자(610)를 나타낸 블록도이다. 코어관리자(610)는 코어자원을 마스터 프로세스(부모 프로세스)-슬레이브 프로세스(자식 프로세스)의 아이디 형태(620)로 데이터화시켜 관리한다. 도면의 블록 안에 숫자는 마스터 프로세스 아이디(부모 프로세스)-슬레이브 프로세스 아이디(자식 프로세스)의 예시이다. 6 is a block diagram illustrating a core manager 610 managing core resources of a multicore processor according to an exemplary embodiment of the present invention. The core manager 610 data-cores and manages core resources in an ID form 620 of a master process (parent process) -slave process (child process). The numbers in the blocks of the figure are examples of master process ID (parent process) -slave process ID (child process).

도 7은 본 발명의 일 실시예에 따른 도6의 코어관리자(610)가 마스터 프로세스 아이디정보와 슬레이브 프로세스 아이디정보를 저장 및 관리하고 코어의 ON/OFF bit 정보를 저장 및 관리하여 코어의 구동을 제어하기 위한 코어관리자 테이블의 일예이다. FIG. 7 illustrates the core manager 610 of FIG. 6 storing and managing master process ID information and slave process ID information, and storing and managing ON / OFF bit information of a core to drive the core. An example of the core manager table for control.

도 8는 본 발명의 일 실시예에 따른 코어제어부(412)에서 실시되는 도 3의 코어제어단계(320)를 나타낸 흐름도이다. 코어제어부(412)는 코어관리자 테이블(도7 참조)에 표시된 마스터 프로세스 아이디 정보를 기초로 마스터 프로세스에 코어를 할당 또는 해제하는 명령을 내린다. 코어를 할당 또는 해제하는 명령을 받은 마 스터 프로세스는 슬레이브 프로세스에 할당된 코어를 할당 또는 해제시켜 프로그램에 실행에 필요한 프로세스의 수를 동적으로 변화시킨다. 코어를 할당 또는 해제시켜 프로그램에 필요한 프로세스의 수를 동적으로 변화시키는 과정은 코어제어부(412)에서 코어관리자 테이블의 ON/OFF bit 값을 변화시키고 코어관리자는 실제 코어의 ON/OFF를 제어한다. 8 is a flowchart illustrating the core control step 320 of FIG. 3 performed by the core control unit 412 according to an embodiment of the present invention. The core controller 412 issues a command to allocate or release a core to the master process based on the master process ID information displayed in the core manager table (see FIG. 7). The master process, which receives a command to allocate or free cores, dynamically allocates or frees cores allocated to slave processes to dynamically change the number of processes required to run in the program. The process of dynamically changing the number of processes required for a program by allocating or releasing cores changes the ON / OFF bit value of the core manager table in the core controller 412 and the core manager controls ON / OFF of the actual core.

이하 코어제어부(412)에서 수행되는 코어제어단계를 도 8을 참조하여 설명한다. 먼저 코어제어부(412)는 응용프로그램의 코어자원의 요청이 있는지를 판단한다(단계 321). 코어자원의 요청이 없는 경우, 예를 들어, 병렬처리프로그래밍된 프로그램이 지속적으로 같은 수의 프로세스를 실행하여 동일한 수의 코어자원이 필요한 경우, 현재의 멀티코어프로세서의 코어의 구동상태를 유지한다(단계 321). 하지만 새로운 코어자원의 요청이 있는 경우 코어제어부(412)는 병렬처리프로그래밍된 프로그램에 할당된 코어를 해제한다(단계 322). 할당된 코어를 해제는 실행되는 병렬처리프로그래밍된 프로그램의 마스터 프로세스를 참조하여 관련된 슬레이브 프로세스를 해제한다(단계 322). 할당된 코어를 해제하는 단계(322)는 코어제어부(412)는 실제 코어를 ON/OFF를 하지 않고 코어관리자 테이블(도7참조)를 수정하여 코어관리자 테이블의 ON/OFF bit 값을 변화시키는 방법으로 이루어 질 수 있다. 코어제어부(412)에서는 해제된 코어에 할당된 프로세스가 없는지를 판단한다(단계 323). 코어제어부(412)는 할당이 해제된 코어에 새로 할당된 프로세스가 없는 경우 코어관리자(610)에서는 해당 코어의 ON/OFF bit을 OFF로 설정하고(단계 324) 상기 요청된 새로운 코어자원의 수만큼 코어를 재할당한다(단계 325). 코어제어부(412)는 코 어관리자 테이블에 있는 코어의 ON/OFF bit 정보를 참조하여 OFF로 표시된 bit를 가지는 코어부터 프로세스에 코어를 재할당하고 코어관리자 테이블에 재할당 된 코어의 ON/OFF bit을 정보를 ON으로 수정하는 방식으로 이루어진다(단계 325). 코어제어부(412)는 단계(323)에서 해제된 코어에 할당된 프로세스가 있는 경우, 예를 들어 코어자원의 분배를 담당하는 운영체제의 스케쥴러에 의해 두 개의 프로그램이 동일한 코어 상에 할당되었고 코어할당이 해제되지 않은 남은 하나의 프로그램이 실행되고 있을 때, 단계 324를 거치지 않고 상기 요청된 새로운 코어자원의 수만큼 코어를 재할당한다(단계 325). 이 경우 역시 코어관리자(610)에서 해당코어의 ON/OFF bit을 판단하여 OFF로 표시된 bit를 가지는 코어부터 코어를 재할당하고 해당코어의 ON/OFF bit을 ON으로 설정하는 방식으로 이루어진다. 실제로 코어를 활성화는 코어관리자가 코어관리자 테이블상의 모든 코어의 ON/OFF bit 정보를 판단하여 ON표시가 된 코어의 수만큼 코어를 활성화시킨다(단계 326). 코어관리자 테이블의 갱신을 위해 운영체제의 커널정보에 있는, 실제 코어에 할당된 프로세스정보인 마스터 프로세스 아이디와 슬레이브 프로세스 아이디를 코어관리자 테이블에 적용시킨다(단계 327). Hereinafter, a core control step performed by the core controller 412 will be described with reference to FIG. 8. First, the core controller 412 determines whether there is a request for a core resource of an application program (step 321). If there is no request of core resources, for example, a parallel programmed program continuously executes the same number of processes and requires the same number of core resources, the core of the current multicore processor is kept running. Step 321). However, if there is a request for a new core resource, the core control unit 412 releases the core assigned to the parallel-programmed program (step 322). Releasing the assigned core releases the associated slave process by referring to the master process of the parallel program being executed (step 322). In step 322 of releasing the assigned core, the core controller 412 modifies the core manager table (see FIG. 7) without turning on or off the actual core to change the ON / OFF bit value of the core manager table. Can be done with. The core controller 412 determines whether there is a process allocated to the released core (step 323). If there is no newly allocated process in the unassigned core, the core controller 412 sets the ON / OFF bit of the corresponding core to OFF (step 324) and as many as the requested number of new core resources. Reallocate the core (step 325). The core controller 412 reallocates the core to the process from the core having the bit indicated as OFF by referring to the ON / OFF bit information of the core in the core manager table, and turns the core ON / OFF bit in the core manager table. Is made by modifying the information to ON (step 325). When there is a process allocated to the core released in step 323, the core controller 412 allocates two programs on the same core, for example, by the scheduler of the operating system responsible for distributing core resources. When the remaining one program which has not been released is being executed, the core is reallocated by the number of the requested new core resources without going through step 324 (step 325). In this case, the core manager 610 also determines the ON / OFF bit of the corresponding core, reallocates the core from the core having the bit indicated as OFF, and sets the ON / OFF bit of the corresponding core to ON. In actuality, the core manager determines the ON / OFF bit information of all cores in the core manager table to activate cores by the number of cores marked as ON (step 326). In order to update the core manager table, the master process ID and the slave process ID, which are process information allocated to the actual core, in the kernel information of the operating system are applied to the core manager table (step 327).

상기 도 8의 흐름도를 코어제어부(412)에서 실행되는 실제 응용프로그램의 예를 들어 설명해본다. 하나의 실시예로 4개의 코어를 가진 쿼드코어프로세서(Quad Core Processor)에서 동영상재생프로그램이 구동될 때, 동영상재생프로그램의 실행중 1개의 프로세스가 사용되다가 3개의 프로세스가 필요한 상황으로 변화한다고 가정한다. 도 7의 예시를 활용한다면, 동영상재생프로그램의 마스터 프로세스를 아이 디 315번이라 할당할 수 있다. 처음 동영상재생프로그램을 실행 시 1개의 프로세스가 필요한 상황이므로 마스터 프로세스 아이디-슬레이브 프로세스를 아이디 315-315번을 할당하여 코어0번을 구동시킨다. 그 후 3개의 프로세스가 필요한 상황으로 변화한다면 이러한 요청을 마스터 프로세스에 하고(단계 321) 마스터 프로세스는 슬레이브 프로세스 315-315번을 해제한다(단계 322). 이 때 코어제어부는 코어관리자 테이블을 수정한다. 그 후 코어0번에 할당된 프로세스가 없다면 코어0번의 ON/OFF bit을 OFF로 코어관리자 테이블에 표시한다(단계 324). 그 후 앞에서 가정한 3개의 프로세스가 필요하다는 요청에 따라 코어관리자 테이블에 표시된 코어0,코어1,코어2 및 코어3의 ON/OFF bit 정보를 기초로 만약 OFF가 표시된 코어가 코어0, 코어1 및 코어3이라고 한다면 코어0, 코어1 및 코어3을 동영상재생프로그램에 할당하고 코어관리자 테이블에서 코어0, 코어1 및 코어3의 ON/OFF bit 정보를 ON으로 변경시킨다(단계 325). 그 후 코어관리자의 ON/OFF bit을 검사하여 ON표시의 수만큼 코어를 활성화시키고(단계 326) 마지막으로 운영체제의 커널 정보 중 코어에 할당된 프로세스의 정보(코어0:315-315, 코어1:315-316, 코어3:315-317)를 코어관리자 테이블에 적용시킨다.The flowchart of FIG. 8 will be described using an example of an actual application program executed by the core controller 412. In an embodiment, it is assumed that when a video player is run on a quad core processor having four cores, one process is used during execution of the video player program and then three processes are required. . If the example of FIG. 7 is used, the master process of the video player program may be assigned as ID 315. Since one process is required when executing the video playing program for the first time, core 0 is driven by assigning ID 315-315 to the master process ID-slave process. If three processes then change to the required situation, this request is sent to the master process (step 321) and the master process releases slave processes 315-315 (step 322). At this time, the core controller modifies the core manager table. Thereafter, if there is no process assigned to core 0, the ON / OFF bit of core 0 is set to OFF in the core manager table (step 324). Then, based on the ON / OFF bit information of Core 0, Core 1, Core 2, and Core 3 shown in the Core Manager table, if the three processes assumed above are required, the core marked OFF is Core 0, Core 1 And core 3, core 0, core 1 and core 3 are assigned to the video playback program and the ON / OFF bit information of core 0, core 1 and core 3 is changed to ON in the core manager table (step 325). Thereafter, the core manager checks the ON / OFF bit to activate cores as many as the number of ON marks (step 326). 315-316, Core 3: 315-317) are applied to the Core Manager table.

상기 도 8의 흐름도를 코어제어부(412)에서 실행되는 실제 응용프로그램의 다른 예를 들어 설명해본다. 4개의 코어를 가진 쿼드코어프로세서(Quad Core Processor)에서 동영상재생프로그램과 워드프로세서가 실행되는 경우를 생각해볼 수 있다. 현재 동영상재생프로그램에 3개의 프로세스가 필요하고 워드프로세서에 2개의 프로세스가 필요한 상태이고 운영체제의 코어자원을 할당하는 스케쥴러에 의 해 동영상재생프로그램에 3개의 코어가 할당되어 있고 워드프로세서에 1개의 코어가 할당되어 있다고 가정한다. 이러한 가정을 기초로 도면 7에 예시된 마스터 프로세스 아이디-슬레이브 프로세스 아이디정보를 기초로 마스터 프로세스-슬레이브 프로세스와 코어의 할당상태를 예시해보면, 동영상재생프로그램에는 코어0:315-315, 코어1:315-316, 코어2:315-317가 할당되고 워드프로세서에는 코어3:4150-4152, 코어0:4150-4150가 할당된다. 이 경우 멀티코어프로세서에는 4개의 코어만이 존재하기 때문에 상기의 가정과 같이 운영체제의 코어자원분배를 하는 스케쥴러에 의하여 동영상재생프로그램에 3개의 코어가 할당되어 있고 워드프로세서에 1개의 코어가 할당되어 있다고 가정한다면 실제 코어상에 구동되는 코어와 마스터 프로세스 아이디-슬레이브 프로세스 아이디는 동영상재생프로그램이 코어0:315-315, 코어1:315-316, 코어2:315-317으로 3개의 코어가 할당되고 워드프로세서에는 코어3:4150-4152이 할당되어 실행된다. 워드프로세서의 코어0:4150-4150은 현재 코어0에서는 동영상재생프로그램이 실행되고 있기 때문에 코어0에서 실행을 대기하는 상태가 된다. 이러한 코어자원분배상태가 지속되다가 동영상프로그램에서 2개의 프로세스가 필요한 상태로 변화한다고 하면 단계 321에 따라 동영상재생프로그램의 마스터 프로세스를 참조하여 코어0:315-315, 코어1:315-316, 코어2:315-317로 3개의 코어가 할당된 상태에서 동영상재생프로그램의 마스터 프로세스 아이디인 315를 참조하여 마스터 프로세스에 코어할당을 해제를 하라는 명령을 내리고 이 때 코어관리자의 테이블(도 7참조)이 수정된다(단계 322). 이 때 실제로 코어를 ON/OFF하는 것이 아니라 코어관리자의 테이블(도 7참조)만 수정한다. 이러한 상황을 예를 들어 설명해보면, 코어관리자의 테이블(도 7참조)상에 매칭된 코어정보와 마스터 프로세스 아이디-슬레이브 프로세스 아이디정보인 동영상프로그램에 할당된 코어0:315-315, 코어1:315-316, 코어2:315-317가 코어관리자 테이블 상에서 해제된다. 이때 코어0에는 할당되어 대기하던 워드프로세서의 프로세스(4150-4150)은 해제된 코어0에서 실행되고 남는 코어인 코어1과 코어2는 단계 324를 거쳐 코어관리자 테이블에 ON/OFF bit을 OFF로 설정한다. 코어제어부(412)는 단계 321을 통해 요청된 2개의 프로세스만큼 코어를 재할당한다(단계 325). 코어를 할당하는 단계는 코어관리자 테이블의 ON/OFF bit를 판단하여 할당하는데 상기 예시에서는 코어1과 코어2의 ON/OFF bit이 단계 324를 거치면서 OFF로 표시되었으므로 코어1과 코어2에 동영상재생프로그램이 재할당된다. 이 후 코어관리자(610)의 모든 ON/OFF bit을 검사하여 실제로 코어를 활성화 시키고(단계 326) 운영체제의 커널정보 중, 실제 코어에 할당된 프로세스 정보를 코어관리자 테이블에 적용한다(단계 327). The flowchart of FIG. 8 will be described with another example of an actual application program executed by the core controller 412. Consider a case where a video player and a word processor are executed on a quad core processor having four cores. Currently, 3 processes are required for the video player, 2 processes are required for the word processor, 3 cores are allocated to the video player and 1 core is assigned to the word processor by the scheduler that allocates the core resources of the operating system. Assume that it is allocated. Based on these assumptions, based on the master process ID-slave process ID information illustrated in FIG. 7, the master process-slave process and the assignment state of the cores are illustrated. The video playback program includes core 0: 315-315 and core 1: 315. -316, core 2: 315-317 are assigned, and word processors core 3: 4150-4152, core 0: 4150-4150. In this case, since only 4 cores exist in the multicore processor, it is assumed that 3 cores are allocated to the video player and 1 core is allocated to the word processor by the scheduler that distributes the core resources of the operating system. If the core and master process ID-slave process ID are running on the real core, three video cores are assigned to the video player as core 0: 315-315, core 1: 315-316, and core 2: 315-317. Core 3: 4150-4152 is assigned and executed. Core 0: 4150-4150 of the word processor is currently waiting for execution in core 0 because a video playback program is being executed in core 0. If the state of the core resource distribution continues and changes to the state where two processes are required in the video program, the core 0: 315-315, the core 1: 315-316, and the core 2 are referred to in step 321 with reference to the master process of the video playback program. With 3 cores assigned as: 315-317, the command to release the core assignment to the master process by referring to the master process ID 315 of the video player is modified. (Step 322). At this time, the core manager's table (see Fig. 7) is not modified. To illustrate this situation, the cores assigned to the video program, which are matched core information and master process ID-slave process ID information on the core manager's table (see Fig. 7), are assigned to core 0: 315-315 and core 1: 315. -316, core 2: 315-317 are released on the core manager table. At this time, the word processor processes 4150-4150 allocated to core 0 are executed in the released core 0 and the remaining cores core 1 and core 2 set the ON / OFF bit to OFF in the core manager table through step 324. do. The core controller 412 reallocates cores by two processes requested through step 321 (step 325). In the step of allocating core, the ON / OFF bit of the core manager table is determined and allocated. The program is reallocated. Thereafter, all the ON / OFF bits of the core manager 610 are inspected to actually activate the core (step 326), and among the kernel information of the operating system, process information allocated to the actual core is applied to the core manager table (step 327).

이상 실시예를 참조하여 설명하였지만, 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다. Although described with reference to the embodiments above, those skilled in the art will understand that the present invention can be variously modified and changed without departing from the spirit and scope of the invention as set forth in the claims below. Could be.

도 1은 On-Demand방식을 사용한 멀티코어프로세서의 전력관리방식을 나타낸 그래프이다.1 is a graph illustrating a power management method of a multicore processor using an on-demand method.

도 2은 본 발명의 일 실시예에 따른 병렬처리프로그래밍 된 프로그램을 실행할 경우 생성되는 프로세스 또는 스레드(Thread)를 나타낸 도면이다. 2 is a diagram illustrating a process or thread generated when executing a parallel programmed program according to an exemplary embodiment of the present invention.

도 3는 본 발명의 일 실시예에 따른 멀티코어프로세서의 코어를 제어하기 위한 방법을 설명하기 위한 순서도이다.3 is a flowchart illustrating a method for controlling a core of a multicore processor according to an embodiment of the present invention.

도 4는 본 발명의 일 실시예에 따른 멀티코어프로세서의 블록도이다.4 is a block diagram of a multicore processor according to an embodiment of the present invention.

도 5는 본 발명의 일 실시예에 따른 병렬처리분석부에서 수행되는 병렬처리분석단계를 구체적으로 나타낸 흐름도이다.5 is a flowchart showing in detail the parallel processing analysis step performed in the parallel processing analysis unit according to an embodiment of the present invention.

도 6은 본 발명의 일 실시예에 따른 멀티코어프로세서의 코어자원을 관리하는 코어관리자를 블록형태로 나타낸 도면이다.6 is a block diagram illustrating a core manager for managing core resources of a multicore processor according to an exemplary embodiment of the present invention.

도 7은 본 발명의 일 실시예에 따른 코어관리자 테이블의 일예이다.7 is an example of a core manager table according to an embodiment of the present invention.

도 8는 본 발명의 일 실시예에 따른 코어제어부에서 실시되는 코어제어단계를 나타낸 흐름도이다.8 is a flowchart illustrating a core control step performed in the core control unit according to an embodiment of the present invention.

Claims (15)

병렬처리프로그래밍된 프로그램의 실행 시 상기 프로그램을 컴파일하는 컴파일러에서 자동으로 삽입한 코드가 실행되는 단계;Executing a program automatically inserted by a compiler for compiling the program when executing a parallel program; 상기 코드가 실행되어 상기 실행되는 프로그램이 병렬처리구간에 속하는지 여부에 대한 정보와 상기 실행되는 프로그램의 병렬처리에 필요한 코어의 수에 대한 정보가 생성되는 단계; 및Executing the code to generate information on whether the executed program belongs to a parallel processing section and information on the number of cores required for parallel processing of the executed program; And 상기 코드가 실행되어 상기 실행되는 프로그램이 병렬처리구간에 속하는지 여부에 대한 정보와 상기 실행되는 프로그램의 병렬처리에 필요한 코어의 수에 대한 정보를 이용하여 멀티코어프로세서에서 구동되는 코어의 수를 제어하는 단계를 포함하는 것을 특징으로 하는 멀티코어프로세서 제어방법.The number of cores running in a multicore processor is controlled using information on whether the code is executed and the executed program belongs to a parallel processing section, and information on the number of cores required for parallel processing of the executed program. Multi-core processor control method comprising the step of. 삭제delete 삭제delete 제1항에 있어서, 상기 멀티코어프로세서에서 구동되는 코어의 수를 제어하는 단계는,The method of claim 1, wherein the controlling of the number of cores running in the multicore processor comprises: 상기 실행되는 프로그램이 병렬처리구간에 속하는지 여부에 대한 정보와 상기 실행되는 프로그램의 병렬처리에 필요한 코어의 수에 대한 정보에 기초하여 상기 병렬처리에 필요한 코어의 수만큼의 코어자원의 요청이 있을 때, 상기 프로그램에 현재 할당된 코어를 해제하고 상기 요청된 코어의 수만큼 코어를 재할당하는 재할당단계를 포함하는 멀티코어프로세서의 제어방법.There may be requests for as many core resources as the number of cores required for the parallel processing based on information on whether the executed program belongs to a parallel processing section and information on the number of cores required for parallel processing of the executed program. And reallocating cores currently allocated to the program and reallocating cores by the requested number of cores. 제 4항에 있어서, 상기 재할당단계는,The method of claim 4, wherein the reassignment step, 상기 해제된 코어에 할당된 다른 프로세스가 없는지 판단하여 할당된 다른 프로세스가 없는 경우 코어를 재할당하는 것을 특징으로 하는 멀티코어프로세서의 제어방법.And determining that there is no other process allocated to the released core, and reassigning the core when no other process is allocated. 제4항에 있어서, 상기 재할당단계는,The method of claim 4, wherein the reassignment step, 코어의 활성화 상태를 나타내는 비트를 이용하여 상기 프로그램에 현재 할당된 코어를 해제하고 요청한 코어자원의 수만큼 코어를 재할당하는 단계를 포함하는 것을 특징으로 하는 멀티코어프로세서의 제어방법.Releasing a core currently allocated to the program by using a bit representing an activation state of a core and reallocating cores by the number of requested core resources. 제1항에 있어서, 상기 멀티코어프로세서에서 구동되는 코어의 수를 제어하는 단계는The method of claim 1, wherein the controlling of the number of cores running in the multicore processor comprises: 상기 실행되는 프로그램이 병렬처리구간에 속하는 경우에는 상기 실행되는 프로그램의 병렬처리에 필요한 코어의 수만큼의 코어자원을 할당해 줄 것을 요청하는 단계; 및Requesting to allocate as many core resources as the number of cores required for parallel processing of the executed program if the executed program belongs to a parallel processing section; And 상기 실행되는 프로그램이 병렬처리구간에 속하지 않는 경우에는 1개의 코어 자원만큼의 코어 자원을 할당해줄 것을 요청하는 단계를 포함하는 것을 특징으로 하는 멀티코어프로세서의 제어방법. And requesting to allocate as many core resources as one core resource if the program to be executed does not belong to the parallel processing period. 멀티코어프로세서의 제어장치에 있어서,In the control device of a multicore processor, 병렬처리프로그래밍 된 프로그램의 실행 시 상기 프로그램을 컴파일하는 컴파일러에서 자동으로 삽입한 코드가 실행되고 상기 코드가 실행되어 상기 실행되는 프로그램이 병렬처리구간에 속하는지 여부에 대한 정보와 상기 실행되는 프로그램의 병렬처리에 필요한 코어의 수에 대한 정보가 생성되는 병렬처리분석부; 및When executing the programmed program, the code inserted automatically by the compiler compiling the program is executed, the information is executed whether the code is executed and the executed program belongs to the parallel processing section and the parallel of the executed program. A parallel processing analysis unit for generating information on the number of cores required for processing; And 상기 병렬처리분석부로부터 상기 코드가 실행되어 상기 실행되는 프로그램이 병렬처리구간에 속하는지 여부에 대한 정보와 상기 실행되는 프로그램의 병렬처리에 필요한 코어의 수에 대한 정보를 이용하여 멀티코어프로세서에서 구동되는 코어의 수를 제어하는 코어제어부를 포함하는 멀티코어프로세서의 제어장치.The code is executed from the parallel processing analyzer to run on a multicore processor using information on whether the executed program belongs to a parallel processing section and information on the number of cores required for parallel processing of the executed program. Control device of a multi-core processor including a core control unit for controlling the number of cores to be. 삭제delete 삭제delete 제 8항에 있어서, 상기 코어제어부는,The method of claim 8, wherein the core control unit, 상기 실행되는 프로그램이 병렬처리구간에 속하는지 여부에 대한 정보와 상기 실행되는 프로그램의 병렬처리에 필요한 코어의 수에 대한 정보에 기초하여 상기 병렬처리에 필요한 코어의 수만큼의 코어자원의 요청이 있을 때, 상기 프로그램에 현재 할당된 코어를 해제하고 상기 요청된 코어의 수만큼 코어를 재할당하는 것을 특징으로 하는 멀티코어프로세서의 제어장치.There may be requests for as many core resources as the number of cores required for the parallel processing based on information on whether the executed program belongs to a parallel processing section and information on the number of cores required for parallel processing of the executed program. And, when releasing cores currently assigned to the program and reallocating as many cores as the requested number of cores. 제11항에 있어서, 상기 코어제어부는,The method of claim 11, wherein the core control unit, 상기 프로그램에 현재 할당된 코어를 해제하고 상기 요청된 코어의 수만큼 코어를 재할당함에 있어,In releasing cores currently allocated to the program and reallocating cores by the requested number of cores, 상기 해제된 코어에 할당된 다른 프로세스가 없는지 판단하여 할당된 다른 프로세스가 없는 경우 코어를 재할당하는 것을 특징으로 하는 멀티코어프로세서의 제어장치.And determining that there is no other process allocated to the released core, and reassigning the core when no other process is allocated. 제11항에 있어서, 상기 코어제어부는,The method of claim 11, wherein the core control unit, 상기 프로그램에 현재 할당된 코어를 해제하고 상기 요청된 코어의 수만큼 코어를 재할당함에 있어,In releasing cores currently allocated to the program and reallocating cores by the requested number of cores, 코어의 활성화 상태를 나타내는 비트를 이용하여 상기 프로그램에 현재 할당된 코어를 해제하고 요청한 코어자원의 수만큼 코어를 재할당하는 것을 특징으로 하는 멀티코어프로세서의 제어장치.The controller of the multicore processor, comprising: releasing a core currently allocated to the program by using a bit representing an activation state of a core and reallocating cores by the number of requested core resources. 병렬처리를 수행하는 디지털 처리 장치에 의해 실행될 수 있는 명령어의 프로그램이 유형적으로 구현되어 있으며, 상기 디지털 처리 장치에 의해 판독될 수 있는 프로그램을 기록한 기록매체에 있어서,In the recording medium on which a program of instructions that can be executed by a digital processing apparatus that performs parallel processing is tangibly implemented, and which records a program that can be read by the digital processing apparatus, 상기 프로그램이 실행 시 상기 프로그램을 컴파일하는 컴파일러에서 자동으로 삽입한 코드가 실행되는 단계;Executing code automatically inserted by a compiler that compiles the program when the program is executed; 상기 코드가 실행되어 상기 실행되는 프로그램이 병렬처리구간에 속하는지 여부에 대한 정보와 상기 실행되는 프로그램의 병렬처리에 필요한 코어의 수에 대한 정보가 생성되는 단계; 및Executing the code to generate information on whether the executed program belongs to a parallel processing section and information on the number of cores required for parallel processing of the executed program; And 상기 코드가 실행되어 상기 실행되는 프로그램이 병렬처리구간에 속하는지 여부에 대한 정보와 상기 실행되는 프로그램의 병렬처리에 필요한 코어의 수에 대한 정보를 이용하여 코어를 제어하는 단계를 수행하는 프로그램을 기록한 기록매체.A program for performing core control using the information on whether the code is executed and the executed program belongs to a parallel processing section and the number of cores required for parallel processing of the executed program. Record carrier. 멀티코어프로세서에 있어서,In a multicore processor, 복수의 코어; 및 A plurality of cores; And 병렬처리프로그래밍 된 프로그램의 실행 시 상기 프로그램을 컴파일하는 컴파일러에서 자동으로 삽입한 코드가 실행되고 상기 코드가 실행되어 상기 실행되는 프로그램이 병렬처리구간에 속하는지 여부에 대한 정보와 상기 실행되는 프로그램의 병렬처리에 필요한 코어의 수에 대한 정보가 생성되고, 상기 코드가 실행되어 상기 실행되는 프로그램이 병렬처리구간에 속하는지 여부에 대한 정보와 상기 실행되는 프로그램의 병렬처리에 필요한 코어의 수에 대한 정보를 이용하여 구동되는 코어의 수를 제어하는 제어부를 포함하는 멀티코어프로세서.When executing the programmed program, the code inserted automatically by the compiler compiling the program is executed, the information is executed whether the code is executed and the executed program belongs to the parallel processing section and the parallel of the executed program. Information about the number of cores required for processing is generated, and information about whether the code is executed and the executed program belongs to a parallel processing section, and information about the number of cores required for parallel processing of the executed program A multicore processor comprising a control unit for controlling the number of cores to be driven using.
KR1020090130431A 2009-12-24 2009-12-24 Method Of Controlling Multi-Core Processor, Apparatus For Controlling Multi-Core Processor, Multi-Core Processor, And Record Medium For Performing Method Of Controlling Multi-Core Processor KR101088563B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020090130431A KR101088563B1 (en) 2009-12-24 2009-12-24 Method Of Controlling Multi-Core Processor, Apparatus For Controlling Multi-Core Processor, Multi-Core Processor, And Record Medium For Performing Method Of Controlling Multi-Core Processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020090130431A KR101088563B1 (en) 2009-12-24 2009-12-24 Method Of Controlling Multi-Core Processor, Apparatus For Controlling Multi-Core Processor, Multi-Core Processor, And Record Medium For Performing Method Of Controlling Multi-Core Processor

Publications (2)

Publication Number Publication Date
KR20110073714A KR20110073714A (en) 2011-06-30
KR101088563B1 true KR101088563B1 (en) 2011-12-05

Family

ID=44404194

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020090130431A KR101088563B1 (en) 2009-12-24 2009-12-24 Method Of Controlling Multi-Core Processor, Apparatus For Controlling Multi-Core Processor, Multi-Core Processor, And Record Medium For Performing Method Of Controlling Multi-Core Processor

Country Status (1)

Country Link
KR (1) KR101088563B1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101880452B1 (en) 2012-02-06 2018-08-17 삼성전자주식회사 Apparatus and method for scheduling kernel execution order
KR102005765B1 (en) 2012-12-17 2019-07-31 삼성전자주식회사 System on chip and operation method using the same
KR102110812B1 (en) 2013-05-30 2020-05-14 삼성전자 주식회사 Multicore system and job scheduling method thereof
US11893392B2 (en) 2020-12-01 2024-02-06 Electronics And Telecommunications Research Institute Multi-processor system and method for processing floating point operation thereof

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100193920B1 (en) * 1995-11-14 1999-06-15 니시무로 타이죠 Multiprocessor computer

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100193920B1 (en) * 1995-11-14 1999-06-15 니시무로 타이죠 Multiprocessor computer

Also Published As

Publication number Publication date
KR20110073714A (en) 2011-06-30

Similar Documents

Publication Publication Date Title
KR100591727B1 (en) Recording media and information processing systems recording scheduling methods and programs for executing the methods
KR100623217B1 (en) Scheduling method, recording medium for storing program to execute the method and realtime processing system
US8793695B2 (en) Information processing device and information processing method
US8683471B2 (en) Highly distributed parallel processing on multi-core device
US8650296B1 (en) Workload reallocation involving inter-server transfer of software license rights and intra-server transfer of hardware resources
KR100628492B1 (en) Method and system for performing real-time operation
KR100996750B1 (en) Method, system, storage medium and processor for performance prioritization in multi-threaded processors
US8893145B2 (en) Method to reduce queue synchronization of multiple work items in a system with high memory latency between processing nodes
CN109144710B (en) Resource scheduling method, device and computer readable storage medium
US9207977B2 (en) Systems and methods for task grouping on multi-processors
CN108364251B (en) Vector processor with general register resource management
KR101626378B1 (en) Apparatus and Method for parallel processing in consideration of degree of parallelism
US8387041B2 (en) Localized multi-element processor resource sharing among logical partitions
KR101155202B1 (en) Method for managing power for multi-core processor, recorded medium for performing method for managing power for multi-core processor and multi-core processor system for performing the same
KR20170116439A (en) Apparatus for scheduling task
KR101088563B1 (en) Method Of Controlling Multi-Core Processor, Apparatus For Controlling Multi-Core Processor, Multi-Core Processor, And Record Medium For Performing Method Of Controlling Multi-Core Processor
EP3631629A1 (en) Managing task dependency
KR101697647B1 (en) Apparatus and Method Managing Migration of Tasks among Cores Based On Scheduling Policy
KR20140140943A (en) Multicore system and job scheduling method thereof
KR20100074920A (en) Apparatus and method for load balancing in multi-core system
KR20110128023A (en) Multi-core processor, apparatus and method for task scheduling of multi-core processor
KR20170023280A (en) Multi-core system and Method for managing a shared cache in the same system
JP5810918B2 (en) Scheduling apparatus, scheduling method and program
CN113010309B (en) Cluster resource scheduling method, device, storage medium, equipment and program product
Jin et al. Preemption-aware kernel scheduling for gpus

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
LAPS Lapse due to unpaid annual fee