WO2013154365A1 - 단말기에서 태스크 스케줄링을 수행하는 방법 및 장치 - Google Patents

단말기에서 태스크 스케줄링을 수행하는 방법 및 장치 Download PDF

Info

Publication number
WO2013154365A1
WO2013154365A1 PCT/KR2013/003044 KR2013003044W WO2013154365A1 WO 2013154365 A1 WO2013154365 A1 WO 2013154365A1 KR 2013003044 W KR2013003044 W KR 2013003044W WO 2013154365 A1 WO2013154365 A1 WO 2013154365A1
Authority
WO
WIPO (PCT)
Prior art keywords
execution time
task
tasks
change
amount
Prior art date
Application number
PCT/KR2013/003044
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/391,860 priority Critical patent/US10162671B2/en
Publication of WO2013154365A1 publication Critical patent/WO2013154365A1/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3419Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment by assessing time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3433Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment for load management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/865Monitoring of software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5019Workload prediction
    • 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]

Definitions

  • the present invention proposes a method and apparatus for performing task scheduling in a terminal.
  • each task is performed in a heterogeneous core (Central Processing Unit (CPU), Graphic Processor Unit (GPU), and Digital Signal Processor (DSP)).
  • CPU Central Processing Unit
  • GPU Graphic Processor Unit
  • DSP Digital Signal Processor
  • the time at which is performed should be taken into account.
  • a method of continuously monitoring the execution time of all tasks may be considered, but there is a problem in that overhead occurs.
  • a training run method is used to measure the execution time of a task in a heterogeneous multi-core structure environment.
  • the training execution method is a method of operating a program in a CPU and a GPU to store a corresponding execution time in a database, and then assign a program with reference to the execution time stored in the database during scheduling.
  • the present invention proposes a method and apparatus for performing task scheduling in a terminal.
  • the present invention proposes a method and apparatus for enabling a terminal to more effectively measure the performance of a multi task in a heterogeneous multi-core environment.
  • the present invention proposes a method and apparatus for minimizing the overhead of performance measurement in a terminal.
  • a method for performing task scheduling in a terminal including at least two cores having different types comprising: determining whether a task state change occurs in response to at least one of the at least two cores, and the task state When a change occurs, determining a change amount of execution time for each of the plurality of tasks that are executed for the at least one core, and using the determined change amount, the plurality of tasks according to the task state change Estimating execution time for each of the at least one processor and performing task scheduling on the at least one core based on the estimated execution time.
  • a terminal including at least two cores having different types comprising: a task state monitor that determines whether a task state change occurs in response to at least one of the at least two cores, and when the task state change occurs, The amount of change in execution time for each of the plurality of tasks that are executed for the at least one core is determined, and the execution time for each of the plurality of tasks according to the task state change is predicted using the determined change amount. And a performance profiler for performing task scheduling on the at least one core based on the estimated execution time.
  • the present invention has the effect that the terminal can more effectively measure the performance of the multi-task in a heterogeneous multi-core environment.
  • the present invention can minimize the overhead according to the performance measurement in the terminal, and even if a large number of tasks are executed at the same time, there is an advantage that the task scheduling can be performed more effectively through performance prediction.
  • 1 is a diagram illustrating a method for measuring performance for task scheduling in a terminal
  • FIG. 2 is a block diagram of a terminal according to an embodiment of the present invention.
  • FIG. 3 is a diagram illustrating a database updated according to a performance measure for task scheduling in a terminal according to an embodiment of the present invention
  • FIG. 4 is a diagram illustrating information stored in a database used for performance prediction for task scheduling according to an embodiment of the present invention
  • FIG. 5 is a flowchart illustrating a performance measurement and prediction process for task scheduling in a terminal according to an embodiment of the present invention.
  • An embodiment of the present invention proposes a method and apparatus for performing task scheduling in a terminal. Specifically, in an embodiment of the present invention, it is determined whether a task state change occurs in response to at least one of the at least two cores in a terminal including at least two cores having different types. If so, determine the amount of change in execution time for each of the plurality of tasks that are executing for the at least one core, and use the determined amount of change to perform each of the plurality of tasks in accordance with the task state change. A method and apparatus for estimating time and performing task scheduling on the at least one core based on the estimated execution time are proposed.
  • heterogeneous cores At least two cores having different types may be generally referred to as heterogeneous cores.
  • An embodiment of the present invention will be described as an example in which the heterogeneous core includes a central processing unit (CPU) and a graphic processor unit (GPU).
  • the heterogeneous core may additionally include other types of cores such as a digital signal processor (DSP), ARM, X86, X64, and the like.
  • DSP digital signal processor
  • ARM X86
  • X64 X64
  • the terminal may be a device such as a mobile phone, a personal computer (PC), a tablet PC, or the like including a heterogeneous multi-core architecture.
  • the performance measurement is performed based on the operation of measuring the task execution time.
  • terms of a task and a program may be used interchangeably.
  • 1 is a diagram illustrating a performance measurement method for task scheduling in a terminal.
  • the terminal measures the performance of each core included in heterogeneous cores in order to perform task scheduling, and allocates additional tasks to the corresponding cores according to the measurement result. Since the performance measurement is performed based on task execution time, information on task execution time on heterogeneous cores should be obtained during scheduling. To this end, the terminal generally performs the following operations.
  • the terminal performs a training run method before performing the task scheduling. That is, the terminal executes a program on a heterogeneous core and stores the execution time in a database in advance. For example, as shown in FIG. 1A, the terminal executes a program included in each of the CPU and the GPU before performing the task scheduling, and stores a task execution time according to the execution of the program in a database.
  • the terminal performs the actual scheduling, the terminal allocates a task to each of the CPU and the GPU based on a task execution time for each of the CPU and the GPU stored in the database.
  • a case where a plurality of tasks are executed in each of the CPU and the GPU may occur at the time when the actually allocated task is executed. Since the task execution time stored in the database is stored in consideration of a single task environment, the task execution time stored in the database does not match the actual task execution time. Therefore, it is not preferable that the task execution time stored in the database is used in the multi task environment as shown in FIG.
  • a method of periodically measuring and storing a task execution time for all programs executed in each of the CPU and the GPU (hereinafter, referred to as a continuous profiling method) may be considered.
  • a continuous profiling method when used, as the number of programs to be executed increases, the overhead of measuring and storing task execution time increases.
  • it is difficult to detect a state change for all programs it is difficult to accurately determine the measurement cycle for the task execution time.
  • an embodiment of the present invention proposes a method and apparatus for efficiently performing task scheduling in consideration of the case that a plurality of programs are executed simultaneously in a heterogeneous multi-core architecture environment.
  • FIG. 2 is a block diagram of a terminal according to an embodiment of the present invention.
  • the terminal includes a performance profiler 200, a task manager 202, a task status monitor 204, a database 206, and heterogeneous cores. (Eg, CPU and GPU) 208.
  • the performance profiler 200 measures task execution time of each of the CPU and GPU, and stores information about the measured task execution time in the database 206.
  • the task manager 202 is present in the kernel, and performs a task of creating, deleting, and changing a task (eg, changing a problem value).
  • the task status monitor 204 monitors the task manager 202 to determine a state change such as creation, deletion, and change of a task.
  • the database 206 stores the information 210 about the state according to the instruction of the performance profiler 200 when the task state monitor 204 determines the change of the state of the task. Specifically, the database 206 stores the information as shown in Table 1 below. In Table 1 below, Cost represents a task execution time according to program execution.
  • the terminal may include a scheduler, and the scheduler may include the performance profiler 200, the task manager 202, the task status monitor 204, the database 206, and heterogeneous types. Task scheduling is performed according to an operation result of the core 208.
  • FIG. 3 is a diagram illustrating a database updated according to a performance measure for task scheduling in a terminal according to an exemplary embodiment of the present invention.
  • the embodiment of the present invention monitors the task state and performs the performance measurement only when a change in the task state occurs, thereby reducing overhead due to the performance measurement. Accordingly, an embodiment of the present invention will be described with reference to the configuration of FIG. 2 described above.
  • the task status monitor 204 monitors the task manager 202 to determine whether a state change such as creation, deletion, and change of a task has occurred. For example, when the first CPU task and the first GPU task are generated, the task state monitor 204 determines that a change in the state of the task has occurred and requests the performance profiler 200 to perform performance measurement.
  • a state change such as creation, deletion, and change of a task has occurred. For example, when the first CPU task and the first GPU task are generated, the task state monitor 204 determines that a change in the state of the task has occurred and requests the performance profiler 200 to perform performance measurement.
  • the performance profiler 200 measures a task execution time for each of the first CPU task and the first GPU task, and stores the measurement result as the performance history in the database 206.
  • the performance history stored in the database 206 is as shown in the performance history 1 (310) of FIG.
  • the database 206 when performing the initial performance measurement, stores the task execution time for each of the first CPU task and the first GPU task as CPU Cost and GPU Cost, respectively.
  • the state change value stores an initial state change value (for example, “0”) for each of the first CPU task and the first GPU task.
  • the performance profiler 200 determines the first CPU task and the first CPU task. Measure the execution time for each 2CPU task. The performance profiler 200 updates the CPU cost of the first CPU task included in the performance history 1 310 to the measured execution time of the first CPU task. In addition, the performance profiler 200 stores the difference between the updated CPU cost and the CPU Base Cost as a CPU state change value. That is, the performance profiler 200 determines the difference between the cost when the first CPU task operates in the CPU singly and the cost when the first CPU task simultaneously operates with the second CPU task. Save as. Performance history according to such an operation is as shown in Performance history 2 (320) of FIG.
  • the value of the GPU cost and the value of the GPU state change are determined by the performance history.
  • the value contained in 1 (310) remains the same.
  • the performance profiler 200 sets a total cost (ie, total CPU cost) for all CPU tasks.
  • the performance profiler 200 performs the first GPU task and the first task. Measure the execution time for each 2GPU task.
  • the performance profiler 200 updates the GPU cost for the first GPU task included in the performance history 2 320 with the measured execution time of the first GPU task.
  • the performance profiler 200 stores the difference between the updated GPU cost and the GPU Base Cost as a GPU state change value. That is, the performance profiler 200 determines the difference between the cost when the first GPU task operates in the GPU and the cost when the first GPU task operates simultaneously with the second GPU task. Save as. Performance history according to such an operation is as shown in Performance history 3 (330) of FIG.
  • the value of the CPU cost for the first CPU task and The CPU state change value is maintained as it is contained in the performance history 2 (320).
  • the performance history and total CPU cost for the second CPU task are also maintained without change.
  • a performance history for the second GPU task is newly generated. Therefore, when the performance history for the first GPU is updated, and the performance history for the second GPU task is generated, the performance profiler 200 sets a total cost (ie, total GPU cost) for all GPU tasks. do.
  • the task information 340 is also updated. That is, whenever the CPU Cost and the GPU Cost are updated, the current CPU Cost and the current GPU Cost values in the Task Information 340 are updated.
  • the CPU Base change amount and the GPU Base change amount are updated to an average value of the CPU state change value and the GPU state change value included in each performance history when a predetermined number of performance history update processes are performed.
  • the CPU Base change amount and the GPU Base change amount are determined as the average value of 10 CPU state change values and the average value of the 10 GPU state change values, respectively.
  • the 10 CPU Base change amounts according to the performance history updated 10 times and The average value of each GPU base change amount is determined as the CPU Base change amount and the GPU Base change amount included in the task information 340.
  • Steps (1) to (5) are repeatedly performed until a predetermined number of CPU state change values and GPU state change values for finally determining the CPU Base change amount and the GPU Base change amount are obtained.
  • the overhead of measuring and storing the task execution time can be reduced, but when the number of tasks is increased, a lot of time is required for performance measurement. .
  • an embodiment of the present invention proposes a method of predicting performance by using a CPU base change amount and a GPU base change amount of the task information.
  • this method is used, the actual performance measurement process does not need to be performed, thereby minimizing overhead and saving time for performance measurement.
  • the CPU / GPU prediction cost proposed in the embodiment of the present invention is determined using Equation 1 below.
  • a prediction cost represents a prediction cost for a CPU task or a GPU task
  • a base cost represents a CPU base cost or a GPU base cost
  • a base cost change amount for the total cost is a CPU base change amount or a GPU base change amount.
  • the cost for the CPU or GPU task is predicted based on the base cost and the base change amount.
  • the performance prediction process is performed when the amount of change in CPU Base or amount of change in GPU Base included in Task Information is determined by the updated performance history by a preset number of times.
  • the performance prediction process proposed in the embodiment of the present invention is performed in two ways: when the task is running and when the task is restarted.
  • the terminal determines whether a new task is created.
  • the terminal stores the cost of the new task and updates the total cost of the existing task in consideration of the cost of the new task.
  • the terminal determines a prediction cost for the existing task based on the updated total cost and base variation. Meanwhile, when the task is restarted, the terminal determines the prediction cost based on the total cost and the base variation amount previously stored.
  • FIG. 4 is a diagram illustrating information stored in a database used for performance prediction for task scheduling according to an embodiment of the present invention.
  • the terminal performs the following operation.
  • the terminal uses the CPU base variation amount and the GPU base variation amount corresponding to each of the first CPU and the first GPU task, when the first CPU and the first CPU task are performed simultaneously with the generated second and second GPU tasks. Predict the current CPU Cost and the current GPU Cost for the first CPU and the first GPU task. This will be described in detail as follows.
  • the terminal calculates a current CPU cost by using a change amount of the CPU Base for the first CPU task and the cost of the generated second CPU task (that is, the cost of the second CPU task measured while the first CPU task is running). Predict. For example, the amount of change in the CPU base for the first CPU task is increased by 10 every CPU Cost 10, and since the cost of the second CPU task is 200, the terminal may execute the first CPU task concurrently with the second CPU task. For a while (i.e. for 200 Cost), we can predict that the current CPU Cost value will be 300, from 100 to 200.
  • the terminal predicts a current GPU cost by using a GPU base variation amount for the first GPU task and a cost of the generated second GPU task. For example, the amount of change in the GPU base for the first GPU task is increased by 5 for every GPU cost 10, and the cost of the second GPU task (that is, the measured value of the second GPU task measured while the first GPU task is running). Cost) is 100, the terminal may predict that the current GPU Cost value is increased from 50 to 50 while the first GPU task is executed concurrently with the second GPU task (ie, during 100 Cost).
  • the task information is updated as shown in FIG. 4 (b) based on the predicted current CPU cost and current GPU cost.
  • the updated current CPU Cost (300) and the current GPU Cost (100), the Base Cost (200) of the second CPU task and the Base Cost (100) of the second GPU task are summed up, respectively, Total CPU Cost and Total.
  • GPU Cost is updated to 500 and 200, respectively.
  • the terminal may perform overhead scheduling and efficiently perform task scheduling through a performance prediction process.
  • FIG. 5 is a flowchart illustrating a performance measurement and prediction process for task scheduling in a terminal according to an embodiment of the present invention.
  • the terminal detects a task state change in step 500 and determines whether there is a CPU base cost change amount and a GPU base cost change amount determined by a performance history updated by a preset number of times in step 502.
  • step 504 the terminal measures the execution time for the CPU and GPU tasks, and updates the performance history in step 506 to include the execution time for the measured CPU and GPU tasks.
  • step 508 the terminal updates Total CPU Cost and Total GPU Cost based on the updated performance history.
  • step 510 the terminal sets (updates) the CPU Base change amount and the GPU Base change amount using the updated Total CPU Cost and Total GPU Cost.
  • Steps 504 to 510 are repeatedly performed until the performance history is updated a predetermined number of times.
  • the terminal performs performance prediction for the CPU and the GPU by using the method described with reference to FIG. 4 using the information included in the performance history.
  • the terminal performs performance prediction for the CPU and GPU in step 512.
  • the terminal updates the total CPU cost and the total GPU cost in step 514 based on the estimated CPU and GPU costs.
  • the terminal determines performance of each of the CPU and GPU based on Total CPU Cost and Total GPU Cost, and performs task scheduling according to the performance of each of the determined CPU and GPU. To perform.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

본 발명은 서로 다른 타입을 갖는 적어도 두 개의 코어를 포함하는 단말기가 상기 적어도 두 개의 코어 중 적어도 하나에 대응하여 태스크 상태 변화가 발생하는지 여부를 판단하고, 상기 태스크 상태 변화가 발생한 경우, 상기 적어도 하나의 코어에 대해 실행 중인 다수의 태스크들 각각에 대한 수행 시간의 변화량을 판단하고, 상기 판단된 변화량을 사용하여, 상기 태스크 상태 변화에 따른 상기 다수의 태스크들 각각에 대한 수행 시간을 예측하고, 상기 예측된 수행 시간을 근거로 상기 적어도 하나의 코어에 대한 태스크 스케줄링을 수행한다.

Description

단말기에서 태스크 스케줄링을 수행하는 방법 및 장치
본 발명은 단말기에서 태스크 스케줄링을 수행하는 방법 및 장치를 제안한다.
이기종 멀티 코어 구조(Heterogeneous Multi-core Architecture) 환경에서 효율적인 스케줄링을 수행하기 위해서는 이기종 코어(CPU(Central Processing Unit), GPU(Graphic Processor Unit) 및 DSP(Digital Signal Processor) 등)에서 각 태스크(task)가 수행되는 시간이 고려되어야 한다. 하지만 상기 이기종 멀티 코어 환경에서는 실제 태스크의 동작을 감시하는 방법 외에는 해당 태스크에 대한 수행 시간을 측정할 수 있는 방법이 없다. 물론 모든 태스크의 수행 시간을 계속적으로 감시하는 방법이 고려될 수 있겠지만, 이 경우 오버헤드(overhead)가 발생하는 문제가 있다.
이러한 문제를 해결하기 위해, 종래의 이기종 멀티 코어 구조 환경에서는 태스크의 수행 시간을 측정하기 위하여 트레이닝 실행(Training Run) 방식이 사용되고 있다. 상기 트레이닝 실행 방식은 일 예로, CPU와 GPU에서 각각 프로그램을 동작시켜 해당 수행 시간을 데이터 베이스에 저장해 놓고, 이후 스케줄링시 상기 데이터 베이스에 저장된 수행 시간을 참조하여 프로그램을 할당하는 방식이다.
하지만 상기 트레이닝 실행 방식은 단지 단일 태스크 환경만을 고려한 방식이므로, 멀티 태스크 환경에서 적응적으로 사용될 수 없는 문제가 있다.
본 발명은 단말기에서 태스크 스케줄링을 수행하는 방법 및 장치를 제안한다.
그리고, 본 발명은 이기종 멀티 코어 환경에서 단말기가 멀티 태스크에 대한 성능을 보다 효과적으로 측정할 수 있도록 하는 방법 및 장치를 제안한다.
또한, 본 발명은 단말기에서 성능 측정에 따른 오버헤드를 최소화하도록 하는 방법 및 장치를 제안한다.
본 발명에서 제안하는 방법은; 서로 다른 타입을 갖는 적어도 두 개의 코어를 포함하는 단말기에서 태스크 스케줄링을 수행하는 방법에 있어서, 상기 적어도 두 개의 코어 중 적어도 하나에 대응하여 태스크 상태 변화가 발생하는지 여부를 판단하는 과정과, 상기 태스크 상태 변화가 발생한 경우, 상기 적어도 하나의 코어에 대해 실행 중인 다수의 태스크들 각각에 대한 수행 시간의 변화량을 판단하는 과정과, 상기 판단된 변화량을 사용하여, 상기 태스크 상태 변화에 따른 상기 다수의 태스크들 각각에 대한 수행 시간을 예측하는 과정과, 상기 예측된 수행 시간을 근거로 상기 적어도 하나의 코어에 대한 태스크 스케줄링을 수행하는 과정을 포함한다.
본 발명에서 제안하는 장치는; 서로 다른 타입을 갖는 적어도 두 개의 코어를 포함하는 단말기에 있어서, 상기 적어도 두 개의 코어 중 적어도 하나에 대응하여 태스크 상태 변화가 발생하는지 여부를 판단하는 태스크 상태 모니터와, 상기 태스크 상태 변화가 발생한 경우, 상기 적어도 하나의 코어에 대해 실행 중인 다수의 태스크들 각각에 대한 수행 시간의 변화량을 판단하고, 상기 판단된 변화량을 사용하여, 상기 태스크 상태 변화에 따른 상기 다수의 태스크들 각각에 대한 수행 시간을 예측하는 성능 프로파일러와, 상기 예측된 수행 시간을 근거로 상기 적어도 하나의 코어에 대한 태스크 스케줄링을 수행하는 스케줄러를 포함한다.
본 발명은 이기종 멀티 코어 환경에서 단말기가 멀티 태스크에 대한 성능을 보다 효과적으로 측정할 수 있는 효과가 있다. 또한, 본 발명은 단말기에서 성능 측정에 따른 오버헤드를 최소화할 수 있으며, 많은 수의 태스크가 동시에 실행되더라도 성능 예측을 통해 태스크 스케줄링을 보다 효과적으로 수행할 수 있는 이점이 있다.
도 1은 단말기에서 태스크 스케줄링을 위한 성능 측정 방법을 나타낸 도면,
도 2는 본 발명의 실시 예에 따른 단말기의 블록 구성도,
도 3은 본 발명의 실시 예에 따른 단말기에서 태스크 스케줄링을 위한 성능 측정에 따라 업데이트되는 데이터 베이스를 나타낸 도면,
도 4는 본 발명의 실시 예에 따른 태스크 스케줄링을 위한 성능 예측을 위해 사용되는 데이터 베이스에 저장된 정보를 나타낸 도면,
도 5는 본 발명의 실시 예에 따른 단말기에서 태스크 스케줄링을 위한 성능 측정 및 예측 과정을 나타낸 순서도.
이하 첨부된 도면을 참조하여 본 발명의 동작 원리를 상세히 설명한다. 하기에서 본 발명을 설명함에 있어 관련된 공지 기능 또는 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략할 것이다. 그리고 후술되는 용어들은 본 발명에서의 기능을 고려하여 정의된 용어들로서 이는 사용자, 운용자의 의도 또는 관례 등에 따라 달라질 수 있다. 그러므로 그 정의는 본 명세서 전반에 걸친 내용을 토대로 내려져야 할 것이다.
본 발명의 실시 예에서는 단말기에서 태스크 스케줄링을 수행하는 방법 및 장치를 제안한다. 구체적으로, 본 발명의 실시 예에서는 서로 다른 타입을 갖는 적어도 두 개의 코어를 포함하는 단말기에서 상기 적어도 두 개의 코어 중 적어도 하나에 대응하여 태스크 상태 변화가 발생하는지 여부를 판단하고, 상기 태스크 상태 변화가 발생한 경우, 상기 적어도 하나의 코어에 대해 실행 중인 다수의 태스크들 각각에 대한 수행 시간의 변화량을 판단하고, 상기 판단된 변화량을 사용하여, 상기 태스크 상태 변화에 따른 상기 다수의 태스크들 각각에 대한 수행 시간을 예측하고, 상기 예측된 수행 시간을 근거로 상기 적어도 하나의 코어에 대한 태스크 스케줄링을 수행하는 방법 및 장치를 제안한다.
상기 서로 다른 타입을 갖는 적어도 두 개의 코어는 일반적으로 이기종 코어라 할 수 있다. 본 발명의 실시 예에서는 상기 이기종 코어에 CPU(Central Processing Unit) 및 GPU(Graphic Processor Unit)가 포함되는 경우를 일 예로 설명한다. 하지만, 상기 이기종 코어에는 DSP(Digital Signal Processor), ARM, X86, X64 등과 같은 다른 기종의 코어가 추가적으로 포함될 수 있음은 물론이다.
그리고, 본 발명의 실시 예에서 상기 단말기는 이기종 멀티 코어 구조(Heterogeneous Multi-core Architecture)를 포함하는 휴대 전화, 개인용 컴퓨터(Personal Computer: PC) 및 태블릿 PC 등과 같은 장치가 될 수 있다. 또한, 본 발명의 실시 예에서 성능 측정은 태스크 수행 시간을 측정하는 동작을 기반으로 수행되는 것임을 일 예로 설명한다. 한편, 이하에 제시될 본 발명의 실시 예에서는 태스크와 프로그램의 용어가 혼용되어 사용될 수도 있음을 유의하여야 한다.
본 발명의 실시 예의 설명에 앞서, 태스크 스케줄링을 위한 성능 측정 방식에 대해 설명하기로 한다.
도 1은 단말기에서 태스크 스케줄링을 위한 성능 측정 방법을 나타낸 도면이다.
일반적으로, 단말기에서는 태스크 스케줄링을 수행하기 위하여 이기종 코어에 포함된 각 코어의 성능을 측정하고, 상기 측정 결과에 따라 추가적인 태스크를 해당 코어에 할당한다. 상기 성능 측정은 태스크 수행 시간을 기반으로 수행되므로, 스케줄링시 이기종 코어 상의 태스크 수행 시간에 대한 정보가 획득되어야 한다. 이를 위해 일반적으로 단말기는 다음과 같은 동작을 수행한다.
상기 단말기는 상기 태스크 스케줄링을 수행하기 전, 트레이닝 실행(Training Run) 방식을 수행한다. 즉, 상기 단말기는 이기종 코어 상의 프로그램을 실행시켜 해당 수행 시간을 미리 데이터 베이스에 저장한다. 일 예로, 상기 단말기는 도 1(a)에 나타난 바와 같이, 상기 태스크 스케줄링 수행 전 CPU와 GPU 각각에 포함된 프로그램을 실행시키고, 프로그램 실행에 따른 태스크 수행 시간을 데이터 베이스에 저장한다. 그리고 상기 단말기는 실제 스케줄링을 수행할 때, 상기 데이터 베이스에 저장된 CPU와 GPU 각각에 대한 태스크 수행 시간을 근거로 상기 CPU와 GPU 각각에 태스크를 할당한다.
하지만 도 1(b)에 나타난 바와 같이, 실제 할당된 태스크가 실행되는 시점에는 상기 CPU와 GPU 각각에 다수의 태스크가 실행되는 경우가 발생될 수 있다. 상기 데이터 베이스에 저장된 태스크 수행 시간은 단일 태스크 환경을 고려하여 저장된 시간이므로, 상기 데이터 베이스에 저장된 태스크 수행 시간은 실제 태스크 수행 시간과 일치하지 않는다. 따라서, 상기 데이터 베이스에 저장된 태스크 수행 시간이 도 1(b)에 나타난 바와 같은 멀티 태스크 환경에서 사용되는 것은 바람직하지 않다.
이에 따라, 상기 CPU와 GPU 각각에서 실행되는 모든 프로그램들에 대한 태스크 수행 시간을 주기적으로 측정하고 저장하는 방식(이하 '연속 프로파일링(Profiling)'방식이라 칭함)이 고려될 수 있다. 하지만 상기 연속 프로파일링 방식이 사용될 경우, 실행되는 프로그램의 수가 증가할수록 태스크 수행 시간의 측정 및 저장에 따른 오버헤드가 증가하는 문제가 있다. 또한, 모든 프로그램들에 대한 상태 변화를 감지하는 것이 어려우므로, 태스크 수행 시간에 대한 측정 주기를 정확하게 결정하는 것이 어려운 문제가 있다.
상기와 같은 문제를 해결하기 위하여, 본 발명의 실시 예에서는 이기종 멀티 코어 구조 환경에서 다수개의 프로그램이 동시에 실행되는 경우를 고려하여, 효율적으로 태스크 스케줄링을 수행할 수 있도록 하는 방법 및 장치를 제안한다.
이하 도 2를 참조하여, 본 발명의 실시 예에 따른 단말기의 내부 구성을 살펴보기로 한다.
도 2는 본 발명의 실시 예에 따른 단말기의 블록 구성도이다.
도 2를 참조하면, 상기 단말기는 성능 프로파일러(Performance Profiler)(200), 태스크 관리부(Mask Manager)(202), 태스크 상태 모니터(Task Status Monitor)(204), 데이터 베이스(206) 및 이기종 코어(일 예로, CPU 및 GPU)(208)를 포함한다.
상기 성능 프로파일러(200)는 상기 CPU 및 GPU 각각의 태스크 수행 시간을 측정하고, 측정된 태스크 수행 시간에 대한 정보를 상기 데이터 베이스(206)에 저장한다.
상기 태스크 관리부(202)는 커널(Kernal) 내부에 존재하며, 태스크를 생성하고 삭제하고 변경(일 예로, 문제값 등의 변경)하는 동작을 수행한다.
상기 태스크 상태 모니터(204)는 태스크의 생성, 삭제 및 변경 등과 같은 상태 변화를 판단하기 위하여 상기 태스크 관리부(202)를 모니터링한다.
상기 데이터 베이스(206)는 상기 태스크 상태 모니터(204)에서 태스크의 상태 변화가 판단된 경우, 상기 성능 프로파일러(200)의 지시에 따라 해당 상태에 대한 정보(210)를 저장한다. 구체적으로, 상기 데이터 베이스(206)는 하기 표 1과 같은 정보를 저장한다. 하기 표 1에서 Cost는 프로그램 실행(Runtime)에 따른 태스크 수행 시간을 나타낸다.
표 1
Figure PCTKR2013003044-appb-T000001
한편, 도 2에 도시되지는 않았으나, 상기 단말기에는 스케줄러가 포함될 수 있으며, 상기 스케줄러는 상기 성능 프로파일러 (200), 태스크 관리부 (202), 태스크 상태 모니터(204), 데이터 베이스(206) 및 이기종 코어(208)의 동작 결과에 따라 태스크 스케줄링을 수행한다.
이하 상기와 같이 구성된 단말기의 동작을 구체적으로 설명하기로 한다.
도 3은 본 발명의 실시 예에 따른 단말기에서 태스크 스케줄링을 위한 성능 측정에 따라 업데이트되는 데이터 베이스를 나타낸 도면이다.
본 발명의 실시 예에서는 일반적인 트레이닝 실행 방식 및 연속 프로파일링 방식과 달리 태스크 상태를 모니터링하여 태스크 상태 변화가 발생한 경우에만 성능 측정을 수행하므로 성능 측정에 따른 오버헤드를 감소시킬 수 있다. 이에 따른 본 발명의 실시 예를 앞서 설명한 도 2의 구성부를 참조하여 설명하면 다음과 같다.
먼저 상기 태스크 상태 모니터(204)는 상기 태스크 관리부(202)를 모니터링하여 태스크의 생성, 삭제 및 변경 등과 같은 상태 변화가 발생하였는지 여부를 판단한다. 일 예로, 제1CPU 태스크 및 제1GPU 태스크가 각각 생성된 경우, 상기 태스크 상태 모니터(204)는 태스크의 상태 변화가 발생한 것으로 판단하여 상기 성능 프로파일러(200)로 성능 측정을 수행할 것을 요청한다.
그러면, 상기 성능 프로파일러(200)는 상기 제1CPU 태스크 및 제1GPU 태스크 각각에 대한 태스크 수행 시간을 측정하고, 측정 결과를 Performance history로서 상기 데이터 베이스(206)에 저장한다. 이 때, 상기 데이터 베이스(206)에 저장된 Performance history는 도 3의 Performance history 1(310)에 나타난 바와 같다.
상기 Performance history 1(310)에 나타난 바와 같이, 초기 성능 측정 수행시 상기 데이터 베이스(206)에는 상기 제1CPU 태스크 및 제1GPU 태스크 각각에 대한 태스크 수행 시간이 각각 CPU Cost 및 GPU Cost로서 저장된다. 그리고, 상태 변화값에는 상기 제1CPU 태스크 및 상기 제1GPU 태스크 각각에 대한 상태 변화 초기값(일 예로, "0")이 저장된다.
상기 Performance history 1(310)이 상기 데이터 베이스(206)에 저장된 상태에서 상기 태스크 관리부(202)에 의해 제2CPU 태스크가 생성되었음이 판단되면, 상기 성능 프로파일러(200)는 상기 제1CPU 태스크 및 제2CPU 태스크 각각에 대한 수행 시간을 측정한다. 그리고, 상기 성능 프로파일러(200)는 상기 Performance history 1(310)에 포함된 상기 제1CPU 태스크에 대한 CPU Cost를 상기 측정된 제1CPU 태스크의 수행 시간으로 업데이트한다. 또한, 상기 성능 프로파일러(200)는 상기 업데이트된 CPU Cost와 CPU Base Cost 간의 차이를 CPU 상태 변화값으로서 저장한다. 즉, 상기 성능 프로파일러(200)는 상기 제1CPU 태스크가 CPU 내에서 단일로 동작할 때의 Cost와 상기 제1CPU 태스크가 상기 제2CPU 태스크와 동시에 동작할 때의 Cost 간의 차이를 상기 CPU 상태 변화값으로서 저장한다. 이와 같은 동작에 따른 Performance history는 도 3의 Performance history 2(320)에 나타난 바와 같다.
여기서 GPU 태스크에 대해서는 어떠한 변화가 없으므로(즉, 새로운 GPU 태스크가 생성되거나 상기 제1GPU 태스크가 삭제 또는 변경되는 등의 동작이 수행되지 않음), 상기 GPU Cost의 값과 GPU 상태 변화값은 상기 Performance history 1(310)에 포함된 값 그대로 유지된다.
한편, 본 발명의 실시 예에서 Performance history는 각 태스크 별로 생성되므로, 상기 제2CPU 태스크에 대한 Performance history가 새로 생성된다. 따라서 상기 제1CPU에 대한 Performance history가 업데이트되고 상기 제2CPU 태스크에 대한 Performance history가 생성되면, 상기 성능 프로파일러(200)는 전체 CPU 태스크들에 대한 Cost 총합(즉, Total CPU Cost)을 설정한다.
다음으로, 상기 Performance history 2(320)가 상기 데이터 베이스(206)에 저장된 상태에서 상기 태스크 관리부(202)에 의해 제2GPU 태스크가 생성되면, 상기 성능 프로파일러(200)는 상기 제1GPU 태스크 및 제2GPU 태스크 각각에 대한 수행 시간을 측정한다. 그리고, 상기 성능 프로파일러(200)는 상기 Performance history 2(320)에 포함된 상기 제1GPU 태스크에 대한 GPU Cost를 상기 측정된 제1GPU 태스크의 수행 시간으로 업데이트한다. 또한, 상기 성능 프로파일러(200)는 상기 업데이트된 GPU Cost와 GPU Base Cost 간의 차이를 GPU 상태 변화값으로서 저장한다. 즉, 상기 성능 프로파일러(200)는 상기 제1GPU 태스크가 GPU 내에서 단일로 동작할 때의 Cost와 상기 제1GPU 태스크가 상기 제2GPU 태스크와 동시에 동작할 때의 Cost 간의 차이를 상기 GPU 상태 변화값으로서 저장한다. 이와 같은 동작에 따른 Performance history는 도 3의 Performance history 3(330)에 나타난 바와 같다.
여기서 CPU 태스크에 대해서는 어떠한 변화가 없으므로(즉, 새로운 CPU 태스크가 생성되거나 기존 제1 및 제2CPU 태스크가 삭제 또는 변경되는 등의 동작이 수행되지 않음), 상기 제1CPU 태스크에 대한 CPU Cost의 값과 CPU 상태 변화값은 상기 Performance history 2(320)에 포함된 값 그대로 유지된다. 그리고, 상기 제2CPU 태스크에 대한 Performance history 및 Total CPU Cost도 변경없이 그대로 유지된다.
한편, 본 발명의 실시 예에서 Performance history는 각 태스크 별로 생성되므로, 상기 제2GPU 태스크에 대한 Performance history가 새로 생성된다. 따라서, 상기 제1GPU에 대한 Performance history가 업데이트되고, 상기 제2GPU 태스크에 대한 Performance history가 생성되면, 상기 성능 프로파일러(200)는 전체 GPU 태스크들에 대한 Cost 총합(즉, Total GPU Cost)을 설정한다.
상기와 같은 Performance history 업데이트 과정이 수행됨에 따라 Task Information(340)도 업데이트된다. 즉, CPU Cost와 GPU Cost가 업데이트될 때 마다 상기 Task Information(340) 내의 현재 CPU Cost 및 현재 GPU Cost 값이 업데이트된다. 그리고 상기 CPU Base 변화량 및 GPU Base 변화량은 미리 설정된 횟수의 Performance history 업데이트 과정이 수행되면, 각 Performance history에 포함된 CPU 상태 변화값 및 GPU 상태 변화값의 평균값으로 업데이트된다.
예를 들어, 상기 CPU Base 변화량 및 GPU Base 변화량이 각각 10개의 CPU 상태 변화값의 평균값 및 10개의 GPU 상태 변화값의 평균값으로 결정되는 경우, 10번 업데이트된 Performance history에 따른 10개의 CPU Base 변화량 및 GPU Base 변화량 각각의 평균값이 상기 Task Information(340)에 포함되는 CPU Base 변화량 및 GPU Base 변화량으로 결정된다.
앞서 설명한 단말기에서의 성능 측정 과정을 요약하여 정리하면 다음과 같다.
(1) 태스크의 생성, 삭제 및 문제값 변경 등과 같은 상태 변화가 발생하는지 여부를 근거로 CPU 및 GPU 각각에 대한 성능 검사를 수행해야 할 지 여부를 결정
(2) 상기 CPU 및 GPU 각각에 대한 성능 검사를 수행해야 할 것이 결정되면, 상기 CPU 및 GPU 각각에 대한 태스크 수행 시간을 측정하고, 측정된 결과를 사용하여 Performance history를 저장(또는 업데이트)
(3) 상기 CPU 또는 GPU에 대한 새로운 태스크가 생성되면 상기 새로운 태스크에 대한 Cost를 저장하고, 현재 상태(즉, 새로운 태스크와 기존의 태스크가 동시에 실행되는 상태)에서 상기 CPU 및 GPU 각각에 대한 태스크 수행 시간을 측정
(4) 현재 CPU Cost, 현재 GPU Cost, Total CPU Cost 및 Total GPU Cost 업데이트
(5) 상기 업데이트된 현재 CPU Cost, 현재 GPU Cost, Total CPU Cost 및 Total GPU Cost를 사용하여 상기 CPU 및 GPU 태스크 각각에 대한 상태 변화값을 업데이트하고, 업데이트된 상태 변화값을 근거로 CPU Base 변화량 및 GPU Base 변화량을 업데이트
(6) 상기 CPU Base 변화량 및 GPU Base 변화량을 최종적으로 결정하기 위한 미리 설정된 개수의 CPU 상태 변화값 및 GPU 상태 변화값이 획득될 때까지 상기 (1)~(5) 단계를 반복적으로 수행
한편, 상기와 같은 태스크 상태 변화에 따른 성능 측정 방법이 사용될 경우 태스크 수행 시간 측정 및 저장에 따른 오버헤드는 감소시킬 수 있으나, 태스크의 수가 증가하면 성능 측정을 위해 많은 시간이 소모되어야 하는 문제가 있다.
이러한 문제를 고려하여, 본 발명의 실시 예에서는 상기 Task Information의 CPU base 변화량 및 GPU base 변화량을 사용하여 성능을 예측하는 방법을 제안한다. 이러한 방법이 사용될 경우, 실제 성능 측정 과정이 수행될 필요가 없으므로 오버헤드를 최소화함과 아울러 성능 측정을 위한 시간을 절약할 수 있게 된다.
본 발명의 실시 예에서 제안하는 CPU/GPU 예측 Cost는 다음 수학식 1을 사용하여 결정된다.
수학식 1
Figure PCTKR2013003044-appb-M000001
상기 수학식 1에서 예측 Cost는 CPU 태스크 또는 GPU 태스크에 대한 예측 Cost를 나타내며, Base Cost는 CPU Base Cost또는 GPU Base Cost를 나타내며, 상기 Total Cost에 대한 Base Cost 변화량은 CPU Base 변화량 또는 GPU Base 변화량을 나타낸다.
상기 수학식 1에 나타난 바와 같이, 본 발명의 실시 예에서는 Base Cost와 Base 변화량을 기반으로 CPU 또는 GPU 태스크에 대한 Cost를 예측한다. 그리고, 상기 성능 예측 과정은 Task Information에 포함된 CPU Base 변화량 또는 GPU Base 변화량이 미리 설정된 횟수만큼 업데이트된 Performance history에 의해 결정된 경우 수행된다.
또한, 본 발명의 실시 예에서 제안하는 성능 예측 과정은 태스크가 실행 중인 경우와 태스크가 재시작되는 경우의 두 가지로 나뉘어 수행된다.
먼저 태스크가 실행 중인 경우, 상기 단말기는 새로운 태스크가 생성되는지 여부를 판단한다. 그리고 상기 단말기는 상기 새로운 태스크가 생성된 경우 상기 새로운 태스크의 Cost를 저장하고, 상기 새로운 태스크의 Cost를 고려하여 기존 태스크의 Total Cost를 업데이트 한다. 그리고, 상기 단말기는 상기 업데이트된 Total Cost와 Base 변화량을 기반으로 상기 기존 태스크에 대한 예측 Cost를 결정한다. 한편, 상기 단말기는 태스크가 재시작될 때에는 기존에 저장된 Total Cost 및 Base 변화량을 기반으로 상기 예측 Cost를 결정한다.
이하 도 4를 참조하여, 본 발명의 실시 예에 따른 성능 예측 방법의 일 예를 설명하기로 한다.
도 4는 본 발명의 실시 예에 따른 태스크 스케줄링을 위한 성능 예측을 위해 사용되는 데이터 베이스에 저장된 정보를 나타낸 도면이다.
도 4(a)에 나타난 바와 같은 정보(일 예로 '제1CPU 및 제1GPU 태스크에 대한 정보'라 칭함)가 상기 데이터 베이스에 저장된 상태에서 200 Cost에 대응되는 제2CPU 태스크와 100 Cost에 대응되는 제2GPU 태스크가 생성된 경우, 상기 단말기는 다음과 같은 동작을 수행한다.
상기 단말기는 상기 제1CPU 및 제1GPU 태스크 각각에 대응되는 CPU Base 변화량 및 GPU Base 변화량을 사용하여, 상기 제1CPU 및 제1CPU 태스크가 상기 생성된 제2CPU 및 제2GPU 태스크와 동시에 수행될 때의, 상기 제1CPU 및 제1GPU 태스크에 대한 현재 CPU Cost 및 현재 GPU Cost를 예측한다. 이를 구체적으로 설명하면 다음과 같다.
상기 단말기는 상기 제1CPU 태스크에 대한 CPU Base 변화량과 상기 생성된 제2CPU 태스크의 Cost(즉, 상기 제1CPU 태스크가 실행되고 있는 상태에서 측정된 상기 제2CPU 태스크의 Cost)를 사용하여 현재 CPU Cost를 예측한다. 일 예로, 상기 제1CPU 태스크에 대한 CPU Base 변화량은 CPU Cost 10마다 10 증가하는 것으로 나타나 있으며, 상기 제2CPU 태스크의 Cost는 200이므로, 상기 단말기는 상기 제1CPU 태스크가 상기 제2CPU 태스크와 동시에 실행되는 동안(즉, 200 Cost 동안), 현재 CPU Cost 값이 100에서 200 증가된 300이 됨을 예측할 수 있다.
그리고, 상기 단말기는 상기 제1GPU 태스크에 대한 GPU Base 변화량과 상기 생성된 제2GPU 태스크의 Cost를 사용하여 현재 GPU Cost를 예측한다. 일 예로, 상기 제1GPU 태스크에 대한 GPU Base 변화량은 GPU Cost 10마다 5 증가하는 것으로 나타나 있으며, 상기 제2GPU 태스크의 Cost(즉, 상기 제1GPU 태스크가 실행되고 있는 상태에서 측정된 상기 제2GPU 태스크의 Cost)는 100이므로, 상기 단말기는 상기 제1GPU 태스크가 상기 제2GPU 태스크와 동시에 실행되는 동안(즉, 100 Cost 동안), 현재 GPU Cost 값이 50에서 50 증가된 100이 됨을 예측할 수 있다.
상기 예측된 현재 CPU Cost 및 현재 GPU Cost를 근거로 상기 Task Information은 도 4(b)에 나타난 바와 같이 업데이트된다. 아울러, 상기 업데이트된 현재 CPU Cost(300) 및 현재 GPU Cost(100)와 상기 제2CPU 태스크의 Base Cost(200) 및 제2GPU 태스크의 Base Cost(100)가 각각 합산되는 형태로 Total CPU Cost 및 Total GPU Cost는 각각 500과 200으로 업데이트된다.
상기와 같은 과정은 CPU 또는 GPU 태스크가 생성, 삭제 및 변경되는 경우 반복적으로 수행될 수 있으므로, 상기 단말기는 성능 예측 과정을 통해 오버헤드를 줄이고 효율적으로 태스크 스케줄링을 수행할 수 있게 된다.
다음으로, 도 5를 참조하여 본 발명의 실시 예에 따른 단말기에서 태스크 스케줄링을 위한 성능 측정 및 예측 과정을 설명하기로 한다.
도 5는 본 발명의 실시 예에 따른 단말기에서 태스크 스케줄링을 위한 성능 측정 및 예측 과정을 나타낸 순서도이다.
도 5를 참조하면, 상기 단말기는 500 단계에서 태스크 상태 변화를 감지하고, 502 단계에서 미리 설정된 횟수만큼 업데이트된 Performance history에 의해 결정된 CPU Base Cost 변화량 및 GPU Base Cost 변화량이 존재하는지 여부를 판단한다.
상기 단말기는 상기 CPU Base Cost 변화량 및 GPU Base Cost 변화량이 존재하지 않는 경우, 504 단계로 진행하여 CPU 및 GPU에 대한 성능을 측정한다. 즉, 상기 단말기는 CPU 및 GPU 태스크에 대한 수행 시간을 측정하고, 측정된 CPU 및 GPU 태스크에 대한 수행시간이 포함되도록 506 단계에서 Performance history를 업데이트 한다. 이어, 상기 단말기는 508 단계에서 상기 업데이트된 Performance history를 근거로 Total CPU Cost 및 Total GPU Cost를 업데이트 한다. 그리고, 상기 단말기는 510 단계에서 상기 업데이트된 Total CPU Cost 및 Total GPU Cost를 사용하여 CPU Base 변화량 및 GPU Base 변화량을 설정(업데이트)한다.
상기 504 단계 내지 510 단계는 상기 Performance history가 미리 설정된 횟수만큼 업데이트될 때까지 반복적으로 수행된다. 상기 단말기는 상기 Performance history가 미리 설정된 횟수만큼 업데이트 된 경우, 상기 Performance history에 포함된 정보를 사용하여 앞서 도 4에서 설명한 방법을 사용하여 CPU 및 GPU에 대한 성능 예측을 수행한다.
한편, 상기 단말기는 상기 502 단계에서 상기 CPU Base Cost 변화량 및 GPU Base Cost 변화량이 존재하는 것으로 판단된 경우, 512 단계에서 상기 CPU 및 GPU에 대한 성능 예측을 수행한다. 그리고, 상기 단말기는 예측된 CPU 및 GPU의 Cost를 기반으로 514 단계에서 Total CPU Cost 및 Total GPU Cost를 업데이트 한다.
상기 도 5의 과정이 수행된 후, 상기 단말기는 Total CPU Cost 및 Total GPU Cost를 기반으로 상기 CPU 및 GPU 각각에 대한 성능을 판단하고, 상기 판단된 CPU 및 GPU 각각에 대한 성능에 따라 태스크 스케줄링을 수행한다.
한편 본 발명의 상세한 설명에서는 구체적인 실시 예에 관해 설명하였으나, 본 발명의 범위에서 벗어나지 않는 한도 내에서 여러 가지 변형이 가능함은 물론이다. 그러므로 본 발명의 범위는 설명된 실시 예에 국한되어 정해져서는 안되며 후술하는 특허청구의 범위뿐만 아니라 이 특허청구의 범위와 균등한 것들에 의해 정해져야 한다.

Claims (14)

  1. 서로 다른 타입을 갖는 적어도 두 개의 코어를 포함하는 단말기에서 태스크 스케줄링을 수행하는 방법에 있어서,
    상기 적어도 두 개의 코어 중 적어도 하나에 대응하여 태스크 상태 변화가 발생하는지 여부를 판단하는 과정과,
    상기 태스크 상태 변화가 발생한 경우, 상기 적어도 하나의 코어에 대해 실행 중인 다수의 태스크들 각각에 대한 수행 시간의 변화량을 판단하는 과정과,
    상기 판단된 변화량을 사용하여, 상기 태스크 상태 변화에 따른 상기 다수의 태스크들 각각에 대한 수행 시간을 예측하는 과정과,
    상기 예측된 수행 시간을 근거로 상기 적어도 하나의 코어에 대한 태스크 스케줄링을 수행하는 과정을 포함하는 태스크 스케줄링 수행 방법.
  2. 제1항에 있어서,
    상기 태스크 상태 변화가 발생하는지 여부를 판단하는 과정은,
    상기 다수의 태스크들 중 적어도 하나가 변경 또는 삭제되거나, 상기 적어도 하나의 코어에 대응하여 새롭게 실행될 적어도 하나의 태스크가 생성되는지 여부를 판단하는 과정을 포함하는 태스크 스케줄링 수행 방법.
  3. 제1항에 있어서,
    상기 다수의 태스크들 각각에 대한 수행 시간의 변화량을 판단하는 과정은,
    상기 다수의 태스크들 각각이 단일 태스크로 실행될 때의 수행 시간인 제1수행 시간과, 상기 다수의 태스크들이 동시에 실행될 때의 상기 다수의 태스크들 각각에 대한 수행 시간인 제2수행 시간을 사용하여 상기 다수의 태스크들 각각에 대한 수행 시간의 변화량을 판단하는 과정을 포함하는 태스크 스케줄링 수행 방법.
  4. 제3항에 있어서,
    상기 제1수행 시간과 상기 제2수행 시간을 사용하여 상기 다수의 태스크들 각각에 대한 수행 시간의 변화량을 판단하는 과정은,
    상기 제2수행 시간을 미리 설정된 횟수 번 측정하는 과정과,
    미리 설정된 횟수 번 측정된 상기 제2수행 시간과 상기 제1수행 시간 간의 차이값을 판단하여 미리 설정된 개수의 차이값들을 결정하는 과정과,
    상기 결정된 차이값들에 대한 평균값을 사용하여 상기 다수의 태스크들 각각에 대한 수행 시간의 변화량을 판단하는 과정을 포함하는 태스크 스케줄링 수행 방법.
  5. 제1항에 있어서,
    상기 태스크 스케줄링을 수행하는 과정은,
    상기 예측된 수행 시간을 근거로 상기 적어도 하나의 코어에 대응하여 실행 중인 전체 태스크에 대한 수행 시간을 판단하는 과정과,
    상기 전체 태스크에 대한 수행 시간을 고려하여 상기 적어도 하나의 코어에 대한 태스크 스케줄링을 수행하는 과정을 포함하는 태스크 스케줄링 수행 방법.
  6. 제1항에 있어서,
    상기 다수의 태스크들 각각에 대한 수행 시간의 변화량을 판단하는 과정은,
    이전에 저장된 태스크 정보를 근거로 상기 다수의 태스크들 각각에 대한 수행 시간의 변화량을 판단하는 과정을 포함하며,
    상기 태스크 정보는 상기 다수의 태스크들 각각에 대한 식별자, 상기 다수의 태스크들 각각이 단일 태스크로 실행되는 경우의 수행 시간을 나타내는 제3수행 시간, 상기 태스크 상태 변화가 발생한 경우 측정된 상기 다수의 태스크들 각각에 대한 수행 시간을 나타내는 제4수행 시간 및 상기 제3수행 시간의 변화량 정보를 포함하는 태스크 스케줄링 수행 방법.
  7. 제6항에 있어서,
    상기 제3수행 시간의 변화량 정보는 다수의 성능 히스토리 정보에 포함된 상태 변화값들의 평균값을 근거로 결정되며,
    상기 상태 변화값은 상기 태스크 상태 변화가 발생한 경우 미리 설정된 횟수 번 측정된 상기 다수의 태스크들 각각에 대한 수행 시간과 상기 제3수행 시간 간의 차이값을 사용하여 결정됨을 특징으로 하는 태스크 스케줄링 수행 방법.
  8. 서로 다른 타입을 갖는 적어도 두 개의 코어를 포함하는 단말기에 있어서,
    상기 적어도 두 개의 코어 중 적어도 하나에 대응하여 태스크 상태 변화가 발생하는지 여부를 판단하는 태스크 상태 모니터와,
    상기 태스크 상태 변화가 발생한 경우, 상기 적어도 하나의 코어에 대해 실행 중인 다수의 태스크들 각각에 대한 수행 시간의 변화량을 판단하고, 상기 판단된 변화량을 사용하여, 상기 태스크 상태 변화에 따른 상기 다수의 태스크들 각각에 대한 수행 시간을 예측하는 성능 프로파일러와,
    상기 예측된 수행 시간을 근거로 상기 적어도 하나의 코어에 대한 태스크 스케줄링을 수행하는 스케줄러를 포함하는 단말기.
  9. 제8항에 있어서,
    상기 태스크 상태 모니터는 상기 다수의 태스크들 중 적어도 하나가 변경 또는 삭제되거나, 상기 적어도 하나의 코어에 대응하여 새롭게 실행될 적어도 하나의 태스크가 생성되는지 여부를 판단함을 특징으로 하는 단말기.
  10. 제8항에 있어서,
    상기 성능 프로파일러는 상기 다수의 태스크들 각각이 단일 태스크로 실행될 때의 수행 시간인 제1수행 시간과, 상기 다수의 태스크들이 동시에 실행될 때의 상기 다수의 태스크들 각각에 대한 수행 시간인 제2수행 시간을 사용하여 상기 다수의 태스크들 각각에 대한 수행 시간의 변화량을 판단함을 특징으로 하는 단말기.
  11. 제10항에 있어서,
    상기 성능 프로파일러는 미리 설정된 횟수 번 측정된 상기 제2수행 시간과 상기 제1수행 시간 간의 차이값을 판단하여 미리 설정된 개수의 차이값들을 결정하고, 상기 결정된 차이값들에 대한 평균값을 사용하여 상기 다수의 태스크들 각각에 대한 수행 시간의 변화량을 판단함을 특징으로 하는 단말기.
  12. 제8항에 있어서,
    상기 스케줄러는 상기 예측된 수행 시간을 근거로 상기 적어도 하나의 코어에 대응하여 실행 중인 전체 태스크에 대한 수행 시간을 판단하고, 상기 전체 태스크에 대한 수행 시간을 고려하여 상기 적어도 하나의 코어에 대한 태스크 스케줄링을 수행함을 특징으로 하는 단말기.
  13. 제8항에 있어서,
    상기 다수의 태스크들 각각에 대한 식별자, 상기 다수의 태스크들 각각이 단일 태스크로 실행되는 경우의 수행 시간을 나타내는 제3수행 시간, 상기 태스크 상태 변화가 발생한 경우 측정된 상기 다수의 태스크들 각각에 대한 수행 시간을 나타내는 제4수행 시간 및 상기 제3수행 시간의 변화량 정보를 포함하는 태스크 정보를 저장하는 데이터 베이스를 더 포함하며,
    상기 성능 프로파일러는 상기 태스크 정보를 근거로 상기 다수의 태스크들 각각에 대한 수행 시간의 변화량을 판단함을 특징으로 하는 단말기.
  14. 제13항에 있어서,
    상기 제3수행 시간의 변화량 정보는 다수의 성능 히스토리 정보에 포함된 상태 변화값들의 평균값을 근거로 결정되며,
    상기 상태 변화값은 상기 태스크 상태 변화가 발생한 경우 미리 설정된 횟수 번 측정된 상기 다수의 태스크들 각각에 대한 수행 시간과 상기 제3수행 시간 간의 차이값을 사용하여 결정됨을 특징으로 하는 단말기.
PCT/KR2013/003044 2012-04-12 2013-04-11 단말기에서 태스크 스케줄링을 수행하는 방법 및 장치 WO2013154365A1 (ko)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US14/391,860 US10162671B2 (en) 2012-04-12 2013-04-11 Method and apparatus for performing task scheduling in terminal

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020120037978A KR20130115574A (ko) 2012-04-12 2012-04-12 단말기에서 태스크 스케줄링을 수행하는 방법 및 장치
KR10-2012-0037978 2012-04-12

Publications (1)

Publication Number Publication Date
WO2013154365A1 true WO2013154365A1 (ko) 2013-10-17

Family

ID=49327867

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2013/003044 WO2013154365A1 (ko) 2012-04-12 2013-04-11 단말기에서 태스크 스케줄링을 수행하는 방법 및 장치

Country Status (3)

Country Link
US (1) US10162671B2 (ko)
KR (1) KR20130115574A (ko)
WO (1) WO2013154365A1 (ko)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115168016A (zh) * 2022-09-07 2022-10-11 浙江大华技术股份有限公司 任务调度方法及相关装置、芯片、器件和介质

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10474213B1 (en) * 2005-05-30 2019-11-12 Invent.Ly, Llc Predictive power management in a wireless sensor network using scheduling data
US9851777B2 (en) 2014-01-02 2017-12-26 Advanced Micro Devices, Inc. Power gating based on cache dirtiness
US9720487B2 (en) * 2014-01-10 2017-08-01 Advanced Micro Devices, Inc. Predicting power management state duration on a per-process basis and modifying cache size based on the predicted duration
US9507410B2 (en) 2014-06-20 2016-11-29 Advanced Micro Devices, Inc. Decoupled selective implementation of entry and exit prediction for power gating processor components
FR3035243B1 (fr) * 2015-04-20 2018-06-29 Commissariat A L'energie Atomique Et Aux Energies Alternatives Placement d'une tache de calcul sur un processeur fonctionnellement asymetrique
KR102360214B1 (ko) 2015-08-26 2022-02-08 삼성전자주식회사 실시간 공유 인터페이스를 포함하는 시스템 온 칩의 스케쥴링 방법
US9733978B2 (en) 2015-08-27 2017-08-15 Qualcomm Incorporated Data management for multiple processing units using data transfer costs
US9778961B2 (en) 2015-09-14 2017-10-03 Qualcomm Incorporated Efficient scheduling of multi-versioned tasks
US10360063B2 (en) 2015-09-23 2019-07-23 Qualcomm Incorporated Proactive resource management for parallel work-stealing processing systems
US10579350B2 (en) * 2016-02-18 2020-03-03 International Business Machines Corporation Heterogeneous computer system optimization
US10592279B2 (en) * 2016-06-23 2020-03-17 Advanced Micro Devices, Inc. Multi-processor apparatus and method of detection and acceleration of lagging tasks
CN109582396B (zh) * 2017-09-25 2022-02-18 北京国双科技有限公司 一种任务状态处理方法、装置、系统及存储介质
US11138091B2 (en) * 2018-12-12 2021-10-05 Sap Se Regression analysis platform
US11221876B2 (en) * 2018-12-30 2022-01-11 Paypal, Inc. Scheduling applications in CPU and GPU hybrid environments
KR102429327B1 (ko) * 2020-11-19 2022-08-04 엘아이지넥스원 주식회사 복합 센서 이동형 레이더의 실시간 코어 사용량 측정 장치 및 방법

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070116712A (ko) * 2006-06-06 2007-12-11 각코호진 와세다다이가쿠 헤테로지니어스 멀티프로세서용 글로벌 컴파일러
KR20100018289A (ko) * 2008-08-06 2010-02-17 삼성전자주식회사 멀티 태스킹 성능 예측 방법 및 시스템
KR20110034653A (ko) * 2008-07-02 2011-04-05 고쿠리츠다이가쿠호진 토쿄고교 다이가꾸 실행시간 추정방법, 실행시간 추정 프로그램 및 실행시간 추정장치
KR20110112791A (ko) * 2010-04-07 2011-10-13 애플 인크. 프로세서 슬리프 및 웨이크 이벤트들에 대한 시스템에서의 하드웨어 자동 성능 상태 천이

Family Cites Families (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060168571A1 (en) * 2005-01-27 2006-07-27 International Business Machines Corporation System and method for optimized task scheduling in a heterogeneous data processing system
JP3938387B2 (ja) * 2005-08-10 2007-06-27 インターナショナル・ビジネス・マシーンズ・コーポレーション コンパイラ、制御方法、およびコンパイラ・プログラム
US7676483B2 (en) * 2005-09-26 2010-03-09 Sap Ag Executable task modeling systems and methods
JP2007133723A (ja) * 2005-11-11 2007-05-31 Hitachi Ltd マルチプロセッサ、タスクスケジューリング方法、及びコンパイラ
JP2008084009A (ja) * 2006-09-27 2008-04-10 Toshiba Corp マルチプロセッサシステム
US8544014B2 (en) * 2007-07-24 2013-09-24 Microsoft Corporation Scheduling threads in multi-core systems
US9424315B2 (en) * 2007-08-27 2016-08-23 Teradata Us, Inc. Methods and systems for run-time scheduling database operations that are executed in hardware
US8434085B2 (en) * 2008-05-09 2013-04-30 International Business Machines Corporation Scalable scheduling of tasks in heterogeneous systems
US8286198B2 (en) * 2008-06-06 2012-10-09 Apple Inc. Application programming interfaces for data parallel computing on multiple processors
US8250579B2 (en) * 2008-06-27 2012-08-21 Oracle America, Inc. Method for stage-based cost analysis for task scheduling
US20100156888A1 (en) * 2008-12-23 2010-06-24 Intel Corporation Adaptive mapping for heterogeneous processing systems
JP2011059777A (ja) * 2009-09-07 2011-03-24 Toshiba Corp タスクスケジューリング方法及びマルチコアシステム
FR2949876B1 (fr) * 2009-09-08 2016-04-29 Thales Sa Procede d'ordonnancement temps reel d'un ensemble de taches multi-trames non cycliques
JP5471400B2 (ja) * 2009-12-17 2014-04-16 富士通株式会社 ジョブ分析プログラム及び方法、並びにジョブ分析装置
US8549524B2 (en) * 2009-12-23 2013-10-01 Sap Ag Task scheduler for cooperative tasks and threads for multiprocessors and multicore systems
KR101651871B1 (ko) * 2009-12-28 2016-09-09 삼성전자주식회사 멀티코어 시스템 상에서 단위 작업을 할당하는 방법 및 그 장치
US9307048B2 (en) * 2010-12-28 2016-04-05 Microsoft Technology Licensing, Llc System and method for proactive task scheduling of a copy of outlier task in a computing environment
US8555281B1 (en) * 2011-02-16 2013-10-08 Google Inc. Scheduling of tasks based upon historical execution times
US8782645B2 (en) * 2011-05-11 2014-07-15 Advanced Micro Devices, Inc. Automatic load balancing for heterogeneous cores
KR101812583B1 (ko) * 2011-07-21 2018-01-30 삼성전자주식회사 태스크 할당 장치, 태스크 할당 방법 및 컴퓨터로 읽을 수 있는 저장 매체
US20130074088A1 (en) * 2011-09-19 2013-03-21 Timothy John Purcell Scheduling and management of compute tasks with different execution priority levels
US8732720B2 (en) * 2011-12-22 2014-05-20 Hewlett-Packard Development Company, L.P. Job scheduling based on map stage and reduce stage duration
US9262216B2 (en) * 2012-02-14 2016-02-16 Microsoft Technologies Licensing, LLC Computing cluster with latency control

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070116712A (ko) * 2006-06-06 2007-12-11 각코호진 와세다다이가쿠 헤테로지니어스 멀티프로세서용 글로벌 컴파일러
KR20110034653A (ko) * 2008-07-02 2011-04-05 고쿠리츠다이가쿠호진 토쿄고교 다이가꾸 실행시간 추정방법, 실행시간 추정 프로그램 및 실행시간 추정장치
KR20100018289A (ko) * 2008-08-06 2010-02-17 삼성전자주식회사 멀티 태스킹 성능 예측 방법 및 시스템
KR20110112791A (ko) * 2010-04-07 2011-10-13 애플 인크. 프로세서 슬리프 및 웨이크 이벤트들에 대한 시스템에서의 하드웨어 자동 성능 상태 천이

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115168016A (zh) * 2022-09-07 2022-10-11 浙江大华技术股份有限公司 任务调度方法及相关装置、芯片、器件和介质
CN115168016B (zh) * 2022-09-07 2022-12-06 浙江大华技术股份有限公司 任务调度方法及相关装置、芯片、器件和介质

Also Published As

Publication number Publication date
US20150067700A1 (en) 2015-03-05
KR20130115574A (ko) 2013-10-22
US10162671B2 (en) 2018-12-25

Similar Documents

Publication Publication Date Title
WO2013154365A1 (ko) 단말기에서 태스크 스케줄링을 수행하는 방법 및 장치
WO2019117593A1 (ko) 컨테이너 기반의 자원 할당을 지원하는 클라우드 컴퓨팅 장치 및 방법
WO2012033237A1 (ko) 시스템 테스트 방법
WO2014025145A1 (en) Method and apparatus for processing message between processors
WO2013133621A1 (ko) 이종의 운영체제를 사용하는 가상화 시스템의 전력 관리 방법 및 장치
WO2014104634A1 (en) System and method for dynamically expanding virtual cluster and recording medium on which program for executing the method is recorded
US20160328266A1 (en) Process grouping for improved cache and memory affinity
WO2014175636A1 (ko) 심드 구조 기반의 쓰레드 분기 관리 장치 및 방법
WO2013111975A1 (en) Resource allocation method and apparatus of gpu
US20130024589A1 (en) Multi-core processor system, computer product, and control method
WO2016195274A1 (en) Method for scheduling entity in multi-core processor system
JP5765423B2 (ja) マルチコアプロセッサシステム、およびスケジューリング方法
WO2013066124A1 (ko) 인터럽트 할당 방법 및 장치
WO2019212182A1 (en) Apparatus and method for managing a shareable resource in a multi-core processor
US20200159572A1 (en) Process scheduling
WO2014208909A1 (ko) 시뮬레이션 장치 및 분산 시뮬레이션 시스템
WO2013168947A1 (ko) 모니터링 자원의 사용량 표현 방법, 컴퓨팅 장치 및 그 방법을 실행시키기 위한 프로그램을 기록한 기록 매체
WO2017018860A1 (ko) 컴퓨팅 장치에서 캐시 플루딩 프로세스를 관리하기 위한 장치 및 방법
WO2014142498A1 (ko) 컴퓨팅 스케줄링 방법 및 시스템
EP2487590A2 (en) Processor, computational node, parallel computer system, and arithmetic processing method
Kocoloski et al. Varbench: An experimental framework to measure and characterize performance variability
WO2019103223A1 (ko) 데이터 입출력 포화 검출 장치 및 방법
US9141429B2 (en) Multicore processor system, computer product, and control method
WO2022138995A1 (ko) 하드웨어 가속기 제어 방법 및 장치
WO2022131525A1 (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: 13775107

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 14391860

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: 13775107

Country of ref document: EP

Kind code of ref document: A1