KR101651114B1 - Apparatus for balancing load - Google Patents

Apparatus for balancing load Download PDF

Info

Publication number
KR101651114B1
KR101651114B1 KR1020100014854A KR20100014854A KR101651114B1 KR 101651114 B1 KR101651114 B1 KR 101651114B1 KR 1020100014854 A KR1020100014854 A KR 1020100014854A KR 20100014854 A KR20100014854 A KR 20100014854A KR 101651114 B1 KR101651114 B1 KR 101651114B1
Authority
KR
South Korea
Prior art keywords
task
processor
load balancing
state
tasks
Prior art date
Application number
KR1020100014854A
Other languages
Korean (ko)
Other versions
KR20110095052A (en
Inventor
임근식
이주평
Original Assignee
삼성전자주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성전자주식회사 filed Critical 삼성전자주식회사
Priority to KR1020100014854A priority Critical patent/KR101651114B1/en
Publication of KR20110095052A publication Critical patent/KR20110095052A/en
Application granted granted Critical
Publication of KR101651114B1 publication Critical patent/KR101651114B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • 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

Abstract

불필요한 로드 밸런싱이 실행되지 않도록 할 수 있는 로드 밸런싱 장치가 개시된다. 본 발명의 일실시예에 따르면, 로드 밸런싱 장치는 대상 태스크를 검출하고, 검출된 대상 태스크의 상태에 따라 로드 밸런싱 실행 여부를 결정하고, 결정에 따라 로드 밸런싱을 실행한다. A load balancing apparatus capable of preventing unnecessary load balancing from being executed. According to one embodiment of the present invention, the load balancing apparatus detects a target task, determines whether to perform load balancing according to the state of the detected target task, and performs load balancing according to the determination.

Description

로드 밸런싱 장치{APPARATUS FOR BALANCING LOAD}{APPARATUS FOR BALANCING LOAD}

복수의 프로세서에 할당된 태스크 중 일부를 다른 프로세서로 이동시키는 로드 밸런싱 기술과 관련된다.To a load balancing technique that moves some of the tasks assigned to a plurality of processors to another processor.

최근 데이터의 양이 커짐에 따라, 하나의 프로세서가 대용량 데이터를 처리하지 못하는 경우가 발생하고 있다. 이를 해결하기 위해, 하나의 칩에 복수의 프로세서를 탑재하여 대용량 데이터를 처리하는 기술이 개발되었다. Recently, as the amount of data increases, a single processor may not be able to process large amounts of data. To solve this problem, a technique of processing a large amount of data by mounting a plurality of processors on one chip has been developed.

그러나, 프로세서의 개수가 증가하는 만큼 시스템의 성능이 비례하여 향상되지 못하고 있다. 이는, 모든 프로세서들에 태스크(task)들이 균등하게 분배되어 실행되는 것이 아니라 다른 프로세서에 비해 특정 프로세서에 더 많은 태스크가 할당되어 실행되는 로드 불균형(load imbalance)이 발생하기 때문이다. However, as the number of processors increases, the performance of the system does not improve proportionately. This is because a load imbalance occurs in which all tasks are not evenly distributed to all of the processors but are executed and allocated to a specific processor in comparison with other processors.

따라서, 이러한 로드 불균형을 해결하기 위해, 할당된 태스크를 균등하게 분배하는 로드 밸런싱에 대한 연구가 활발히 진행되고 있다.Therefore, in order to solve such a load imbalance, researches on load balancing that distributes allocated tasks equally are actively under way.

불필요한 로드 밸런싱이 실행되지 않도록 할 수 있는 로드 밸런싱 장치가 개시된다.A load balancing apparatus capable of preventing unnecessary load balancing from being executed.

본 발명의 일 실시예에 따른 로드 밸런싱 장치는 복수의 프로세서에 할당된 태스크 중 로드 밸런싱의 대상 태스크의 상태(status)에 따라 상기 로드 밸런싱의 실행 여부를 결정하는 결정부 및 결정에 따라 상기 로드 밸런싱을 실행하는 실행부를 포함한다.A load balancing apparatus according to an embodiment of the present invention includes a determination unit that determines whether to perform the load balancing according to a status of a task to be load balanced among tasks allocated to a plurality of processors, And an execution unit for executing the program.

여기서, 결정부는 대상 태스크의 상태가, 프로세서의 사용률을 임계값 미만으로 증가시키는 제 1 태스크 상태인 경우, 로드 밸런싱을 실행하도록 결정할 수 있다.Here, the determination unit may determine to perform load balancing if the state of the target task is the first task state that increases the utilization rate of the processor below the threshold value.

여기서, 결정부는 대상 태스크의 상태가, 프로세서의 사용률을 임계값 이상으로 증가시키는 제 2 태스크 상태인 경우, 로드 밸런싱을 실행하지 않도록 결정할 수 있다.Here, the determination unit can determine not to perform load balancing when the state of the target task is the second task state that increases the usage rate of the processor to a threshold value or more.

본 발명의 다른 실시예에 따른 로드 밸런싱 장치는 프로세서별 할당된 태스크 개수 및 프로세서별 사용률 중 적어도 하나를 이용하여 로드 밸런싱 여부를 결정하는 결정부 및 결정에 따라 상기 로드 밸런싱을 실행하는 실행부를 포함할 수 있다.The load balancing apparatus according to another embodiment of the present invention includes a determining unit for determining load balancing using at least one of the number of tasks allocated to each processor and the usage rate for each processor, and an execution unit for executing the load balancing according to the determination .

여기서, 결정부는 프로세서별 할당된 태스크 개수 중 적어도 하나가 기준 태스크 개수보다 큰 경우, 로드 밸런싱을 실행하지 않도록 결정할 수 있다.Here, the determination unit may decide not to perform load balancing when at least one of the number of tasks allocated per processor is larger than the reference task number.

여기서, 기준 태스크 개수는 태스크 실제 처리 시간, 태스크 한계 처리 시간 및 프로세서의 개수를 이용하여 계산될 수 있다.Here, the number of reference tasks can be calculated using the actual processing time of the task, the task limit processing time, and the number of processors.

여기서, 결정부는 프로세서별 사용률이 기준 사용률보다 작은 경우, 로드 밸런싱을 실행하지 않도록 결정할 수 있다.Here, the determination unit can decide not to perform load balancing when the utilization rate per processor is smaller than the reference utilization rate.

여기서, 결정부는 사용률이 유지되는 시간에 기초하여 상기 프로세서별 사용률을 변경할 수 있다.Here, the determination unit may change the usage rate for each processor based on the time at which the usage rate is maintained.

여기서, 결정부는 프로세서의 사용률이 기준 사용률보다 작은 경우, 사용률이 유지되는 시간에 기초하여 해당하는 프로세서의 사용률을 변경할 수 있다.Here, if the usage rate of the processor is smaller than the reference usage rate, the determination unit may change the usage rate of the corresponding processor based on the time when the usage rate is maintained.

여기서, 결정부는 프로세서별 할당된 태스크 개수가 기준 태스크 개수보다 작고, 프로세서별 사용률 중 적어도 하나가 기준 사용률보다 큰 경우, 로드 밸런싱을 실행하도록 결정할 수 있다.Here, the determination unit may determine to perform load balancing when the number of tasks allocated per processor is smaller than the number of reference tasks and at least one of the utilization ratios for each processor is greater than a reference utilization ratio.

개시된 내용에 따르면, 대상 태스크의 상태에 따라 로드 밸런싱을 실행함으로써, 불필요한 로드 밸런싱이 실행되지 않는다. According to the disclosed contents, unnecessary load balancing is not performed by executing load balancing according to the state of the target task.

도 1은 본 발명의 일 실시예와 관련된 로드 밸런싱 장치의 블록 구성도(block diagram)이다.
도 2는 본 발명의 일 실시예와 관련된 대상 태스크를 설명하기 위한 도면이다.
도 3은 본 발명의 일 실시예에 따른 태스크의 상태를 설명하기 위한 도면이다.
도 4는 본 발명의 다른 실시예에 따른 로드 밸런싱 장치를 설명하기 위한 도면이다.
도 5는 본 발명의 일 실시예에 따른 기준 사용률을 설명하기 위한 도면이다.
도 6은 본 발명의 일 실시예에 따른 로드 밸런싱 방법을 설명하기 위한 흐름도이다.
도 7은 본 발명의 다른 일 실시예에 따른 로드 밸런싱 방법을 설명하기 위한 흐름도이다.
1 is a block diagram of a load balancing apparatus according to an embodiment of the present invention.
2 is a diagram for explaining a target task related to an embodiment of the present invention.
3 is a diagram for explaining a state of a task according to an embodiment of the present invention.
4 is a view for explaining a load balancing apparatus according to another embodiment of the present invention.
5 is a view for explaining a reference utilization rate according to an embodiment of the present invention.
6 is a flowchart illustrating a load balancing method according to an embodiment of the present invention.
7 is a flowchart illustrating a load balancing method according to another embodiment of the present invention.

이하, 첨부된 도면을 참조하여 발명을 실시하기 위한 구체적인 내용에 대하여 상세하게 설명한다. Hereinafter, the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명의 일 실시예와 관련된 로드 밸런싱 장치의 블록 구성도(block diagram)이다.1 is a block diagram of a load balancing apparatus according to an embodiment of the present invention.

로드 밸런싱 장치(100)는 결정부(101) 및 실행부(102)를 포함한다. 또는, 로드 밸런싱을 실행할 태스크들이 할당된 적어도 하나의 프로세서(110, 120)를 더 포함할 수 있다. The load balancing apparatus 100 includes a determining unit 101 and an executing unit 102. [ Or at least one processor 110, 120 to which tasks for performing load balancing are assigned.

결정부(101)는 복수의 프로세서들(110, 120)에 할당된 태스크 중 로드 밸런싱을 실행할 대상 태스크의 상태(status)를 검출한다. 여기서, 대상 태스크란 로드 밸런싱에 의해 다른 프로세서의 큐로 옮겨질 후보 태스크를 의미한다. 그 다음, 결정부(101)는 대상 태스크의 상태에 따라 로드 밸런싱의 실행 여부를 결정한다. The determination unit 101 detects a status of a task to be load balanced among the tasks assigned to the plurality of processors 110 and 120. Here, the target task means a candidate task to be moved to a queue of another processor by load balancing. Then, the determination unit 101 determines whether to perform load balancing according to the state of the target task.

도 2는 본 발명의 일 실시예와 관련된 대상 태스크를 설명하기 위한 도면이다. 도 2를 참조하면, 제 1 프로세서(110)의 큐(queue)에는 태스크 1 및 태스크 2가 할당되어 있고, 제 2 프로세서(120)의 큐에는 태스크 3, 태스크 4, 태스크 5 및 태스크 6이 할당되어 있다. 현재, 제 2 프로세서(120)의 큐에 할당된 태스크가 제 1 프로세서(110)의 큐에 할당된 태스크보다 많기 때문에, 로드 밸런싱을 실행할 필요가 있다. 이때, 결정부(101)는 제 2 프로세서(120)에 할당된 태스크 중 제 1 프로세서(110)의 큐로 옮길 태스크('대상 태스크')를 선정할 수 있다. 예를 들면, 결정부(101)는 제 2 프로세서(120)의 큐에 할당된 태스크 중 태스크 6(200)을 대상 태스크로 선정할 수 있다. 2 is a diagram for explaining a target task related to an embodiment of the present invention. 2, task 1 and task 2 are allocated to a queue of the first processor 110, and tasks 3, 4, 5, and 6 are assigned to queues of the second processor 120 . Currently, there is a need to perform load balancing because the task assigned to the queue of the second processor 120 is larger than the task assigned to the queue of the first processor 110. [ At this time, the determining unit 101 may select a task ('target task') to be moved to the queue of the first processor 110 among the tasks assigned to the second processor 120. For example, the determination unit 101 may select the task 6 200 of the tasks assigned to the queue of the second processor 120 as the target task.

결정부(101)는 도 3에 도시된 태스크의 상태를 기준으로 대상 태스크의 상태를 판단할 수 있다.The determination unit 101 can determine the state of the target task based on the state of the task shown in Fig.

도 3은 본 발명의 일 실시예에 따른 태스크의 상태를 설명하기 위한 도면이다. 본 발명의 일 실시예에 따른 태스크의 상태는 새로운 태스크(new task) 상태, 아이들 태스크(idle task) 상태, 새로운 아이들 태스크(new idle task) 상태, 실행 태스크(running task) 상태 및 기타 태스크 상태로 구분될 수 있다. 새로운 태스크(new task) 상태는 태스크가 새롭게 생성된 상태를 의미한다. 아이들 태스크(idle task) 상태는 프로세서에 할당되기를 기다리는 상태를 의미하고, 아이들 태스크 중 우선 순위가 높은 순서대로 프로세서에 할당되게 된다. 새로운 아이들 태스크(new idle task) 상태는 입력/출력 인터럽트가 발생된 후, 입력/출력 완료 신호가 입력될 때까지 기다리는 상태를 의미한다. 예를 들면, 입력/출력 완료 신호가 입력되면, 새로운 아이들 태스크는 아이들 태스크로 천이 된다. 실행 태스크(running task) 상태는 태스크가 프로세서에 할당되어 프로세서에서 태스크가 처리되고 있는 상태를 의미한다. 기타 태스크 상태는 태스크의 실행이 종료되는 태스크가 포함될 수 있다. 본 실시예에서는 도 3을 기준으로 태스크의 상태를 설명하겠지만, 태스크의 상태는 사용자 등의 설정에 의해서 더 많은 태스크의 상태로 구분되거나 더 적은 태스크의 상태로 구분될 수 있다. 3 is a diagram for explaining a state of a task according to an embodiment of the present invention. The state of a task according to an exemplary embodiment of the present invention may include a new task state, an idle task state, a new idle task state, a running task state, Can be distinguished. The new task state means that the task is newly created. The idle task state indicates a state in which the task is waiting to be allocated to the processor, and the idle task is assigned to the processor in the order of priority among the idle tasks. The new idle task state means a state in which an input / output interrupt is generated and then an input / output completion signal is input. For example, when an input / output completion signal is input, the new idle task transitions to the idle task. A running task state means that a task is assigned to a processor and a task is being processed by the processor. Other task states may include tasks whose execution is terminated. Although the state of the task will be described with reference to Fig. 3 in the present embodiment, the state of the task can be divided into more tasks or divided into fewer tasks according to the setting of the user or the like.

결정부(101)는 대상 태스크의 상태에 따라, 로드 밸런싱을 실행할지 여부를 결정한다. 예를 들면, 대상 태스크의 상태가 제 1 태스크 상태인 경우, 결정부(101)는 로드 밸런싱을 실행하도록 결정한다. 여기서, 제 1 태스크 상태란 프로세서의 사용률을 0%부터 임계값 미만으로 증가시키는 상태를 의미한다. 태스크가 프로세서에 할당되어 실행되는 경우, 프로세서의 사용률이 증가하게 된다. 예를 들면, 프로세서의 사용률을 0%부터 20% 까지 증가시키는 태스크의 상태는 제 1 태스크 상태가 된다. 여기서, 임계값은 20%이다. 도 3을 참조하여 설명하면, 제 1 태스크 상태는 기타 태스크가 될 수 있다. 즉, 기타 태스크의 상태인 경우, 프로세서의 사용률이 20% 미만으로 증가하게 된다. 여기서, 태스크의 상태에 따라 프로세서의 사용률이 변화되는 범위는 실험을 통해 결정될 수 있다.The determination unit 101 determines whether to perform load balancing according to the state of the target task. For example, when the state of the target task is the first task state, the determination unit 101 determines to perform load balancing. Here, the first task state means a state in which the usage rate of the processor is increased from 0% to less than the threshold value. When a task is assigned to and executed by a processor, the utilization of the processor is increased. For example, the state of a task that increases the processor utilization from 0% to 20% is the first task state. Here, the threshold value is 20%. Referring to FIG. 3, the first task state may be another task. That is, in the case of other tasks, the usage rate of the processor increases to less than 20%. Here, the range in which the usage rate of the processor is changed according to the state of the task can be determined through experiments.

반면에, 결정부(101)는 대상 태스크의 상태가 제 2 태스크 상태인 경우, 결정부(101)는 로드 밸런싱을 실행하지 않도록 결정한다. 여기서, 제 2 태스크 상태란 프로세서의 사용률을 임계값 이상으로 증가시키는 상태를 의미한다. 예를 들면, 프로세서의 사용률을 20% 이상으로 증가시키는 태스크의 상태는 제 2 태스크 상태가 된다. 여기서, 임계값은 20%이다. 도 3을 참조하여 설명하면, 제 1 태스크 상태는 새로운 태스크(new task) 상태, 아이들 태스크(idle task) 상태, 새로운 아이들 태스크(new idle task) 상태, 실행 태스크(running task) 상태가 될 수 있다. 즉, 새로운 태스크(new task) 상태, 아이들 태스크(idle task) 상태, 새로운 아이들 태스크(new idle task) 상태, 실행 태스크(running task) 상태인 경우, 프로세서의 사용률이 20%이상으로 증가하게 된다.On the other hand, when the state of the target task is the second task state, the determination unit 101 determines not to perform load balancing. Here, the second task state means a state in which the use rate of the processor is increased to a threshold value or more. For example, the state of the task increasing the usage rate of the processor to 20% or more becomes the second task state. Here, the threshold value is 20%. 3, the first task state may be a new task state, an idle task state, a new idle task state, and a running task state . That is, in the case of a new task state, an idle task state, a new idle task state, and a running task state, the usage rate of the processor increases to 20% or more.

실행부(102)는 결정부(101)의 결정에 따라 로드 밸런싱을 실행한다. 예를 들면, 결정부(101)가 로드 밸런싱을 하지 않도록 결정한 경우, 실행부(102)는 대상 태스크를 다른 프로세서로 이동시키지 않는다. 반면에, 결정부(101)가 로드 밸런싱을 하도록 결정한 경우, 실행부(102)는 대상 태스크를 다른 프로세서로 이동시킨다.The execution unit 102 performs load balancing according to the determination of the determination unit 101. [ For example, when the determination unit 101 determines not to perform load balancing, the execution unit 102 does not move the target task to another processor. On the other hand, when the determination unit 101 determines to perform load balancing, the execution unit 102 moves the target task to another processor.

로드 밸런싱 장치는 대상 태스크의 상태에 따라 로드 밸런싱을 실행함으로써, 불필요한 로드 밸런싱을 줄여 시스템의 성능을 향상시킬 수 있다. Load balancing devices can perform load balancing according to the state of the target task, thereby reducing unnecessary load balancing and improving system performance.

도 4는 본 발명의 다른 실시예에 따른 로드 밸런싱 장치를 설명하기 위한 도면이다.4 is a view for explaining a load balancing apparatus according to another embodiment of the present invention.

로드 밸런싱 장치(400)는 결정부(401) 및 실행부(402)를 포함한다. 또는, 로드 밸런싱을 실행할 태스크들이 할당된 적어도 하나의 프로세서(410, 420)를 더 포함할 수 있다.The load balancing apparatus 400 includes a determination unit 401 and an execution unit 402. Or at least one processor 410, 420 to which tasks for performing load balancing are allocated.

결정부(401)는 프로세서별(410, 420) 할당된 태스크 개수 및 프로세서별 사용률 중 적어도 하나를 이용하여 로드 밸런싱 여부를 결정한다.The determining unit 401 determines whether or not the load balancing is performed using at least one of the number of tasks allocated to the processors 410 and 420 and the usage rates of the processors.

이하에서는, 결정부(401)가 프로세서별 할당된 태스크 개수를 이용하여 로드 밸런싱 여부를 결정하는 경우를 설명한다.Hereinafter, a case where the determination unit 401 determines load balancing using the number of tasks allocated for each processor will be described.

결정부(401)는 프로세서별 할당된 태스크 개수 중 적어도 하나가 기준 태스크 개수보다 큰 경우, 로드 밸런싱을 실행하지 않도록 결정한다. 다시 말하면, 기준 태스크 개수보다 큰 태스크 개수가 할당된 프로세서가 하나라도 있으며, 결정부(401)는 로드 밸런싱을 실행하지 않도록 결정한다.The determining unit 401 determines not to perform load balancing when at least one of the number of tasks allocated per processor is greater than the reference task number. In other words, there is at least one processor to which the number of tasks is larger than the reference task number, and the decision unit 401 decides not to perform load balancing.

여기서, 기준 태스크 개수는 이하의 수학식 1을 통해서 계산된다.Here, the number of reference tasks is calculated by the following equation (1).

Figure 112010010825180-pat00001
Figure 112010010825180-pat00001

여기서, n : 기준 태스크 개수Where n: the number of reference tasks

C : 태스크 실제 처리 시간        C: Actual processing time of task

T : 태스크 한계 처리 시간        T: Task limit processing time

m : 프로세서의 개수        m: Number of processors

태스크 실제 처리 시간은 프로세서에서 태스크를 처리하는데 걸리는 시간을 의미한다. 태스크 한계 처리 시간은 프로세서에서 태스크를 처리하는데 할당된 시간을 의미한다. 즉, 태스크 처리 시간이 태스크 한계 처리 시간을 넘는 경우, 프로세서는 태스크의 처리를 일시 중지하고 다른 태스크를 우선 처리하게 된다.The actual processing time of the task means the time it takes to process the task in the processor. Task limit processing time refers to the time allocated to process tasks in the processor. That is, when the task processing time exceeds the task limit processing time, the processor suspends the processing of the task and prioritizes another task.

예를 들면, 태스크 실제 처리 시간(C)이 300㎲이고, 태스크 한계 처리 시간이 10000㎲이고, 프로세서의 개수(m)은 4개인 경우, 수학식 1에 따라 기준 태스크 개수는 76개가 된다. 또는, 사용자의 설정에 따라, 기준 태스크 개수를 75개 또는 74개 등으로 설정할 수도 있다. 즉, 수학식 1에서 얻어진 태스크 개수에서 1개 또는 2개를 뺀 태스크 개수를 기준 태스크 개수로 설정할 수도 있다. For example, when the task actual processing time C is 300 占 퐏, the task limit processing time is 10000 占 퐏, and the number m of processors is 4, the number of reference tasks is 76 according to the equation (1). Alternatively, the number of reference tasks may be set to 75, 74, or the like, depending on the setting of the user. That is, the number of tasks obtained by subtracting one or two from the number of tasks obtained in Equation (1) may be set as the number of reference tasks.

결정부(401)는 프로세서별 할당된 태스크 개수 중 적어도 하나가 계산된 기준 태스크 개수보다 큰 경우, 로드 밸런싱을 실행하지 않도록 결정한다. 이하에서는, 기준 태스크 개수가 75개인 경우를 기준으로 설명한다. 예를 들면, 제 1 프로세서(410)에 할당된 태스크 개수가 80개이고, 제 2 프로세서(420)에 할당된 태스크 개수가 70개인 경우, 결정부(401)는 제 1 프로세서(410)에 할당된 태스크 개수가 기준 태스크 개수보다 크므로, 로드 밸런싱을 실행하지 않도록 결정한다. The determination unit 401 determines not to perform load balancing when at least one of the number of tasks allocated per processor is larger than the calculated number of reference tasks. Hereinafter, the case where the number of reference tasks is 75 will be described as a reference. For example, when the number of tasks allocated to the first processor 410 is 80 and the number of tasks allocated to the second processor 420 is 70, the determining unit 401 determines whether the number of tasks allocated to the first processor 410 Since the number of tasks is larger than the number of reference tasks, it is decided not to perform load balancing.

또 다른 예를 들면, 제 1 프로세서(410)에 할당된 태스크 개수가 72개이고, 제 2 프로세서(420)에 할당된 태스크 개수가 70개인 경우, 결정부(410)는 제 1 프로세서(410) 및 제 2 프로세서(420)에 할당된 태스크가 기준 태스크 개수보다 작으므로, 로드 밸런싱을 실행하도록 결정한다.In another example, when the number of tasks allocated to the first processor 410 is 72 and the number of tasks allocated to the second processor 420 is 70, the determination unit 410 determines the number of tasks allocated to the first processor 410 and the second processor 420, Since the task assigned to the second processor 420 is smaller than the reference task number, it is determined to perform load balancing.

이하에서는, 결정부(401)가 프로세서별 사용률을 이용하여 로드 밸런싱 여부를 결정하는 경우를 설명한다.Hereinafter, a case where the determination unit 401 determines whether or not load balancing is to be performed using a processor-specific usage rate will be described.

예를 들면, 결정부(401)는 프로세서별 사용률 중 적어도 하나가 기준 사용률보다 큰 경우, 로드 밸런싱을 실행하도록 결정한다. 여기서, 기준 사용률이란 로드 밸런싱을 실행할지 여부의 기준이 되는 사용률로써, 사용자 등에 의해서 설정될 수 있다. 기준 사용률이 80%이고, 제 1 프로세서(410)의 사용률이 85%이고, 제 2 프로세서(420)의 사용률이 70%인 경우, 결정부(410)는 제 1 프로세서(410)의 사용률이 기준 사용률보다 크므로, 로드 밸런싱을 실행하도록 결정한다.For example, the determination unit 401 determines to perform load balancing if at least one of the utilization ratios per processor is larger than the reference utilization ratios. Here, the reference utilization rate is a utilization rate that is a reference for whether load balancing is to be executed or not, and can be set by a user or the like. If the usage rate of the first processor 410 is 80%, the usage rate of the first processor 410 is 85%, and the usage rate of the second processor 420 is 70% Since it is larger than the usage rate, it is decided to perform load balancing.

도 5는 본 발명의 일 실시예에 따른 기준 사용률을 설명하기 위한 도면이다.5 is a view for explaining a reference utilization rate according to an embodiment of the present invention.

도 5를 참조하면, 프로세서의 사용률을 제 1 영역, 제 2 영역 및 제 3 영역으로 구분할 수 있다. Referring to FIG. 5, the usage rate of the processor can be divided into a first area, a second area, and a third area.

프로세서의 사용률이 제 1 영역에 해당하는 경우, 결정부(401)는 로드 밸런싱이 실행되도록 결정한다. 제 1 영역과 제 2 영역은 기준 사용률(500)을 기준으로 구분된다. If the utilization rate of the processor corresponds to the first area, the determination unit 401 determines that load balancing is to be executed. The first area and the second area are classified based on the reference use rate (500).

프로세서의 사용률이 제 2 영역에 해당하는 경우, 결정부(401)는 로드 밸런싱이 실행되지 않도록 결정한다. 다만, 제 2 영역을 2-1 영역, 2-2 영역, 2-3 영역 및 2-4 영역으로 구분한 후, 결정부(401)는 사용률이 유지되는 시간에 기초하여 프로세서의 사용률을 변경할 수 있다. 예를 들면, 프로세서의 사용률이 2-4 영역에서 3초 이상 유지되는 경우, 결정부(401)는 프로세서의 사용률을 2-4 영역에서 제 3 영역으로 변경할 수 있다. 본 실시예에서는 제 2 영역을 기준으로 설명하였지만, 다른 영역에서도 사용률을 가중치에 따라 변경하는 방법이 적용될 수 있다. 프로세서 사용률이 제 3 영역에 해당 되기 전에 로드 밸런싱을 미리 실행함으로써, 태스크가 프로세서들에 균등하게 분배될 수 있다. When the utilization rate of the processor corresponds to the second area, the determination unit 401 determines that load balancing is not performed. However, after dividing the second area into 2-1 area, 2-2 area, 2-3 area and 2-4 area, the determining part 401 can change the usage rate of the processor based on the time when the usage rate is maintained have. For example, when the occupancy rate of the processor is maintained in the 2-4 region for 3 seconds or longer, the determination unit 401 can change the occupancy rate of the processor from the 2-4 region to the third region. Although the second embodiment has been described with reference to the second area, a method of changing the usage rate according to the weight may be applied to other areas as well. By performing load balancing in advance before the processor utilization reaches the third area, the task can be evenly distributed to the processors.

프로세서의 사용률이 제 3 영역에 해당하는 경우, 결정부(401)는 로드 밸런싱이 실행되지 않도록 결정한다. 즉, 제 3 영역은 로드 밸런싱을 실행할 필요가 없는 영역이다.When the utilization rate of the processor corresponds to the third area, the determination unit 401 determines that load balancing is not performed. That is, the third area is an area in which load balancing need not be performed.

이하에서는, 결정부(401)가 프로세서별 할당된 태스크 개수 및 프로세서별 사용률을 이용하여 로드 밸런싱 여부를 결정하는 경우를 설명한다. Hereinafter, a case where the determination unit 401 determines load balancing using the number of tasks allocated to each processor and the usage rate for each processor will be described.

예를 들면, 결정부(401)는 프로세서별 할당된 태스크 개수가 기준 태스크 개수보다 작고, 프로세서별 사용률 중 적어도 하나가 기준 사용률보다 큰 경우, 로드 밸런싱을 실행하도록 결정한다. 이하에서는, 기준 사용률이 80%이고, 제 1 프로세서(410)의 사용률이 85%이고, 제 2 프로세서(420)의 사용률이 70%이고, 기준 태스크 개수가 75이고, 제 1 프로세서(410)에 할당된 태스크 개수가 73개이고, 제 2 프로세서(420)에 할당된 태스크 개수가 70개인 경우를 기준으로 설명하겠다. 결정부(401)는 제 1 프로세서(410) 및 제 2 프로세서(420)의 태스크 개수가 기준 태그 개수보다 작고, 제 1 프로세서(410)의 사용률이 기준 사용률보다 크기 때문에, 로드 밸런싱을 실행하도록 결정한다. 이 경우 외에는, 결정부(401)는 로드 밸런싱을 실행하지 않도록 결정한다.For example, the determination unit 401 determines to perform load balancing when the number of tasks allocated per processor is smaller than the number of reference tasks and at least one of the utilization ratios for each processor is larger than the reference utilization ratio. Hereinafter, it is assumed that the reference usage rate is 80%, the first processor 410 is used 85%, the second processor 420 is used 70%, the reference task number is 75, and the first processor 410 The case where the number of allocated tasks is 73 and the number of tasks allocated to the second processor 420 is 70 will be described. The determination unit 401 determines that load balancing is to be executed because the number of tasks of the first processor 410 and the second processor 420 is smaller than the number of reference tags and the utilization rate of the first processor 410 is larger than the reference utilization rate do. Otherwise, the determination unit 401 determines not to perform load balancing.

로드 밸런싱 장치는 프로세서의 사용률 및 프로세서의 태스크 개수를 이용하여 로드 밸런싱 실행 여부를 결정함으로써, 불필요한 로드 밸런싱을 줄여 시스템의 성능을 향상시킬 수 있다. Load balancing devices use processor utilization and the number of processor tasks to determine whether to perform load balancing, thereby reducing unnecessary load balancing and improving system performance.

또 따른 실시예로, 도 1 및 도 4에 기재된 로드 밸런싱 장치는 하나의 장치로 구현될 수도 있다. 예를 들면 도 1에 기재된 로드 밸런싱 장치(100)를 이용하여, 로드 밸런싱을 실행할지 여부를 예비적으로 판단한 후, 도 4에 기재된 로드 밸런싱 장치(100)를 이용하여, 최종적으로 로드 밸런싱을 실행할지 여부를 판단할 수 있다. 다만, 로드 밸런싱 장치(100)에서 로드 밸런싱을 실행하도록 결정한 경우에만, 로드 밸런싱 장치(400)를 이용하여 최종적으로 판단한다. 즉, 로드 밸런싱 장치(100)에서 로드 밸런싱을 실행하지 않도록 결정한 경우, 로드 밸런싱 장치(400)는 실행되지 않는다.In yet another embodiment, the load balancing device described in Figures 1 and 4 may be implemented as a single device. For example, the load balancing apparatus 100 shown in Fig. 1 is used to preliminarily determine whether or not to perform load balancing, and finally, the load balancing is performed using the load balancing apparatus 100 shown in Fig. 4 Or not. However, only when the load balancing apparatus 100 determines to perform load balancing, the load balancing apparatus 400 finally makes a determination. That is, when the load balancing apparatus 100 determines not to perform load balancing, the load balancing apparatus 400 is not executed.

구체적인 예를 들면, 도 1에 기재된 로드 밸런싱 장치(100)에서 로드 밸런싱을 실행하도록 예비적으로 판단한 후, 도 4에 기재된 로드 밸런싱 장치(400)에서 로드 밸런싱을 실행하지 않도록 판단한 경우, 최종적으로 로드 밸런싱을 실행하지 않는다. 이 경우에는, 로드 밸런싱 장치(400)에서 결정된 로드 밸런싱 실행 여부에 대한 판단이 우선된다. For example, if the load balancing apparatus 100 described in FIG. 1 preliminarily determines that load balancing is to be executed, and then determines not to perform load balancing in the load balancing apparatus 400 shown in FIG. 4, Do not perform balancing. In this case, the determination as to whether or not the load balancing is determined by the load balancing apparatus 400 is given priority.

도 6은 본 발명의 일 실시예에 따른 로드 밸런싱 방법을 설명하기 위한 흐름도이다.6 is a flowchart illustrating a load balancing method according to an embodiment of the present invention.

도 6을 참조하면, 결정부는 정해진 시간마다, 로드 불균형(load imbalance)이 발생하였는지 여부를 판단한다(600). 로드 불균형이 발생한 경우, 결정부는 복수의 프로세서에 할당된 태스크 중 다른 프로세서로 이동(migration)시킬 대상 태스크를 선택한다(610). 결정부는 대상 태스크의 상태를 검출한다(620). 결정부는 검출된 대상 태스크의 상태(status)에 따라, 로드 밸런싱의 실행 여부를 결정한다(630). 대상 태스크의 상태가 제 1 태스크 상태인 경우, 결정부는 로드 밸런싱을 실행하도록 결정한다(640). 반면에, 대상 태스크의 상태가 제 2 태스크 상태인 경우, 결정부는 로드 밸런싱을 실행하지 않도록 결정한다(650). 실행부는 결정부의 결정 결과에 따라 로드 밸런싱을 실행한다. 제 1 태스크 상태란 프로세서의 사용률을 임계값 이하로 증가시키는 상태를 의미한다. 제 2 태스크 상태란 프로세서의 사용률을 임계값 이상으로 증가시키는 상태를 의미한다.Referring to FIG. 6, the determination unit determines whether a load imbalance has occurred at a predetermined time (600). When load unbalance occurs, the determination unit selects a task to be migrated to another processor among the tasks assigned to the plurality of processors (610). The determination unit detects the state of the target task (620). The determining unit determines whether to perform load balancing according to the detected status of the target task (630). If the state of the target task is the first task state, the determination unit 640 determines to perform load balancing. On the other hand, when the state of the target task is the second task state, the determination unit determines not to perform the load balancing (650). The execution unit executes load balancing according to the determination result of the decision unit. The first task state means a state in which the usage rate of the processor is increased below a threshold value. The second task state means a state in which the usage rate of the processor is increased to a threshold value or more.

도 7은 본 발명의 또 다른 일 실시예에 따른 로드 밸런싱 방법을 설명하기 위한 흐름도이다.7 is a flowchart illustrating a load balancing method according to another embodiment of the present invention.

결정부는 프로세서별 할당된 태스크 개수를 검출한다(700). 또한, 결정부는 프로세서별 사용률을 검출한다(710). 결정부는 프로세서별 할당된 태스크 개수 및 프로세서별 사용률 중 적어도 하나를 이용하여 로드 밸런싱을 실행할지 여부를 결정한다(720). 예를 들면, 결정부(401)는 프로세서별 사용률 중 적어도 하나가 기준 사용률보다 큰 경우('제 1 조건'), 로드 밸런싱을 실행하도록 결정한다(730). 또 다른 예를 들면, 결정부(401)는 프로세서별 할당된 태스크 개수가 기준 태스크 개수보다 작고, 프로세서별 사용률 중 적어도 하나가 기준 사용률보다 큰 경우('제 1 조건), 로드 밸런싱을 실행하도록 결정한다(730). 또 다른 예를 들면, 결정부(401)는 프로세서별 할당된 태스크 개수 중 적어도 하나가 기준 태스크 개수보다 큰 경우('제 2 조건'), 로드 밸런싱을 실행하지 않도록 결정한다(740).The determination unit detects the number of tasks allocated per processor (700). In addition, the determination unit detects the usage rate per processor (710). The determination unit determines whether to perform load balancing using at least one of the number of tasks allocated per processor and the usage rate per processor (720). For example, the determining unit 401 determines (730) if load balancing is to be performed when at least one of the utilization ratios per processor is greater than the reference utilization ratios ('first condition'). In another example, when the number of tasks allocated to each processor is smaller than the number of reference tasks and at least one of the usage ratios for each processor is larger than the reference usage rate ('first condition'), the determination unit 401 determines to perform load balancing (730). In another example, the determining unit 401 determines 740 that the load balancing should not be executed when at least one of the number of tasks allocated to each processor is larger than the reference task number (the 'second condition').

설명된 실시예들은 다양한 변형이 이루어질 수 있도록 각 실시예들의 전부 또는 일부가 선택적으로 조합되어 구성될 수도 있다.The embodiments described may be constructed by selectively combining all or a part of each embodiment so that various modifications can be made.

또한, 실시예는 그 설명을 위한 것이며, 그 제한을 위한 것이 아님을 주의하여야 한다. 또한, 본 발명의 기술분야의 통상의 전문가라면 본 발명의 기술사상의 범위에서 다양한 실시예가 가능함을 이해할 수 있을 것이다.It should also be noted that the embodiments are for explanation purposes only, and not for the purpose of limitation. In addition, it will be understood by those of ordinary skill in the art that various embodiments are possible within the scope of the technical idea of the present invention.

또한, 본 발명의 일실시예에 의하면, 전술한 방법은, 프로그램이 기록된 매체에 프로세서가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 프로세서가 읽을 수 있는 매체의 예로는, ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광 데이터 저장장치 등이 있으며, 캐리어 웨이브(예를 들어, 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다.Further, according to an embodiment of the present invention, the above-described method can be implemented as a code that can be read by a processor on a medium on which the program is recorded. Examples of the medium that can be read by the processor include ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage, etc., and may be implemented in the form of a carrier wave (e.g., transmission over the Internet) .

Claims (10)

삭제delete 삭제delete 삭제delete 복수의 프로세서에 할당된 태스크 중 로드 밸런싱의 대상 태스크의 상태(status)에 따라 상기 로드 밸런싱의 실행 여부를 예비 결정하고, 프로세서별 할당된 태스크 개수 및 프로세서별 사용률 중 적어도 하나를 이용하여 로드 밸런싱 여부를 최종 결정하는 결정부; 및
상기 최종 결정에 따라 상기 로드 밸런싱을 실행하는 실행부를 포함하고,
상기 결정부는,
상기 대상 태스크의 상태가 프로세서의 사용률을 임계값 미만으로 증가시키는 제 1 태스크 상태인 경우 로드 밸런싱을 실행하도록 예비 결정하고, 상기 대상 태스크의 상태가 프로세서의 사용률을 임계값 이상으로 증가시키는 제 2 태스크 상태인 경우 로드 밸런싱을 실행하지 않도록 예비 결정하며,
상기 제 1 태스크 상태는 태스크가 새롭게 생성된 새로운 태스크 상태, 프로세서에 할당되기를 기다리는 아이들 태스크 상태, 입출력 인터럽트가 발생된 후, 입출력 완료 신호가 입력될 때까지 기다리는 새로운 아이들 태스크 및 프로세서에 할당되어 프로세서에서 태스크가 처리되고 있는 실행 태스크 상태 중 적어도 하나의 상태를 포함하고, 상기 제 2 태스크 상태는 태스크의 실행이 종료되는 기타 태스크 상태를 포함하는, 로드 밸런싱 장치.
Balancing is performed in accordance with the status of the load balancing task among the tasks allocated to the plurality of processors, and the load balancing is determined by using at least one of the number of tasks allocated to each processor and the usage rate per processor A decision unit for finally determining And
And an execution unit for executing the load balancing according to the final determination,
Wherein,
Wherein the processor is configured to perform load balancing if the state of the target task is a first task state that increases a usage rate of the processor to less than a threshold value and if the state of the target task increases a usage rate of the processor to a threshold value or more, Preliminarily decides not to perform load balancing in the state,
The first task state includes a new task state in which the task is newly created, an idle task state waiting to be allocated to the processor, a new idle task waiting to input the input / output completion signal after the input / output interrupt occurs, Wherein the second task state includes at least one of an execution task state in which the task is being processed, and the second task state includes other task state in which the execution of the task is terminated.
제 4 항에 있어서,
상기 결정부는,
상기 프로세서별 할당된 태스크 개수 중 적어도 하나가 기준 태스크 개수보다 큰 경우, 로드 밸런싱을 실행하지 않도록 최종 결정하는 로드 밸런싱 장치.
5. The method of claim 4,
Wherein,
And finally determines not to perform load balancing when at least one of the number of tasks allocated to each processor is greater than a reference task number.
제 5 항에 있어서,
상기 기준 태스크 개수는,
태스크 실제 처리 시간, 태스크 한계 처리 시간 및 프로세서의 개수를 이용하여 계산된 로드 밸런싱 장치.
6. The method of claim 5,
The number of reference tasks,
Task Load balancing device calculated using actual process time, task limit process time, and number of processors.
제 4 항에 있어서,
상기 결정부는,
상기 프로세서별 사용률이 기준 사용률보다 작은 경우, 로드 밸런싱을 실행하지 않도록 최종 결정하는 로드 밸런싱 장치.
5. The method of claim 4,
Wherein,
And finally determines not to perform load balancing when the per-processor utilization rate is smaller than the reference utilization rate.
제 4 항에 있어서,
상기 결정부는,
사용률이 유지되는 시간에 기초하여 상기 프로세서별 사용률을 변경하는 로드 밸런싱 장치.
5. The method of claim 4,
Wherein,
And changes the usage rate per processor based on a time when the utilization rate is maintained.
제 8 항에 있어서,
상기 결정부는,
프로세서의 사용률이 기준 사용률보다 작은 경우, 사용률이 유지되는 시간에 기초하여 해당하는 프로세서의 사용률을 변경하는 로드 밸런싱 장치.
9. The method of claim 8,
Wherein,
A load balancing device that alters the utilization of a corresponding processor based on the time the utilization is maintained when the utilization of the processor is less than a reference utilization.
제 4 항에 있어서,
상기 결정부는,
상기 프로세서별 할당된 태스크 개수가 기준 태스크 개수보다 작고,
상기 프로세서별 사용률 중 적어도 하나가 기준 사용률보다 큰 경우, 로드 밸런싱을 실행하도록 최종 결정하는 로드 밸런싱 장치.
5. The method of claim 4,
Wherein,
The number of tasks allocated to each processor is smaller than the number of reference tasks,
And if the at least one of the processor-specific utilization ratios is greater than a reference utilization ratio, the load balancing apparatus finally determines to perform load balancing.
KR1020100014854A 2010-02-18 2010-02-18 Apparatus for balancing load KR101651114B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020100014854A KR101651114B1 (en) 2010-02-18 2010-02-18 Apparatus for balancing load

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020100014854A KR101651114B1 (en) 2010-02-18 2010-02-18 Apparatus for balancing load

Publications (2)

Publication Number Publication Date
KR20110095052A KR20110095052A (en) 2011-08-24
KR101651114B1 true KR101651114B1 (en) 2016-09-05

Family

ID=44930961

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020100014854A KR101651114B1 (en) 2010-02-18 2010-02-18 Apparatus for balancing load

Country Status (1)

Country Link
KR (1) KR101651114B1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050155032A1 (en) 2004-01-12 2005-07-14 Schantz John L. Dynamic load balancing
US20060095909A1 (en) * 2004-11-01 2006-05-04 Norton Scott J Adaptive cooperative scheduling

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7565653B2 (en) * 2004-02-20 2009-07-21 Sony Computer Entertainment Inc. Methods and apparatus for processor task migration in a multi-processor system
KR101286700B1 (en) * 2006-11-06 2013-07-16 삼성전자주식회사 Apparatus and method for load balancing in multi core processor system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050155032A1 (en) 2004-01-12 2005-07-14 Schantz John L. Dynamic load balancing
US20060095909A1 (en) * 2004-11-01 2006-05-04 Norton Scott J Adaptive cooperative scheduling

Also Published As

Publication number Publication date
KR20110095052A (en) 2011-08-24

Similar Documents

Publication Publication Date Title
US9519499B2 (en) Method for dispatching central processing unit of hotspot domain virtual machine and virtual machine system
US11431788B2 (en) Pairwise comparison and migration of workloads for load balancing
EP2466460B1 (en) Compiling apparatus and method for a multicore device
US7007276B1 (en) Method, system and program products for managing groups of partitions of a computing environment
US7281075B2 (en) Virtualization of a global interrupt queue
US9785481B2 (en) Power aware task scheduling on multi-processor systems
JP3672236B2 (en) Method, system, and program product for managing a central processing unit in a computer environment
US20140082202A1 (en) Method and Apparatus for Integration of Virtual Cluster and Virtual Cluster System
KR101622168B1 (en) Realtime scheduling method and central processing unit based on the same
US20140372723A1 (en) Dynamically optimizing memory allocation across virtual machines
US9424105B2 (en) Preempting tasks at a preemption point of a kernel service routine based on current execution mode
JP2001147824A (en) Method and system for managing logical processor of computer environment and program product
JP2001142854A (en) Processing of channel subsystem holding input/output work queue based on priority
US10620959B2 (en) Optimized multi-processor instruction scheduler
CN107797853B (en) Task scheduling method and device and multi-core processor
JP2009116380A (en) Virtual server movement controller, virtual server movement control method and program
US20120054762A1 (en) Scheduling apparatus and method for a multicore device
CN112162835A (en) Scheduling optimization method for real-time tasks in heterogeneous cloud environment
CN107624181B (en) Virtual machine management method and apparatus including idling and scheduling of virtual processors
US9983911B2 (en) Analysis controller, analysis control method and computer-readable medium
CN109656714A (en) A kind of GPU resource dispatching method virtualizing video card
KR101651114B1 (en) Apparatus for balancing load
CN115470006A (en) Load balancing method based on microkernel
CN108268310B (en) Method and device for determining minimum scheduling granularity
Rezki et al. Doing big. LITTLE right: little and big obstacles

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
AMND Amendment
E601 Decision to refuse application
AMND Amendment
X701 Decision to grant (after re-examination)
GRNT Written decision to grant