WO2013025081A1 - 단말 및 그 단말에서 어플리케이션 수행 방법 - Google Patents

단말 및 그 단말에서 어플리케이션 수행 방법 Download PDF

Info

Publication number
WO2013025081A1
WO2013025081A1 PCT/KR2012/006573 KR2012006573W WO2013025081A1 WO 2013025081 A1 WO2013025081 A1 WO 2013025081A1 KR 2012006573 W KR2012006573 W KR 2012006573W WO 2013025081 A1 WO2013025081 A1 WO 2013025081A1
Authority
WO
WIPO (PCT)
Prior art keywords
processing unit
application
processing
central processing
threshold
Prior art date
Application number
PCT/KR2012/006573
Other languages
English (en)
French (fr)
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 US14/237,475 priority Critical patent/US20140189708A1/en
Publication of WO2013025081A1 publication Critical patent/WO2013025081A1/ko

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • 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]
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/509Offload

Definitions

  • the present invention relates to a terminal and a method for executing an application in the terminal, the terminal comprising a central processing unit (hereinafter referred to as CPU, Central Processing Unit) and graphics processing unit (hereinafter referred to as GPU, Graphics Processing Unit) and the application in the terminal
  • CPU central processing unit
  • GPU graphics processing unit
  • the present invention relates to a method of executing an application by selecting a processing unit to be performed.
  • 3D graphics were introduced in earnest to give a game a three-dimensional effect, and various effects and texture expression techniques were gradually developed to make the screen more realistic. These tasks are expensive to process with only one central processing unit.
  • the Graphics Processing Unit a graphics processor dedicated to assisting the central processing unit, was developed.
  • the graphics processing unit is used as a device for graphics operations, but recently, the performance has been improved and developed to perform general operations. This is called General-Purpose computing on Graphics Processing Units (GPGPU). do.
  • General-purpose graphics processing apparatus is suitable for parallel programs due to its multi-core structure.
  • the central processing unit and the graphics processing unit may share the same memory depending on the structure, or may have a separate memory. That is, the central processing unit and the graphic processing unit may be configured in a structure connected by an external bus while owning each memory, or may share the same memory.
  • Qilin's Adaptive Mapping method is a method of allocating workload to the central processing unit and the graphics processing unit according to the stored application execution time according to the data size. This adaptive mapping method performs a training run on the central processing unit and the graphics processing unit before the application is actually executed.
  • Data Size is determined through Sampling, and the result of Training Run is stored in the database.
  • the processing unit checks a short processing time by referring to the execution time stored in the DB. The application task is assigned to the identified processing unit.
  • the method of selecting a processing unit to perform this using the application execution time stored in the database in advance requires updating the database through the training run.
  • the Training Run execution itself may act as an overhead of the system operation.
  • the central processing unit and the graphic processing unit may have different workloads depending on the operating conditions, which may cause the time stored in the database to be incorrect.
  • Qilin's Adaptive Mapping method considers only one program's execution speed. In this case, it does not consider the load balancing of the central processing unit / graphic processing unit. Therefore, the present invention proposes a method for executing an application by selecting a processing unit to be performed according to an application in the terminal and the terminal.
  • the application execution method of the present invention comprises the steps of: calculating an allocation index by using the weight of the application to be performed; Selecting a processing unit to execute the application from the central processing unit and the graphic processing unit through the allocation index; And executing the application in the selected processing device.
  • the process of selecting the processing device may include: checking a priority processing mode for selecting a processing device to which the application is to be allocated and a processing threshold value according to the priority processing mode; And selecting the processing apparatus by comparing the allocation index with the allocation index.
  • the process of selecting the processing unit is characterized in that the step of compiling the code of the application for processing in the central processing unit, if the allocation index is less than the processing threshold value.
  • the process of selecting the processing apparatus may include compiling the code of the application to be processed by the graphic processing apparatus when the allocation index is greater than or equal to the processing threshold.
  • the application execution terminal calculates an allocation index by using a storage unit for storing data and a weight of an application to be executed, and performs the application among a central processing unit and a graphic processing unit. And a graphics processing unit for executing an application through a binary transmitted from the central processing unit.
  • the central processing unit checks the priority processing mode and the processing threshold value according to the priority processing mode included in the workload control information table for selecting a processing device to which the application is to be allocated.
  • the processing apparatus may be selected by comparing the processing threshold with the allocation index.
  • the central processing unit is characterized in that to compile the code of the application for processing in the central processing unit.
  • the central processing unit compiles the code of the application for processing in the graphics processing unit.
  • the present invention it is determined whether the application execution is assigned to the central processing unit or the graphics processing unit according to the weight designated by the user. Therefore, the high degree of freedom for workload distribution can prevent the work load on only one processing unit. In addition, since there is no need to update the execution time of each application in the database, the overhead for this can be reduced.
  • FIG. 1 is a view showing the configuration of a terminal according to an embodiment of the present invention.
  • FIG. 2 is a diagram illustrating a workload adjustment information table according to an embodiment of the present invention.
  • FIG. 3 is a diagram illustrating the amount of work to which an application is allocated in the first priority mode according to an embodiment of the present invention.
  • FIG. 4 is a diagram illustrating an amount of work to which an application is allocated in a second priority mode according to an embodiment of the present invention.
  • FIG. 5 is a diagram illustrating an application execution method according to an embodiment of the present invention.
  • the terminal refers to an information processing device capable of generating data or processing data transmitted and received from the outside.
  • the terminal includes a computer, a notebook computer, a tablet PC, a mobile terminal, a smartphone, and the like, and includes at least two processing devices, that is, a central processing unit and a graphic processing unit.
  • the central processing unit (Central Processing Unit) is a word that means to process all the data in the center of the terminal literally, it functions to interpret the command input from the user, and then output the result.
  • the central role of the central processing unit is the computation / calculation task.
  • a graphics processing unit (graphics processing unit) is a device in charge of the graphics of the terminal, and mainly processes 3D graphics. Accordingly, the burden on the central processing unit may be reduced when a graphic related operation is performed in the terminal configured with the graphic processing unit.
  • the graphics processing apparatus can process a large amount of matrices and vectors, it is possible to perform applications that use these operations a lot.
  • a task is a unit that a terminal processes internally, and means an execution content that requires resources such as an input / output system program or a central processor in an application.
  • the application is divided into a number of tasks to effectively utilize the resources of the terminal.
  • Compiler or Compile refers to a program or process that converts an application written in a high-level language into a target application in a form that is semantically equivalent to that which can be executed immediately on a terminal. That is, in order for a specific application to be executed in the terminal, the terminal must be changed into a language that the terminal can directly understand. And the program that does this is the compiler.
  • Binary is a binary system consisting of only two numbers, 0 and 1, which means an executable file for executing an application. That is, the terminal compiles the corresponding application source code into the target code to execute the application selected by the user, and generates a binary for executing the corresponding application.
  • Workload refers to the amount of work being processed in the central processing unit and graphics processing unit.
  • FIG. 1 is a diagram illustrating a configuration of a terminal according to an embodiment of the present invention.
  • a terminal includes a central processing unit 110, a graphics processing unit 120, and a storage unit 130.
  • the central processing unit 110 performs a function of controlling the overall operation and state of the components constituting the terminal.
  • the central processing unit 110 is a device that processes all data in the center of the terminal as it is, and performs a function of interpreting and calculating a command input from a user and then outputting the result.
  • the most basic role of the central processing unit 110 is a calculation / calculation task. For example, when the user issues a command of 0 + 1, the CPU 110 may calculate this and output a result of 1.
  • the central processing unit 110 includes a central processing unit task queue 113, a graphics processing unit task queue 115, and a workload monitor.
  • the CPU task queue 113 may store task information of an application operating in the CPU 110 while the application is running.
  • the graphic processing unit task queue 115 may store task information of an application operating in the graphics processing unit 120 while the application is running.
  • the workload monitor 117 monitors the state of the graphics processing apparatus 120 and analyzes the workload of the graphics processing apparatus 120.
  • the central processing unit 110 selects a processing device to perform the application according to the set weight of the application, and performs the application in the processing device.
  • the processing apparatus refers to the central processing unit 110 and the graphics processing unit 120.
  • the CPU 110 inputs source code of the selected application.
  • the CPU 110 checks the weight information of the application corresponding to the input source code.
  • the weight information is confirmed with reference to the preset workload adjustment information table 135.
  • the workload adjustment information table 135 includes weight information about the corresponding application and is stored in the storage unit 130.
  • the CPU 110 calculates an allocation index by using the identified weight information.
  • the allocation index is calculated by the following equation (1).
  • X1, X2, X3, ..., Xn means the weight information included in the workload adjustment information table is a value that each set a condition (X) for the application to run.
  • ⁇ , ⁇ , ⁇ , ⁇ , ..., ⁇ means a weight for each condition.
  • the application index X1 currently running on the central processing unit is 0.4
  • the application index X2 currently running on the graphics processing unit is 0.3
  • the data size index X3 processing on the application to be operated is 0.8
  • the current workload of the graphics processing unit graphics Processing equipment usage
  • the index X4 is 0.5
  • the weight ⁇ of the X1 item is 0.2
  • the weight ⁇ of the X2 item is 0.2
  • the weight ⁇ of the X3 item is 0.5
  • the weight ⁇ of the X4 item is 0.1.
  • the allocation index is calculated to be 0.59 through Equation 1.
  • the allocation index calculated by this equation has a value from 0 to 1.
  • the CPU 110 may select a processing device to perform a corresponding application through the calculated allocation index. To this end, the central processing unit 110 checks the set priority mode.
  • the priority mode is a mode for selecting a processing threshold for determining whether the corresponding application is to be executed in the central processing unit or the graphics processing unit. Therefore, the priority processing mode is divided into at least two modes. Processing thresholds are set corresponding to each mode.
  • a processing threshold for determining which processing device is to be executed by the application varies.
  • the priority mode and the processing threshold value according to each priority mode are included in the workload adjustment information table 135.
  • the CPU 110 retrieves a processing threshold value according to the priority mode. Next, the CPU 110 determines whether the calculated allocation index is less than the identified processing threshold. If the allocation index is less than the processing threshold, the central processing unit 110 compiles the application source code into object code for processing in the central processing unit 110. On the other hand, if the allocation index is less than the processing threshold, the central processing unit 110 compiles the application mode into the object code for processing in the graphics processing unit 120. If the central processing unit 110 is an application that needs to be processed, the central processing unit 110 performs the corresponding application. On the other hand, if the application is to be processed in the graphics processing unit 120, the central processing unit 110 generates a binary corresponding to the application and delivers to the graphics processing unit 120.
  • the allocation index is calculated using the weights set in the application, and as the processing unit to perform the application is selected based on the calculated allocation index, the central processing unit 110 is the central processing unit 110 and the graphics processing unit ( The amount of work of 120) can be adjusted.
  • the graphic processing apparatus 120 performs a function of processing a graphic of the terminal. That is, the graphic processing unit 120 may perform graphic operations related to various data displayed on the display unit. In the present invention, the graphics processing unit 120 may perform a corresponding application through the binary transmitted from the central processing unit 110.
  • the storage unit 130 stores data generated according to the operation and state of the terminal.
  • the storage unit 130 stores the work amount adjustment information table 135.
  • the workload adjustment information table 135 includes several weights for the application.
  • the workload adjustment information table 135 may include a weight for the workload, a weight for the data size of the application, and a central processor when the application is processed in the CPU 110 or the graphics processor 120. Or a weight of an application task processed by the graphic processing apparatus 120.
  • the workload adjustment information table 135 includes a priority processing mode and a processing threshold for each mode.
  • the priority processing mode may be represented by an F mode and a T mode.
  • the processing threshold for each mode may be divided into a fairness threshold and a throughput threshold. If the priority processing mode is F mode, the processing threshold compared to the allocation index may be a fairness threshold. If the priority processing mode is T mode, the processing threshold compared to the allocation index is May be a throughput threshold.
  • the terminal may include an input unit for transmitting a command input from a user, a display unit for displaying data generated according to the operation and state of the terminal, and a communication unit for transmitting and receiving data from the outside, according to functions performed in the terminal.
  • an input unit for transmitting a command input from a user
  • a display unit for displaying data generated according to the operation and state of the terminal
  • a communication unit for transmitting and receiving data from the outside, according to functions performed in the terminal.
  • Various configurations may further be included.
  • FIG. 2 is a diagram illustrating a workload adjustment information table according to an embodiment of the present invention.
  • the workload adjustment information table 135 includes various weight information 210 for an application and information 215 for priority processing mode for selecting a processing device to which the application is assigned.
  • the weight information 210 refers to a value in which the condition X and the weight for executing the application are numerically set, respectively.
  • the condition (X) for the application to be executed includes a # of CPU task, # of a graphics processor task, a data size, a CPU workload, and a graphics processor workload.
  • the # of CPU task or # of graphic processor task represents a unit of processing for executing a corresponding application in the CPU or graphic processor.
  • the central processing unit workload and the graphics processing unit workload means the amount of work that is processed in the central processing unit and the graphics processing unit. At this time, an index is set for each condition.
  • weights are set for each condition. For example, as illustrated in FIG. 2, the weight of # of CPU task is 0.2, the weight of # of graphic task is 0.2, the weight of data size is 0.5, the weight of CPU is 0.0 and the amount of graphics processor is workload.
  • the weight of may be set to 0.1.
  • the index and weight corresponding to the condition set according to each condition may be added or deleted by the user according to the characteristics of the terminal and may be set by the terminal manufacturer. And the weight described for each condition is described in order to facilitate the description in the present invention, it is not limited thereto.
  • the information 215 regarding the priority processing mode is information about a mode for determining which processing device the application is to be performed.
  • the priority processing mode is a mode for selecting a preset processing threshold to determine whether the selected application is to be executed at the central processing unit or the graphics processing unit.
  • the priority processing mode may be classified into an F mode and a T mode.
  • the F mode is a mode for selecting a processing device in consideration of an application execution speed
  • the T mode is used to select a processing device in consideration of load balancing according to application execution. The mode to select.
  • the processing threshold may include at least two thresholds, which are referred to as fairness threshold and throughput threshold.
  • the fairness threshold is used in the F mode and is a threshold set according to the execution speed of the corresponding application.
  • the throughput threshold value is used in the T mode and is set in consideration of load balancing of the central processing unit and the graphics processing unit. Because the processing threshold is set separately according to the priority mode. Which processing device the application is to be executed may vary according to the priority mode. Therefore, the terminal may allocate the amount of work such that the amount of work processed by the CPU and the graphic processing device is the same level through the processing threshold.
  • FIG. 3 is a diagram illustrating the amount of work to which an application is allocated in the first priority mode according to an embodiment of the present invention.
  • FIG. 3 is a diagram illustrating the amount of work allocated to the central processing unit and the graphics processing unit when the priority mode is set to the F mode.
  • Setting the priority mode to the F mode means that the priority mode is set to a mode for adjusting the amount of work allocated to the central processing unit and the graphic processing unit based on the fairness threshold 310.
  • the fairness threshold 310 is a threshold set according to the execution speed of the corresponding application.
  • the amount of work processed by the graphic processing unit is greater than the amount of work processed by the central processing unit based on the fairness threshold 310 in the amount of work allocated to each CPU and the graphic processing unit.
  • the graphics processing unit is composed of multi-cores and processes assigned tasks in parallel, so the processing speed is high. Therefore, when the priority mode is set based on the fairness threshold 310, the amount of work may be allocated to the processing device that executes the application faster.
  • FIG. 4 is a diagram illustrating an amount of work to which an application is allocated in a second priority mode according to an embodiment of the present invention.
  • FIG. 4 is a diagram illustrating the amount of work allocated to the central processing unit and the graphics processing unit when the priority mode is set to the T mode.
  • Setting the priority mode to the T mode means that the priority mode is set to a mode for adjusting the amount of work allocated to the central processing unit and the graphic processing unit based on the throughput threshold value 410.
  • the throughput threshold 410 is a threshold set in consideration of load balancing of the central processing unit and the graphics processing unit.
  • the amount of work processed in the central processing unit is larger than the amount of work processed in the graphic processing unit based on the throughput threshold value 410. Since the central processing unit controls the state and operation of all the components constituting the terminal, the amount of work that can be processed is more than the graphic processing unit produced for graphics. Therefore, when the priority mode is set based on the throughput threshold value 410, a workload may be allocated to a processing device having a large workload for processing an application.
  • FIG. 5 is a diagram illustrating an application execution method according to an embodiment of the present invention.
  • the terminal checks the weight for the input application in step 515.
  • the weight is checked with reference to the preset workload adjustment information table.
  • the workload control information table contains several weights for the application.
  • the workload control information table may include a weight for the workload, a weight for the data size of the application, and an application unit processed by the CPU or the graphic processing unit when the application is processed in the CPU or the graphic processing unit. and the weight of the task.
  • the terminal calculates an allocation index by using the weight identified in step 520.
  • the allocation index calculated at this time has a value from 0 to 1.
  • the terminal checks the priority mode set in step 525.
  • the priority mode is a mode for selecting a processing threshold for determining whether the corresponding application is to be executed in the central processing unit or the graphics processing unit.
  • the processing threshold includes at least two thresholds, a fairness threshold and a throughput threshold.
  • a processing threshold value for determining which processing device is to be executed by the application varies. For example, if the priority processing mode divided into the F mode and the T mode is set to the F mode, the fairness threshold is selected as the processing threshold. On the other hand, if the priority processing mode is set to the T mode, the processing threshold is selected as the throughput threshold.
  • the terminal checks the processing threshold value according to the priority mode. The terminal determines whether the allocation index calculated in step 535 is less than the identified processing threshold. If the allocation index is less than the processing threshold, the terminal performs a compilation for processing in the central processing unit in step 540. That is, the terminal compiles the binary for the central processing unit of the application. On the other hand, if the allocation index is greater than or equal to the processing threshold, the terminal reads the binary for the graphics processing apparatus of the application in step 545. In this case, if the binary for the graphic processing apparatus is not generated, the binary is generated by compiling the object code for processing in the graphic processing apparatus. In step 550, the terminal executes the application in the processing apparatus. That is, the terminal processes the corresponding application in the central processing unit using the object code for processing in the central processing unit. Alternatively, the terminal processes the corresponding application in the graphic processing apparatus using the object code for processing in the graphic processing apparatus.
  • the workload can be allocated according to the situation of the central processing unit and the graphic processing unit.
  • the efficiency of the system is improved by assigning tasks to the other.

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)
  • Multi Processors (AREA)

Abstract

본 발명은 단말 및 그 단말에서 어플리케이션을 수행하는 방법에 관한 것으로, 수행될 어플리케이션의 코드가 입력되면, 상기 어플리케이션의 가중치를 확인하는 과정과, 상기 확인된 가중치를 이용하여 할당 지수를 산출하는 과정과, 상기 산출된 할당 지수를 통해 상기 중앙 처리 장치 및 상기 그래픽 처리 장치 중 상기 어플리케이션을 수행할 처리 장치를 선택하는 과정과, 상기 선택된 처리 장치에서 상기 어플리케이션을 수행하는 과정으로 구성된다. 따라서 사용자가 지정한 가중치에 따라 어플리케이션 수행이 중앙처리장치에 할당될지 그래픽처리장치에 할당될지가 결정된다. 이에 workload 분배에 대한 자유도가 높아서 한쪽 처리부에만 작업량이 쏠리는 현상이 방지될 수 있다.

Description

단말 및 그 단말에서 어플리케이션 수행 방법
본 발명은 단말 및 그 단말에서 어플리케이션을 수행하는 방법에 관한 것으로, 중앙처리장치 (이하 CPU, Central Processing Unit)과 그래픽 처리 장치 (이하 GPU, Graphics Processing Unit)를 포함하는 단말 및 그 단말에서 어플리케이션을 수행할 처리부를 선택하여 어플리케이션을 수행하는 방법에 관한 것이다.
1990년대 초기까지만 해도 컴퓨터와 같은 단말에 장착된 그래픽 카드는 단순히 중앙 처리 장치(이하 CPU, Central Processing Unit)의 연산 결과를 그림이나 글자 신호로 변환하여 화면으로 출력하는 어댑터(Adapter; 변환기)와 같은 부품으로 인식되었었다. 그러나 1990년대 중반 이후 단말의 멀티미디어 컨텐츠, 특히 게임이 주목받으며, 그래픽 카드의 역할도 점차 변하기 시작했다.
좀 더 상세히 설명하면, 게임에 입체감을 부여하기 위한 3D 그래픽이 본격적으로 도입되었고, 화면을 보다 현실적으로 만들기 위한 각종 효과 및 질감 표현 기법이 점차 발전해갔다. 이러한 작업들은 중앙처리장치 하나만으로 처리하기에는 그 작업량이 많다. 이에 중앙처리장치를 보조할 그래픽 전용 프로세서인 그래픽처리장치(Graphics Processing Unit)가 개발되었다.
그래픽처리장치는 그래픽스(Graphics) 연산을 위한 장치로 사용되지만, 최근에는 그 성능이 향상되어 일반연산까지 수행할 수 있도록 개발되었고 이를 범용 그래픽처리장치(General-Purpose computing on Graphics Processing Units; GPGPU)라 한다. 범용 그래픽처리장치는 멀티코어(multi-core)로 구성된 구조 특성상 병렬 프로그램에 적합하다. 일반적으로 중앙처리장치와 그래픽처리장치는 구조에 따라 동일한 메모리를 공유할 수도 있고, 각각의 메모리를 따로 가질 수도 있다. 즉 중앙처리장치와 그래픽처리장치는 각각의 메모리를 소유하면서 외부 BUS로 연결된 구조로 구성되거나, 동일한 메모리를 공유할 수 있다.
그래픽처리장치의 성능이 향상됨에 따라 중앙처리장치와 그래픽처리장치 간 작업량 할당 방법에 대하여 많은 연구가 되고 있다. 이중 Qilin의 Adaptive Mapping 방법은 데이터 크기(Data Size)에 따라 저장된 어플리케이션 수행 시간에 따라 중앙처리장치와 그래픽처리장치에 작업량을 할당하는 방식이 대표적으로 대두되고 있다. 이 Adaptive Mapping 방법은 어플리케이션이 실제로 수행되기 전에 중앙처리장치와 그래픽처리장치에서 각각 Training Run을 수행한다.
이때 데이터 크기(Data Size)는 Sampling을 통해 정해 지며, Training Run 수행 결과는 데이터베이스(Data Base)에 저장된다. 그리고 실제 어플리케이션이 수행될 때 DB에 저장된 수행 시간을 참조하여 어플리케이션 수행 시간이 짧은 처리부를 확인한다. 그리고 확인된 처리부에 해당 어플리케이션 업무이 할당된다.
그러나 데이터베이스에 미리 저장된 어플리케이션 수행 시간을 이용하여 이를 수행할 처리부를 선택하는 방법은 Training Run을 통해 데이터베이스 갱신이 필요하다. 이 경우 Training Run 실행 자체가 시스템 동작의 Overhead로 작용할 수 있다는 문제점이 있다. 또, Training Run을 실행할 때와 실제 프로그램이 동작할 때 환경이 다른 경우, 중앙처리장치와 그래픽처리장치는 동작 상황에 따라 workload가 달라지므로 데이터베이스에 저장된 시간이 맞지 않을 수 있다는 문제점이 발생한다. 그리고 Qilin의 Adaptive Mapping 방법은 1개 프로그램의 수행 속도만을 고려하였는데, 이를 경우 중앙처리장치/그래픽처리장치의 load Balancing은 고려하지 않아 한쪽의 처리 장치에서만 이를 처리할 수 있다는 문제점이 있다. 따라서 본 발명은 단말 및 그 단말에서 어플리케이션에 따라 수행할 처리부를 선택하여 어플리케이션을 수행 방법을 제안한다.
상기와 같은 문제점을 해결하기 위해 본 발명에서 어플리케이션 수행 방법은 수행될 어플리케이션의 가중치를 이용하여 할당 지수를 산출하는 단계; 상기 할당 지수를 통해 상기 중앙 처리 장치 및 상기 그래픽 처리 장치 중 상기 어플리케이션을 수행할 처리 장치를 선택하는 단계; 및 상기 선택된 처리 장치에서 상기 어플리케이션을 수행하는 단계를 포함하는 것을 특징으로 한다.
그리고 본 발명에서 상기 처리 장치를 선택하는 과정은 상기 어플리케이션이 할당될 처리 장치를 선택하기 위한 우선 순위 처리 모드 및 상기 우선 순위 처리 모드에 따른 처리 임계값을 확인하는 과정과, 상기 확인된 처리 임계값과 상기 할당 지수를 비교하여 상기 처리 장치를 선택하는 과정을 포함하는 것을 특징으로 한다.
또한 본 발명에서 상기 처리 장치를 선택하는 과정은 상기 할당 지수가 상기 처리 임계값 미만이면, 상기 어플리케이션의 코드를 상기 중앙 처리 장치에서 처리하기 위해 컴파일하는 과정을 포함하는 것을 특징으로 한다.
다음으로 본 발명에서 상기 처리 장치를 선택하는 과정은 상기 할당 지수가 상기 처리 임계값 이상이면, 상기 어플리케이션의 코드를 상기 그래픽 처리 장치에서 처리하기 위해 컴파일하는 과정을 포함하는 것을 특징으로 한다.
또한 상기와 같은 문제점을 해결하기 위해 본 발명에서 어플리케이션 수행 단말은 데이터를 저장하는 저장부와, 수행될 어플리케이션의 가중치를 이용하여 할당 지수를 산출하여, 중앙 처리 장치 및 그래픽 처리 장치 중 상기 어플리케이션을 수행할 처리 장치를 선택하는 중앙 처리 장치와, 상기 중앙 처리 장치로부터 전달되는 바이너리를 통해 어플리케이션을 수행하는 그래픽 처리 장치를 포함하는 것을 특징으로 한다.
이때 본 발명에서 상기 중앙 처리 장치는 상기 어플리케이션이 할당될 처리 장치를 선택하기 위한 상기 작업량 조절 정보 테이블에 포함된 우선 순위 처리 모드 및 상기 우선 순위 처리 모드에 따른 처리 임계값을 확인하고, 상기 확인된 처리 임계값과 상기 할당 지수를 비교하여 상기 처리 장치를 선택하는 것을 특징으로 한다.
그리고 본 발명에서 상기 상기 중앙 처리 장치는 상기 할당 지수가 상기 처리 임계값 미만이면, 상기 어플리케이션의 코드를 상기 중앙 처리 장치에서 처리하기 위해 컴파일하는 것을 특징으로 한다.
마지막으로 본 발명에서 상기 중앙 처리 장치는 상기 할당 지수가 상기 처리 임계값 이상이면, 상기 어플리케이션의 코드를 상기 그래픽 처리 장치에서 처리하기 위해 컴파일하는 것을 특징으로 한다.
본 발명에 따르면, 사용자가 지정한 가중치에 따라 어플리케이션 수행이 중앙처리장치에 할당될지 그래픽처리장치에 할당될지가 결정된다. 따라서 workload 분배에 대한 자유도가 높아서 한쪽 처리부에만 작업량이 쏠리는 현상이 방지될 수 있다. 또한 데이터베이스에 각 어플리케이션 수행 시간을 업데이트할 필요가 없으므로, 이에 대한 오버헤드(overhead)가 줄어들 수 있다.
도 1은 본 발명의 실시예에 따른 단말의 구성을 도시한 도면.
도 2는 본 발명의 실시예에 따른 작업량 조절 정보 테이블을 도시한 도면.
도 3은 본 발명의 실시예에 따른 제1 우선 순위 모드 시 어플리케이션이 할당되는 작업량을 도시한 도면.
도 4는 본 발명의 실시예에 따른 제2 우선 순위 모드 시 어플리케이션이 할당되는 작업량을 도시한 도면.
도 5는 본 발명의 실시예에 따른 어플리케이션 수행 방법을 도시한 도면.
단말는 데이터를 생성하거나, 외부로부터 송수신되는 데이터를 처리할 수 있는 정보 처리 기기를 의미한다. 여기서 단말은 컴퓨터, 노트북, 테블릿 PC, 휴대 단말, 스마트 폰 등이 포함되며, 적어도 두 개의 처리 장치 다시 말해, 중앙 처리 장치 및 그래픽 처리 장치를 포함한다.
중앙 처리 장치(중앙처리장치; Central Processing Unit)는 단어 그대로 단말의 중앙에서 모든 데이터를 처리하는 장치라는 의미로, 사용자로부터 입력된 명령어를 해석, 연산한 다음 그 결과를 출력하는 기능을 수행한다. 중앙처리장치의 가장 기본적인 역할은 연산/계산 작업이다.
그래픽 처리 장치(그래픽처리장치;Graphics Processing Unit)는 단말의 그래픽을 담당하는 장치로, 3D 그래픽을 주로 처리한다. 이에 그래픽처리장치가 함께 구성된 단말에서 그래픽과 관련된 연산이 수행될 때 중앙처리장치의 부담이 줄어들 수 있다. 또한 그래픽처리장치는 대량의 행렬과 벡터를 처리할 수 있으므로, 이러한 연산을 많이 사용하는 어플리케이션들을 수행할 수 있다.
태스크(task)는 단말이 내부에서 처리하는 단위로, 어플리케이션에서 입출력 시스템 프로그램 또는 중앙 처리기 등의 자원을 요구하는 실행 내용을 의미한다. 어플리케이션 수행시, 단말의 자원을 효과적으로 활용하기 위해 어플리케이션을 여러 개의 태스크로 구분한다.
컴파일러(Compiler) 또는 컴파일(Compile)은 고급 언어로 작성된 어플리케이션을 그와 의미적으로 동등하며, 단말에서 즉시 실행될 수 있는 형태의 목적 어플리케이션으로 바꾸어 주는 프로그램 또는 과정을 의미한다. 즉 단말에서 특정 어플리케이션이 수행되기 위해서 단말이 직접 이해할 수 있는 언어로 바꿔야 한다. 그리고 이러한 일을 하는 프로그램이 컴파일러이다.
컴파일을 하기 위해 입력되는 어플리케이션은 원시 어플리케이션이라 하고, 이 어플리케이션을 기술한 언어는 소스 코드(Source Code)라고 한다. 그리고 컴파일되어 출력되는 어플리케이션을 목적 어플리케이션이라 하고, 목적 어플리케이션을 기술한 언어가 목적 코드(Object Language 또는 Target Language)라 한다. 하나의 어플리케이션을 컴파일되어 목적 어플리케이션으로 변경되면, 원시 어플리케이션을 수정하지 않는 한 계속 반복해서 수행할 수 있다.
바이너리(Binary)는 0과 1의 두 숫자로만 이루어진 이진법으로, 어플리케이을 수행하기 위한 실행 파일을 의미한다. 즉 단말은 사용자에 의해 선택되는 어플리케이션을 수행하기 위해 해당 어플리케이션 소스 코드를 목적 코드로 컴파일링하고, 그리고 이를 통해 해당 어플리케이션을 수행하기 위한 바이너리를 생성한다.
워크로드(Workload)는 중앙처리장치 및 그래픽처리장치에서 처리되는 작업량을 의미한다.
이하 첨부된 도면을 참조하여 본 발명의 동작 원리를 상세히 설명한다. 하기에서 본 발명을 설명함에 있어 관련된 공지 기능 또는 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략할 것이다. 그리고 후술되는 용어들은 본 발명에서의 기능을 고려하여 정의된 용어들로서 이는 사용자, 운용자의 의도 또는 관례 등에 따라 달라질 수 있다. 그러므로 그 정의는 본 명세서 전반에 걸친 내용을 토대로 내려져야 할 것이다.
도 1은 본 발명의 실시예에 따른 단말의 구성을 도시한 도면이다.
도 1을 참조하면, 단말은 중앙 처리 장치(110), 그래픽 처리 장치(120), 저장부(130)로 구성된다.
중앙 처리 장치(중앙처리장치; Central Processing Unit)(110)는 단말을 구성하는 구성들의 전반적인 동작 및 상태를 제어하는 기능을 수행한다. 중앙처리장치(110)는 단어 그대로 단말의 중앙에서 모든 데이터를 처리하는 장치라는 의미로, 사용자로부터 입력된 명령어를 해석, 연산한 다음 그 결과를 출력하는 기능을 수행한다. 중앙처리장치(110)의 가장 기본적인 역할은 연산/계산 작업이다. 이를테면 사용자가 0+1이라는 명령을 내리면, 중앙처리장치(110)는 이를 계산하여 1이라는 결과를 출력할 수 있다.
중앙처리장치(110)는 중앙처리장치 Task queue(113), 그래픽처리장치 Task queue(115) 및 워크로드 모니터부를 포함한다. 중앙처리장치 Task queue(113)는 중앙처리장치(110)에서 동작하는 어플리케이션의 태스크 정보를 어플리케이션이 수행되는 동안 저장할 수 있다. 또한 그래픽처리장치 Task queue(115)는 그래픽 처리 장치(Graphics Processing Unit;그래픽처리장치)(120)에서 동작하는 어플리케이션의 태스크 정보를 어플리케이션이 수행되는 동안 저장할 수 있다. 다음으로 워크로드 모니터부(117)는 그래픽처리장치(120)의 상태를 모니터하며, 그래픽처리장치(120)의 워크로드를 분석한다.
본 발명에서 중앙처리장치(110)는 어플리케이션의 설정된 가중치에 따라 어플리케이션을 수행할 처리 장치를 선택하여, 해당 처리 장치에서 어플리케이션을 수행하도록 한다. 이때 처리 장치는 중앙처리장치(110)와 그래픽처리장치(120)를 의미한다.
좀 더 상세히 설명하면, 중앙처리장치(110)는 수행될 어플리케이션이 선택되면, 선택된 어플리케이션의 원시 코드를 입력한다. 다음으로 중앙처리장치(110)는 입력된 원시 코드에 대응되는 어플리케이션에 대한 가중치 정보를 확인한다. 여기서 가중치 정보는 미리 설정된 작업량 조절 정보 테이블(135)을 참조로 확인된다. 여기서 작업량 조절 정보 테이블(135)은 해당 어플리케이션에 대한 가중치 정보를 포함하며, 저장부(130)에 저장된다. 그리고 중앙처리장치(110)는 확인된 가중치 정보를 이용하여 할당 지수를 산출한다. 할당 지수는 다음과 같은 수학식 1에 의해 산출된다.
수학식 1
Figure PCTKR2012006573-appb-M000001
여기서 X1, X2, X3,..., Xn은 작업량 조정 정보 테이블에 포함된 가중치 정보는 어플리케이션이 수행되기 위한 조건(X)을 각각 수치로 설정한 값을 의미한다. 또한 α, β, γ, δ, ..., ω는 각 조건별 가중치를 의미한다.
예를 들어 중앙처리장치에서 현재 동작하는 어플리케이션 지수 X1이 0.4, 그래픽처리장치에서 현재 동작하는 어플리케이션 지수 X2가 0.3, 동작하려는 어플리케이션에서 처리하는 Data 크기 지수 X3가 0.8, 그래픽처리장치의 현재 Workload(그래픽처리장치 usage) 지수 X4가 0.5이며, X1 항목의 가중치 α가 0.2, X2 항목의 가중치 β가 0.2, X3 항목의 가중치 γ가 0.5, X4 항목의 가중치 δ가 0.1이라고 가정한다. 이러한 경우, 할당 지수는 수학식 1을 통해 0.59로 산출된다.
이와 같은 수학식에 의해 산출되는 할당 지수는 0 내지 1까지의 값을 갖는다. 이렇게 산출된 할당 지수를 통해 중앙처리장치(110)는 해당 어플리케이션을 수행할 처리 장치를 선택할 수 있다. 그러기 위해 중앙처리장치(110)는 설정된 우선 순위 모드를 확인한다.
우선 순위 모드는 해당 어플리케이션이 중앙 처리 장치에서 수행될 것인지, 그래픽 처리 장치에서 수행될 것인지를 판단하기 위한 처리 임계값을 선택하는 모드이다. 따라서 우선 순위 처리 모드는 적어도 두 개의 모드로 구분된다. 그리고 처리 임계값은 각각 모드별로 대응되어 설정된다.
이에 설정된 우선 순위 모드에 따라 어느 처리 장치에서 해당 어플리케이션이 수행될 것인지를 결정할 수 있는 처리 임계값이 달라진다. 그리고 우선 순위 모드 및 각 우선 순위 모드에 따른 처리 임계값은 작업량 조절 정보 테이블(135)에 포함되어 있다.
우선 순위 모드를 확인한 중앙처리장치(110)는 우선 순위 모드에 따른 처리 임계값을 불러온다. 다음으로 중앙처리장치(110)는 산출된 할당 지수가 확인된 처리 임계값 미만인지 판단한다. 만약 할당 지수가 처리 임계값 미만이면, 중앙처리장치(110)는 해당 어플리케이션 소스 코드를 중앙처리장치(110)에서 처리하기 위한 목적 코드로 컴파일한다. 반면에 할당 지수가 처리 임계값 미만이면, 중앙처리장치(110)는 해당 어플리케이션 모드를 그래픽처리장치(120)에서 처리하기 위한 목적 코드로 컴파일한다. 그리고 중앙처리장치(110)는 자신이 처리해야하는 어플리케이션이면, 해당 어플리케이션을 수행한다. 반면에 그래픽처리장치(120)에서 처리해야하는 어플리케이션이면, 중앙처리장치(110)는 해당 어플리케이션에 해당하는 바이너리를 생성하여 그래픽처리장치(120)로 전달한다.
이와 같이 어플리케이션에 설정된 가중치를 이용하여 할당 지수를 산출하고, 산출된 할당 지수를 통해 어플리케이션을 수행할 처리 장치가 선택됨에 따라, 중앙처리장치(110)는 중앙처리장치(110)와 그래픽처리장치(120)의 작업량을 조절할 수 있다.
그래픽처리장치(120)는 단말의 그래픽을 처리하는 기능을 수행한다. 즉 그래픽처리장치(120)는 표시부에 표시되는 각종 데이터들과 관련된 그래픽 연산을 수행할 수 있다. 본 발명에서 그래픽처리장치(120)는 중앙처리장치(110)로부터 전달되는 바이너리를 통해 해당 어플리케이션을 수행할 수 있다.
저장부(130)는 단말의 동작 및 상태에 따라 생성되는 데이터들을 저장한다. 여기서 저장부(130)는 작업량 조절 정보 테이블(135)을 저장한다. 작업량 조절 정보 테이블(135)은 해당 어플리케이션에 대한 여러 개의 가중치를 포함한다. 예를 들어 작업량 조절 정보 테이블(135)은 중앙처리장치(110) 또는 그래픽처리장치(120)에서 해당 어플리케이션이 처리될 때 작업량에 대한 가중치, 어플리케이션의 데이터 크기(size)에 대한 가중치, 중앙처리장치(110) 또는 그래픽처리장치(120)에서 처리되는 어플리케이션 단위(task)의 가중치 등을 포함한다.
작업량 조절 정보 테이블(135)은 우선 순위 처리 모드 및 모드별 처리 임계값을 포함한다. 우선 순위 처리 모드는 F 모드와 T 모드로 표현될 수 있다. 그리고 모드별 처리 임계값은 공정성(Fairness) 임계값과 처리량(Throughput) 임계값으로 구분될 수 있다. 만약 우선 순위 처리 모드가 F 모드인 경우, 할당 지수와 비교되는 처리 임계값은 공정성(Fairness) 임계값이 될 수 있으며, 우선 순위 처리 모드가 T 모드인 경우, 할당 지수와 비교되는 처리 임계값은 처리량(Throughput) 임계값이 될 수 있다.
도면에 도시되지 않았지만, 단말은 사용자로부터 입력되는 명령을 전달하는 입력부, 단말의 동작 및 상태에 따라 생성되는 데이터 등을 표시하는 표시부, 외부로부터 데이터를 송수신하는 통신부 등과 같이 단말에서 수행되는 기능에 따라 다양한 구성들을 더 포함할 수 있다.
도 2는 본 발명의 실시예에 따른 작업량 조절 정보 테이블을 도시한 도면이다.
도 2를 참조하면, 작업량 조절 정보 테이블(135)은 어플리케이션에 대한 다양한 가중치 정보(210) 및 어플리케이션이 할당될 처리 장치를 선택하기 위한 우선 순위 처리 모드에 대한 정보(215)를 포함한다.
가중치 정보(210)는 어플리케이션이 수행되기 위한 조건(X) 및 가중치를 각각 수치로 설정한 값을 의미한다. 어플리케이션이 수행되기 위한 조건(X)으로, # of 중앙처리장치 Task, # of 그래픽처리장치 Task, 데이터 크기(Data size), 중앙처리장치 작업량(Workload), 그래픽처리장치 작업량 등이 포함된다. # of 중앙처리장치 Task 또는 # of 그래픽처리장치 Task는 중앙처리장치 또는 그래픽처리장치에서에서 해당 어플리케이션을 수행하기 위해 처리하는 단위를 나타낸다. 그리고 중앙처리장치 작업량 및 그래픽처리장치 작업량은 중앙처리장치 및 그래픽처리장치에서 처리되는 작업량을 의미한다. 이때 각각의 조건에 지수가 설정된다.
가중치 정보(210)에 따르면, 각각의 조건에 대하여 가중치가 설정된다. 예를 들어 도 2에서 도시된 바와 같이 # of 중앙처리장치 Task의 가중치는 0.2, # of 그래픽처리장치 Task는 0.2, 데이터 크기의 가중치는 0.5, 중앙처리장치 작업량의 가중치는 0.0 및 그래픽처리장치 작업량의 가중치는 0.1로 설정될 수 있다. 각 조건에 따라 설정되는 조건에 해당하는 지수와 가중치는 단말의 특징에 따라 사용자에 의해 추가하거나 삭제할 수 있고, 단말 제조사에 의해 설정될 수 있다. 그리고 각 조건별로 기재되는 가중치는 본 발명에서 설명을 용이하게 하기 위해 기재된 것으로, 이에 한정되지 않는다.
또한 우선 순위 처리 모드에 대한 정보(215)는 해당 어플리케이션이 어느 처리 장치에서 수행될 것인지를 결정하기 위한 모드에 대한 정보이다. 다시 말해 우선 순위 처리 모드는 선택된 어플리케이션이 중앙 처리 장치에서 수행될 것인지, 그래픽 처리 장치에서 수행될 것인지를 판단하기 위해 미리 설정된 처리 임계값을 선택하는 모드이다. 여기서 우선 순위 처리 모드는 F 모드와 T모드로 구분될 수 있으며, F 모드는 어플리케이션 수행 속도를 고려하여 처리 장치를 선택하기 위한 모드이며, T 모드는 어플리케이션 수행에 따른 부하 분산을 고려하여 처리 장치를 선택하기 위한 모드이다.
우선 순위 처리 모드에 따라 처리 임계값은 적어도 두 개의 임계값을 포함할 수 있으며, 이 두 개의 임계값을 공정성(Fairness) 임계값과 처리량(Throughput) 임계값이라 칭한다. 공정성 임계값은 F 모드에서 사용되며, 해당 어플리케이션의 수행 속도에 따라 설정되는 임계값이다. 그리고 처리량 임계값은 T 모드에서 사용되며, 중앙처리장치와 그래픽처리장치의 부하 분산(load balancing)을 고려하여 설정되는 임계값이다. 우선 순위 모드에 따라 처리 임계값이 따로 설정되어있기 때문에. 우선 순위 모드 별로 어느 처리 장치에서 해당 어플리케이션이 수행될 것인지가 달라질 수 있다. 따라서 단말은 처리 임계값을 통해 중앙처리장치와 그래픽처리장치에서 처리되는 작업량이 동일한 수준이 되도록 작업량을 할당할 수 있다.
도 3은 본 발명의 실시예에 따른 제1 우선 순위 모드 시 어플리케이션이 할당되는 작업량을 도시한 도면이다. 좀 더 상세히, 도 3은 우선 순위 모드가 F 모드로 설정된 경우, 중앙처리장치와 그래픽처리장치에 할당되는 작업량을 도시한 도면이다.
우선 순위 모드가 F 모드로 설정되었다는 것은 공정성(Fairness) 임계값(310)을 기준으로 중앙처리장치와 그래픽처리장치에 할당되는 작업량을 조절하는 모드로 설정되었다는 것을 의미한다. 공정성 임계값(310)은 해당 어플리케이션의 수행 속도에 따라 설정되는 임계값이다.
도 3을 참조하면, 각 중앙처리장치와 그래픽처리장치에 할당되는 작업량에서 공정성 임계값(310)을 기준으로, 중앙처리장치에서 처리되는 작업량보다 그래픽처리장치에서 처리되는 작업량이 많다. 그래픽처리장치는 멀티 코어(Multi-core)로 구성되어 할당된 작업들을 병렬 방식으로 처리하므로, 그 처리 속도가 빠르다. 따라서 공정성 임계값(310)을 기준으로 우선 순위 모드가 설정된 경우, 어플리케이션을 수행하는 속도가 빠른 처리 장치에 작업량이 좀 더 할당될 수 있다.
도 4는 본 발명의 실시예에 따른 제2 우선 순위 모드 시 어플리케이션이 할당되는 작업량을 도시한 도면이다. 좀 더 상세히, 도 4는 우선 순위 모드가 T 모드로 설정된 경우, 중앙처리장치와 그래픽처리장치에 할당되는 작업량을 도시한 도면이다.
우선 순위 모드가 T 모드로 설정되었다는 것은 처리량(Throughput) 임계값(410)을 기준으로 중앙처리장치와 그래픽처리장치에 할당되는 작업량을 조절하는 모드로 설정되었다는 것을 의미한다. 처리량 임계값(410)은 중앙처리장치와 그래픽처리장치의 부하 분산(load balancing)을 고려하여 설정되는 임계값이다.
도 4에 도시된 각 중앙처리장치와 그래픽처리장치에 할당되는 작업량을 보면, 처리량 임계값(410)을 기준으로, 그래픽처리장치에서 처리되는 작업량보다 중앙처리장치에서 처리되는 작업량이 많다. 중앙처리장치는 단말을 구성하는 모든 구성들의 상태 및 동작을 제어하므로, 처리할 수 있는 작업량이 그래픽용으로 제작된 그래픽처리장치보다는 많다. 따라서 처리량 임계값(410)을 기준으로 우선 순위 모드가 설정된 경우, 어플리케이션을 처리하는 작업량이 많은 처리 장치에 작업량이 좀 더 할당될 수 있다.
도 5는 본 발명의 실시예에 따른 어플리케이션 수행 방법을 도시한 도면이다.
도 5를 참조하면, 단말은 510단계에서 수행될 어플리케이션에 대한 코드가 입력되면, 515단계에서 입력된 어플리케이션에 대한 가중치를 확인한다. 여기서 가중치는 미리 설정된 작업량 조절 정보 테이블을 참조로 확인된다. 작업량 조절 정보 테이블은 해당 어플리케이션에 대한 여러 개의 가중치를 포함한다. 예를 들어 작업량 조절 정보 테이블은 중앙처리장치 또는 그래픽처리장치에서 해당 어플리케이션이 처리될 때 작업량에 대한 가중치, 어플리케이션의 데이터 크기(size)에 대한 가중치, 중앙처리장치 또는 그래픽처리장치에서 처리되는 어플리케이션 단위(task)의 가중치 등을 포함한다.
다음으로 단말은 520단계에서 확인된 가중치를 이용하여 할당 지수를 산출한다. 이때 산출되는 할당 지수는 0 내지 1까지의 값을 갖는다. 그리고 단말은 525단계에서 설정된 우선 순위 모드를 확인한다.
우선 순위 모드는 해당 어플리케이션이 중앙 처리 장치에서 수행될 것인지, 그래픽 처리 장치에서 수행될 것인지를 판단하기 위한 처리 임계값을 선택하는 모드이다. 처리 임계값은 적어도 두 개의 임계값인 공정성(Fairness) 임계값과 처리량(Throughput) 임계값을 포함한다. 그리고 우선 순위 모드에 따라 어느 처리 장치에서 해당 어플리케이션이 수행될 것인지를 결정할 수 있는 처리 임계값이 달라진다. 예를 들어, F 모드와 T 모드로 구분되는 우선 순위 처리 모드가 F 모드로 설정되어 있다면, 처리 임계값으로 공정성 임계값이 선택된다. 반면에 우선 순위 처리 모드가 T모드로 설정되어 있다면, 처리 임계값으로 처리량(Throughput) 임계값으로 선택된다.
그리고 단말은 530단계에서 우선 순위 모드에 따른 처리 임계값을 확인한다. 단말은 535단계에서 산출된 할당 지수가 확인된 처리 임계값 미만인지 판단한다. 만약 할당 지수가 처리 임계값 미만이면, 단말은 540단계에서 중앙처리장치에서 처리하기 위한 컴파일을 수행한다. 즉 단말은 해당 어플리케이션의 중앙처리장치용 바이너리로 컴파일한다. 반면에 할당 지수가 처리 임계값 이상이면, 단말은 545단계에서 해당 어플리케이션의 그래픽처리장치용 바이너리를 읽어 온다. 이 때, 그래픽처리장치용 바이너리가 생성되어 있지 않다면 그래픽처리장치에서 처리하기 위한 목적 코드로 컴파일하여 바이너리를 생성한다. 그리고 단말은 550단계에서 해당 처리 장치에서 어플리케이션을 수행한다. 즉 단말은 중앙처리장치에서 처리하기 위한 목적 코드를 이용하여 해당 어플리케이션을 중앙처리장치에서 처리한다. 또는 단말은 그래픽처리장치에서 처리하기 위한 목적 코드를 이용하여 해당 어플리케이션을 그래픽처리장치에서 처리한다.
이러한 과정들을 통해 중앙처리장치와 그래픽처리장치의 상황에 따라 작업량 할당이 가능하다. 또한 중앙처리장치나 그래픽처리장치 중 어느 하나의 작업량이 증가하면, 나머지 하나에 업무가 할당됨으로써 시스템의 효율이 향상된다
한편 본 발명의 상세한 설명에서는 구체적인 실시예에 관해 설명하였으나, 본 발명의 범위에서 벗어나지 않는 한도 내에서 여러 가지 변형이 가능함은 물론이다. 그러므로 본 발명의 범위는 설명된 실시예에 국한되지 않으며, 후술되는 특허청구의 범위뿐만 아니라 이 특허청구의 범위와 균등한 것들에 의해 정해져야 한다.

Claims (16)

  1. 중앙 처리 장치 및 그래픽 처리 장치를 포함하는 단말의 어플리케이션 수행 방법에 있어서,
    수행될 어플리케이션의 가중치를 이용하여 할당 지수를 산출하는 단계;
    상기 할당 지수를 통해 상기 중앙 처리 장치 및 상기 그래픽 처리 장치 중 상기 어플리케이션을 수행할 처리 장치를 선택하는 단계; 및
    상기 선택된 처리 장치에서 상기 어플리케이션을 수행하는 단계를 포함하는 것을 특징으로 하는 어플리케이션 수행 방법.
  2. 제1항에 있어서, 상기 할당 지수를 산출하는 단계는,
    수행될 어플리케이션의 코드가 입력되면, 상기 어플리케이션의 가중치를 확인하는 단계; 및
    상기 확인된 가중치를 이용하여 할당 지수를 산출하는 단계를 포함하는 것을 특징으로 하는 어플리케이션 수행 방법.
  3. 제 2항에 있어서,
    상기 처리 장치를 선택하는 단계는
    상기 어플리케이션이 할당될 처리 장치를 선택하기 위한 우선 순위 처리 모드 및 상기 우선 순위 처리 모드에 따른 처리 임계값을 확인하는 단계; 및
    상기 확인된 처리 임계값과 상기 할당 지수를 비교하여 상기 처리 장치를 선택하는 단계를 포함하는 것을 특징으로 하는 어플리케이션 수행 방법.
  4. 제 3항에 있어서, 상기 처리 장치를 선택하는 단계는,
    상기 할당 지수가 상기 처리 임계값 미만인 경우, 상기 어플리케이션의 코드를 상기 중앙 처리 장치에서 처리하기 위해 컴파일하는 단계를 포함하는 것을 특징으로 하는 어플리케이션 수행 방법.
  5. 제 4항에 있어서, 상기 처리 장치를 선택하는 단계는,
    상기 할당 지수가 상기 처리 임계값 이상이면, 상기 어플리케이션의 코드를 상기 그래픽 처리 장치에서 처리하기 위해 컴파일하는 단계를 포함하는 것을 특징으로 하는 어플리케이션 수행 방법.
  6. 제 5항에 있어서, 상기 우선 순위 처리 모드는
    적어도 두 개의 모드를 포함하는 것을 특징으로 하는 어플리케이션 수행 방법.
  7. 제 6항에 있어서, 상기 처리 임계값은
    상기 적어도 두 개의 모드별로 각각 대응되어 설정되는 임계값임을 특징으로 하는 어플리케이션 수행 방법.
  8. 제 7항에 있어서, 상기 가중치는
    상기 중앙 처리 장치 또는 상기 그래픽 처리 장치에서 상기 어플리케이션을 수행하기 위해 처리하는 단위, 데이터 크기(Data size), 중앙 처리 장치 작업량, 또는 그래픽 처리 장치 작업량 중 적어도 하나에 설정되는 값임을 특징으로 하는 어플리케이션 수행 방법.
  9. 데이터를 저장하는 저장부;
    수행될 어플리케이션의 가중치를 이용하여 할당 지수를 산출하고, 중앙 처리 장치 및 그래픽 처리 장치 중 상기 어플리케이션을 수행할 처리 장치를 선택하는 중앙 처리 장치와,
    상기 중앙 처리 장치로부터 전달되는 바이너리를 통해 어플리케이션을 수행하는 그래픽 처리 장치를 포함하는 것을 특징으로 하는 어플리케이션 수행 단말.
  10. 제 9항에 있어서,
    상기 저장부는, 작업량 조절 정보 테이블을 저장하고,
    상기 중앙 처리 장치는, 수행될 어플리케이션의 코드가 입력되면, 상기 작업량 조절 정보 테이블에 저장된 상기 어플리케이션의 가중치를 확인하고, 상기 확인된 가중치를 이용하여 할당 지수를 산출하는 것을 특징으로 하는 어플리케이션 수행 단말.
  11. 제 10항에 있어서, 상기 중앙 처리 장치는
    상기 어플리케이션이 할당될 처리 장치를 선택하기 위한 상기 작업량 조절 정보 테이블에 포함된 우선 순위 처리 모드 및 상기 우선 순위 처리 모드에 따른 처리 임계값을 확인하고, 상기 확인된 처리 임계값과 상기 할당 지수를 비교하여 상기 처리 장치를 선택하는 것을 특징으로 하는 어플리케이션 수행 단말.
  12. 제 11항에 있어서, 상기 중앙 처리 장치는
    상기 할당 지수가 상기 처리 임계값 미만이면, 상기 어플리케이션의 코드를 상기 중앙 처리 장치에서 처리하기 위해 컴파일하는 것을 특징으로 하는 어플리케이션 수행 단말.
  13. 제 12항에 있어서, 상기 중앙 처리 장치는
    상기 할당 지수가 상기 처리 임계값 이상이면, 상기 어플리케이션의 코드를 상기 그래픽 처리 장치에서 처리하기 위해 컴파일하는 것을 특징으로 하는 어플리케이션 수행 단말.
  14. 제 13항에 있어서, 상기 우선 순위 처리 모드는
    적어도 두 개의 모드로 구분되는 것을 포함하는 것을 특징으로 하는 어플리케이션 수행 단말.
  15. 제 14항에 있어서, 상기 처리 임계값은
    상기 적어도 두 개의 모드별로 각각 대응되어 설정되는 임계값임을 특징으로 하는 어플리케이션 수행 단말.
  16. 제 15항에 있어서, 상기 가중치는
    상기 중앙 처리 장치 또는 상기 그래픽 처리 장치에서 상기 어플리케이션을 수행하기 위해 처리하는 단위, 데이터 크기(Data size), 중앙 처리 장치 작업량, 그래픽 처리 장치 작업량 중 적어도 하나에 설정되는 값임을 특징으로 하는 어플리케이션 수행 단말.
PCT/KR2012/006573 2011-08-17 2012-08-17 단말 및 그 단말에서 어플리케이션 수행 방법 WO2013025081A1 (ko)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US14/237,475 US20140189708A1 (en) 2011-08-17 2012-08-17 Terminal and method for executing application in same

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR10-2011-0081775 2011-08-17
KR1020110081775A KR20130019674A (ko) 2011-08-17 2011-08-17 단말 및 그 단말에서 어플리케이션 수행 방법

Publications (1)

Publication Number Publication Date
WO2013025081A1 true WO2013025081A1 (ko) 2013-02-21

Family

ID=47715281

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2012/006573 WO2013025081A1 (ko) 2011-08-17 2012-08-17 단말 및 그 단말에서 어플리케이션 수행 방법

Country Status (3)

Country Link
US (1) US20140189708A1 (ko)
KR (1) KR20130019674A (ko)
WO (1) WO2013025081A1 (ko)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140114501A (ko) 2013-03-14 2014-09-29 삼성전자주식회사 영상 데이터 처리 방법 및 이를 지원하는 전자 장치
KR101569093B1 (ko) 2013-08-13 2015-11-13 삼성에스디에스 주식회사 분산 시스템에서 데이터를 처리하는 방법
KR101649403B1 (ko) * 2014-04-25 2016-08-18 한양대학교 산학협력단 어플리케이션 로딩 장치 및 방법
US10542233B2 (en) * 2014-10-22 2020-01-21 Genetec Inc. System to dispatch video decoding to dedicated hardware resources
CN105808342B (zh) * 2014-12-30 2019-12-13 中国电信股份有限公司 用于分配客户请求的方法、判断装置和系统
CN104850461B (zh) * 2015-05-12 2018-05-11 华中科技大学 一种面向numa架构的虚拟cpu调度优化方法
JP6415405B2 (ja) * 2015-07-31 2018-10-31 本田技研工業株式会社 タスク制御システム
US10445850B2 (en) * 2015-08-26 2019-10-15 Intel Corporation Technologies for offloading network packet processing to a GPU
CN108268639B (zh) * 2018-01-18 2022-02-11 成都嗨翻屋科技有限公司 一种大数据环境下的指标计算方法
US11262831B2 (en) 2018-08-17 2022-03-01 Hewlett-Packard Development Company, L.P. Modifications of power allocations for graphical processing units based on usage
KR200492285Y1 (ko) 2019-01-23 2020-09-10 강석현 조립식 개구부 덮개
US11474824B1 (en) * 2020-05-08 2022-10-18 Corel Corporation Performance benchmarking-based selection of processor for generating graphic primitives

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005098579A2 (en) * 2004-03-30 2005-10-20 Intel Corporation Managing power consumption by requesting an adjustment to an operating point of a processor
US20060221086A1 (en) * 2003-08-18 2006-10-05 Nvidia Corporation Adaptive load balancing in a multi-processor graphics processing system
JP2008071261A (ja) * 2006-09-15 2008-03-27 Toshiba Corp 画像処理システム及び画像処理方法
KR20090129355A (ko) * 2008-06-11 2009-12-16 인텔 코오퍼레이션 성능 할당 방법 및 장치

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8180922B2 (en) * 2003-11-14 2012-05-15 Cisco Technology, Inc. Load balancing mechanism using resource availability profiles
US7466316B1 (en) * 2004-12-14 2008-12-16 Nvidia Corporation Apparatus, system, and method for distributing work to integrated heterogeneous processors
KR101467558B1 (ko) * 2007-07-26 2014-12-01 엘지전자 주식회사 그래픽데이터 처리 장치 및 방법
US20090172693A1 (en) * 2007-12-31 2009-07-02 Nortel Networks Limited Assigning work to a processing entity according to non-linear representations of loadings
US8830245B2 (en) * 2010-12-14 2014-09-09 Amazon Technologies, Inc. Load balancing between general purpose processors and graphics processors

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060221086A1 (en) * 2003-08-18 2006-10-05 Nvidia Corporation Adaptive load balancing in a multi-processor graphics processing system
WO2005098579A2 (en) * 2004-03-30 2005-10-20 Intel Corporation Managing power consumption by requesting an adjustment to an operating point of a processor
JP2008071261A (ja) * 2006-09-15 2008-03-27 Toshiba Corp 画像処理システム及び画像処理方法
KR20090129355A (ko) * 2008-06-11 2009-12-16 인텔 코오퍼레이션 성능 할당 방법 및 장치

Also Published As

Publication number Publication date
KR20130019674A (ko) 2013-02-27
US20140189708A1 (en) 2014-07-03

Similar Documents

Publication Publication Date Title
WO2013025081A1 (ko) 단말 및 그 단말에서 어플리케이션 수행 방법
US7568189B2 (en) Code translation and pipeline optimization
KR101900172B1 (ko) 가상화 환경에서의 지능형 gpu 스케줄링
Yang et al. Hybrid CUDA, OpenMP, and MPI parallel programming on multicore GPU clusters
US8219722B2 (en) DMA and graphics interface emulation
Aji et al. MPI-ACC: An integrated and extensible approach to data movement in accelerator-based systems
US9201823B2 (en) Pessimistic interrupt affinity for devices
EP3108376A1 (en) Workload batch submission mechanism for graphics processing unit
WO2014142498A1 (ko) 컴퓨팅 스케줄링 방법 및 시스템
CN111966504B (zh) 图形处理器中的任务处理方法及相关设备
US20190286479A1 (en) Intelligent gpu scheduling in a virtualization environment
WO2012011644A1 (ko) 중앙 처리 장치, 그것의 gpu 시뮬레이션 방법 그리고 그것을 포함하는 컴퓨팅 시스템
KR20130021172A (ko) 단말 및 그 단말에서 어플리케이션 수행 방법
US20220164216A1 (en) VIRTUALIZING HARDWARE COMPONENTS THAT IMPLEMENT Al APPLICATIONS
JP2021034023A (ja) アクセラレータにおいてヘテロジニアスコンポーネントを設定する方法及び装置
WO2021095943A1 (ko) 서비스 프로파일을 고려한 컨테이너의 배치 방법
WO2012015083A1 (ko) Rtos 기반의 안드로이드 어플리케이션 실행 장치
WO2015023106A1 (en) Apparatus and method for processing image
EP3869417B1 (en) Processor memory optimization method and apparatus oriented toward deep learning training task
WO2013115561A1 (ko) 데이터 처리 시스템 및 그 시스템에서 데이터 시뮬레이션 방법
WO2016195225A1 (ko) Gpgpu 어플리케이션을 위한 dvfs 기법이 적용된 모바일 디바이스
US8713545B2 (en) Architecture for accelerated computer processing
US8621425B1 (en) Generating code based at least on one or more output arguments designated as not being present
CN110033406A (zh) 用于处理图像的方法和装置
WO2016003126A1 (ko) 압축 가속 장치 및 이에 적용되는 압축 가속기

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12823692

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 14237475

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12823692

Country of ref document: EP

Kind code of ref document: A1