CN107656813A - The method, apparatus and terminal of a kind of load dispatch - Google Patents

The method, apparatus and terminal of a kind of load dispatch Download PDF

Info

Publication number
CN107656813A
CN107656813A CN201710910618.5A CN201710910618A CN107656813A CN 107656813 A CN107656813 A CN 107656813A CN 201710910618 A CN201710910618 A CN 201710910618A CN 107656813 A CN107656813 A CN 107656813A
Authority
CN
China
Prior art keywords
task
processor core
untreated
scheduling
processor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710910618.5A
Other languages
Chinese (zh)
Inventor
吴鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai United Imaging Healthcare Co Ltd
Original Assignee
Shanghai United Imaging Healthcare Co Ltd
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 Shanghai United Imaging Healthcare Co Ltd filed Critical Shanghai United Imaging Healthcare Co Ltd
Priority to CN201710910618.5A priority Critical patent/CN107656813A/en
Publication of CN107656813A publication Critical patent/CN107656813A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching

Abstract

The embodiments of the invention provide a kind of method, apparatus of load dispatch and terminal, it is related to the communications field, processor core can be made full use of, reduces the duration of the processing task of processor.This method includes:First, obtain each processor core task line up in untreated task quantity;The quantity of untreated task is compared with pre-set threshold value during the task of each processor core is lined up;The quantity of untreated task is less than or equal to the processor core of pre-set threshold value in processor core being present of the task is lined up, and when the quantity of processor core being present of the task untreated task in lining up is more than the processor core of pre-set threshold value, determine the quantity of the task of each processor core average untreated task in lining up;Next, the quantity of untreated task is compared with the quantity of average untreated task during the task of each processor core is lined up;So as to which the task of first processor core is lined up into the untreated task scheduling in middle part into the task queue of second processor core.

Description

The method, apparatus and terminal of a kind of load dispatch
【Technical field】
The present invention relates to the method, apparatus and terminal of communication technical field, more particularly to a kind of load dispatch.
【Background technology】
In the process of reconstruction of MR (Magnetic Resonance, nuclear magnetic resonance) image, the amount of calculation ratio of image reconstruction Larger, especially matrix operation task is in occupation of the significant portion in the process of reconstruction of whole image, when causing the reconstruction of image Between it is long.During MR view data is rebuild, by being scheduled to processor task to be processed, to reduce image procossing During the stand-by period.
The method that load dispatch of the prior art has two kinds of processing.A kind of is to need first to obtain pending all tasks Data, it is that each pending task data is sequentially allocated processor core according to specified order.The method of this scheduling, eventually End performs the time length of scheduling, the overall time length of processor processing task.And the mode of another scheduling, obtain in processor The utilization rate information and frequency information of each processor core, meet that this is run for operation process configuration frequency to be configured Condition and the minimum processor core of utilization rate.The method terminal of this scheduling can only be realized to the process of unallocated processors core Scheduling.Because the processing speed of each core of processor is different, for the fast processor core of processing speed, when it has soon been handled During the task of distribution, the possible remaining substantial amounts of task of the slow processor core of other processing speeds is also untreated, causes processing speed There is longer free time in fast processor core, insufficient so as to be utilized to processor core, cause processor processing task Overall time is grown.
【The content of the invention】
In view of this, the embodiments of the invention provide a kind of method, apparatus of load dispatch and terminal, can reduce each The free time of processor core, each processor core is made full use of, reduce the overall duration of processor processing task.
On the one hand, the embodiments of the invention provide a kind of method of load dispatch, methods described to include:
Obtain each processor core task line up in untreated task quantity;
The quantity of untreated task is compared with pre-set threshold value during the task of each processor core is lined up;
The quantity of untreated task is less than or equal to the processor of pre-set threshold value in processor core being present of the task is lined up Core, and processor core being present of the task line up in untreated task quantity be more than pre-set threshold value processor core when, it is determined that The quantity of the task of each processor core average untreated task in lining up;
The quantity of the quantity of untreated task and average untreated task during the task of each processor core is lined up Compare;
The task of first processor core is lined up into the untreated task scheduling in middle part into second processor core;
Wherein, the first processor core is the quantity of untreated task beyond the place of the average untreated task quantity Manage device core;The second processor core is processor core of the quantity without departing from averagely untreated task quantity of untreated task.
Method as described above and any possible implementation, it is further provided a kind of implementation, it is described by first The task queue that the task of reason device core lines up middle part untreated task scheduling to second processor core includes:
The task of first processor core is lined up into the untreated task scheduling in middle part to untreated task quantity less than default In the second processor core of threshold value.
Method as described above and any possible implementation, it is further provided a kind of implementation, it is described by first The task queue that the task of reason device core lines up middle part untreated task scheduling to second processor core includes:
Detect resource occupation amount in each second processor core;
According to the order of the resource occupation amount from low to high to the second processor nuclear arrangement, to obtain first row Sequence;
According to the described first sequence, the untreated task in part in first processor core is dispatched to second processor successively In core.
Method as described above and any possible implementation, it is further provided a kind of implementation, obtained respectively described Before the quantity of the individual untreated task of processor core, methods described also includes:
Task is created for each processor core to line up;
Obtain institute's pending processing task;
The pending task is evenly distributed to during the task lines up.
Method as described above and any possible implementation, it is further provided a kind of implementation, obtained respectively described Before the quantity of the individual untreated task of processor core, methods described also includes:
Establishment and the same number of matrix operation thread of the processor core,
The matrix operation thread is distributed in each processor core so that the matrix operation thread with it is described Task lines up one-to-one relationship be present.
Method as described above and any possible implementation, it is further provided a kind of implementation, the acquisition are each The task of processor core in lining up the quantity of untreated task include:
The quantity of untreated task in being lined up according to the task of the scheduling thread of processor detection each processor core.
Method as described above and any possible implementation, it is further provided a kind of implementation, handled by first After the task of device core lines up the untreated task scheduling in middle part into the task queue of second processor core, in addition to:
Judge scheduling after each task line up in untreated task quantity whether both less than or equal to pre-set threshold value;
When it is determined that each task after scheduling lines up untreated task quantity both less than or during equal to pre-set threshold value, scheduling Thread stops scheduling;
When it is determined that appointed task be present and line up untreated task quantity and be more than pre-set threshold value, task scheduling is performed.
On the other hand, the embodiments of the invention provide also a kind of device of load dispatch, described device to include:
First acquisition unit, the quantity of untreated task during the task for obtaining each processor core is lined up;
First comparing unit, the quantity for untreated task during the task of each processor core is lined up is with presetting Threshold values compares;
Determining unit, the quantity for untreated task in lining up when processor core being present of the task are less than or equal to default The processor core of threshold values, and processor core being present of the task line up in untreated task quantity be more than pre-set threshold value processing During device core, the quantity of the task of each processor core average untreated task in lining up is determined;
Second unit, the quantity for untreated task during the task of each processor core is lined up are not located with average The quantity of reason task compares;
Scheduling unit, for the task of first processor core to be lined up into the untreated task scheduling in middle part to second processor In the task queue of core;
Wherein, the first processor core is the quantity of untreated task beyond the place of the average untreated task quantity Manage device core;The second processor core is processor core of the quantity without departing from averagely untreated task quantity of untreated task.
Method as described above and any possible implementation, it is further provided a kind of implementation, described device are also wrapped Include:
Judging unit, for judge scheduling after each task line up in untreated task quantity whether both less than or wait In pre-set threshold value;
End unit, line up untreated task quantity both less than or equal to pre- for each task after determining to dispatch If during threshold values, scheduling thread stops scheduling;
Execution unit, for when it is determined that appointed task be present and line up untreated task quantity and be more than pre-set threshold value, holding Row task scheduling.
Another aspect, the embodiment of the present invention additionally provide a kind of terminal, the terminal include the terminal include processor, Memory and input-output equipment, the processor, memory and input/output interface are communicated by bus;The storage Computer instruction is configured with device, the processor can call the instruction with control input output interface;
When the computer instruction is by the computing device so that the terminal realizes the side described in any of the above-described Method.
The method, apparatus and terminal of a kind of load dispatch provided in an embodiment of the present invention, when in processor exist some at Untreated number of tasks is when being less than or equal to pre-set threshold value in reason device core, and terminal is by the big processor core of untreated task quantity In untreated task scheduling into other untreated less processor cores of task quantity so that respectively being handled in processor Untreated task quantity keeps balancing to a certain extent in device core, and then reduces the free time of each processor core, fills Divide and utilize each processor core, reduce the overall duration of the processing task of processor.
【Brief description of the drawings】
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by embodiment it is required use it is attached Figure is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for this area For those of ordinary skill, on the premise of not paying creative work, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of method flow diagram of load dispatch provided in an embodiment of the present invention;
Fig. 2 is the method flow diagram of another load dispatch provided in an embodiment of the present invention;
Fig. 3 is the method flow diagram of another load dispatch provided in an embodiment of the present invention;
Fig. 4 is the method flow diagram of another load dispatch provided in an embodiment of the present invention;
Fig. 5 is the method flow diagram of another load dispatch provided in an embodiment of the present invention;
Fig. 6 is the method flow diagram of another load dispatch provided in an embodiment of the present invention;
Fig. 7 is the method flow diagram of another load dispatch provided in an embodiment of the present invention;
Fig. 8 is a kind of composition frame chart of the device of load dispatch provided in an embodiment of the present invention;
Fig. 9 is the composition frame chart of the device of another load dispatch provided in an embodiment of the present invention;
Figure 10 is the composition frame chart of the device of another load dispatch provided in an embodiment of the present invention;
Figure 11 is a kind of composition frame chart of terminal provided in an embodiment of the present invention.
【Embodiment】
In order to be better understood from technical scheme, the embodiment of the present invention is retouched in detail below in conjunction with the accompanying drawings State.
It will be appreciated that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.Base Embodiment in the present invention, those of ordinary skill in the art obtained under the premise of creative work is not made it is all its Its embodiment, belongs to the scope of protection of the invention.
The term used in embodiments of the present invention is only merely for the purpose of description specific embodiment, and is not intended to be limiting The present invention." one kind ", " described " and "the" of singulative used in the embodiment of the present invention and appended claims It is also intended to including most forms, unless context clearly shows that other implications.
It will be appreciated that though processor core, but this may be described using term first, second in embodiments of the present invention A little processor cores should not necessarily be limited by these terms.These terms are only used for processor core being distinguished from each other out.For example, this is not being departed from In the case of inventive embodiments scope, first processor core can also be referred to as second processor core, similarly, second processor Core can also be referred to as first processor core.
Depending on linguistic context, word as used in this " if " can be construed to " ... when " or " when ... When " or " in response to determining " or " in response to detection ".Similarly, depending on linguistic context, phrase " if it is determined that " or " if detection (condition or event of statement) " can be construed to " when it is determined that when " or " in response to determine " or " when the detection (condition of statement Or event) when " or " in response to detecting (condition or event of statement) ".
The embodiments of the invention provide a kind of method of load dispatch, as shown in figure 1, methods described includes:
101st, the quantity of untreated task during the task of each processor core of acquisition is lined up.
Wherein, the processor core is the kernel of processor, calculating, reception and storage order, data processing used in terminal Task dispatching is carried out all in processor core.
Wherein, processor can be CPU (Central Processing Unit, central processing unit), single-chip microcomputer, GPU (Graphics Processing Unit, graphics processor) etc..
102nd, the quantity of untreated task is compared with pre-set threshold value during the task of each processor core is lined up.
Wherein, pre-set threshold value is a kind of value of statistical indicant, can represent the positive number form of task number, can also be percentage Form (e.g., untreated task number and the percentage of the processor total task amount to be processed in the processor core).This is pre- If threshold values is used to indicate to need whether task to be processed will handle completion in processor core.As untreated in processor core When the quantity of business is less than or equal to the pre-set threshold value, completion will be handled by showing the task of processor core distribution;And when place When the remaining untreated task quantity of reason device core is more than the pre-set threshold value, when showing the task of processor core distribution also needs longer Between could handle.
Wherein, the predetermined threshold value that each processor core is set can be the same or different, and this is not limited by the present invention.
103rd, the quantity of untreated task is less than or equal to the place of pre-set threshold value in processor core being present of the task is lined up Manage device core, and processor core being present of the task line up in untreated task quantity be more than pre-set threshold value processor core when, Determine the quantity of the task of each processor core average untreated task in lining up.
Terminal utilizes statistical algorithms, the sum of untreated task in statistical disposition device, and then counting statistics obtains The business of sum and the processor check figure, if obtained quotient is integer, determines the average value of the untreated task quantity of processor i.e. For obtained quotient;If obtained quotient has remainder, it is determined that being untreated of processor with the immediate integer value of the quotient The average value for quantity of being engaged in.
104th, the quantity of untreated task and average untreated task during the task of each processor core is lined up Quantity compares.
105th, the task of first processor core is lined up into the untreated task scheduling in middle part to the task of second processor core In queue.
Wherein, the first processor core is the quantity of untreated task beyond the place of the average untreated task quantity Manage device core;The second processor core is processor core of the quantity without departing from averagely untreated task quantity of untreated task.
Terminal obtains the task beyond average value from each processor core, then again by getting for task according to certain Principle distribute to other remaining untreated amounts less than in the processor core of the average value so that each processing after scheduling Untreated task quantity is equal to average value or close to average value in device core, ensures that each processor core enters in Idle state Time is close.
A kind of method of load dispatch provided in an embodiment of the present invention, do not locate when existing in processor in some processor core When the number of tasks of reason is less than or equal to pre-set threshold value, terminal will be untreated in the big processor core of untreated task quantity Task scheduling into other untreated less processor cores of task quantity, share more by the processor core for making processing speed fast Task, so that untreated task quantity keeps balancing to a certain extent in each processor core in processor, and then reduce The free time of the fast each processor core of processing speed so that each processor core utilization is more abundant, reduces the place of processor The overall duration of reason task.
Further, with reference to foregoing schemes, the realization of step 105 is directed to, the embodiments of the invention provide two kinds of realizations Mode, respectively as shown in Figure 2 and Figure 3,
First way, as shown in Fig. 2 being specially:
1051A, that the task of first processor core is lined up to the untreated task scheduling in middle part is small to untreated task quantity In the second processor core of predetermined threshold value.
The predetermined threshold value of processor core is for indicating to need task to be processed to handle completion in processor core, therefore, For the load of more effectively balanced each processor core, the untreated priority of task in part in first processor is dispatched to not In second processor core of the processing task quantity below predetermined threshold value.
Second method, as described in Figure 3, it is specially:
Resource occupation amount in 1051B, each second processor core of detection.
Different tasks is configured with each processor core, processor core handles the stock number needed during different tasks not Together, therefore, by checking the stock number of untreated task occupancy in each second processor core, second processing core can be shown out Handle the time of these tasks needs.
1052B, according to resource occupation amount order from low to high to second processor nuclear arrangement, to obtain the first sequence.
1053B, according to described first sequence, the untreated task in part in first processor core is dispatched to second successively In processor core.
The time that resource occupation amount needs to processor core processing task can be understood as directly proportional relation, resource occupation Amount is bigger, and the time that processor core handles these tasks needs is longer;Resource occupation amount is smaller, and processor core handles these tasks The time needed is shorter.The first sequence after second processor core is arranged according to the order of resource occupation amount from low to high, root It can reflect that each second processor core has handled respective untreated task according to first sequence, into the suitable of idle condition Sequence, according to this first sequence, preferentially by the task scheduling in first processor core to the second processor for being introduced into idle condition Core, so as to the time of balanced each processor core processing task, and then each processor core is made full use of, reduce processor Processing task overall duration.
Further, it is multiprocessing core for processor and when needing to handle multiple tasks with reference to foregoing schemes, in order to The efficiency for the scheduling that terminal performs is improved, based on this purpose, the embodiments of the invention provide another implementation, such as Fig. 4 institutes Show, before the quantity for obtaining each untreated task of processor core, methods described also includes:
106th, task is created for each processor core to line up.
107th, institute's pending processing task is obtained.
108th, during the task that the pending task is evenly distributed to establishment is lined up.
Further, with reference to foregoing schemes, the embodiment of the present invention additionally provides another implementation, as described in Figure 5, Before the quantity for obtaining each untreated task of processor core, methods described also includes:
109th, create and the same number of matrix operation thread of the processor core.
110th, the matrix operation thread is distributed in each processor core so that the matrix operation thread with The task lines up one-to-one relationship be present.
Further, to realize aforesaid operations, the embodiments of the invention provide another implementation method, as shown in fig. 6, step The realization of the quantity of untreated task specifically includes during rapid 101 the obtaining each processor core of the tasks are lined up:
1011st, untreated task in being lined up according to the task of the scheduling thread of processor detection each processor core Quantity.
Wherein, thread is the minimum unit that computer program performs stream, and it is an entity of process, can be adjusted by system With the elementary cell with distribution.Scheduling thread be it is a kind of based on dispatching algorithm be the pending task of processor distribute resource and Determine the thread when waiting task is handled.
Further, in order that each processor core free time length of terminal it is closer so that each resource of processor is filled Point application, based on this purpose, the embodiment of the present invention provides example another kind implementation, as shown in fig. 7, in step 105 by first After the task of processor core lines up the untreated task scheduling in middle part into second processor core, in addition to:
111st, judge each task after scheduling line up in untreated task quantity whether both less than or equal to default Threshold values.
112nd, when it is determined that each task after scheduling lines up untreated task quantity both less than or during equal to pre-set threshold value, Scheduling thread stops scheduling.
It should be noted that working as in terminal, untreated task amount is less than or equal to pre-set threshold value in all processor cores When, each processor core will all complete processing in need task, although the speed of each processor core processing is different, place Reason device core will not complete the processing of task simultaneously, but untreated task amount is smaller in each processor, and residue is not located Reason amount is also close to therefore, the processing of each processor core completes time of the task of distribution also close to performing tune to save terminal The time taken when spending and resource, the time that terminal handler has handled the required by task of all distribution is reduced, in such case Under, scheduling thread need not be scheduled again.
113rd, when it is determined that appointed task be present and line up untreated task quantity and be more than pre-set threshold value, perform task and adjust Degree.
It is more than pre-set threshold value when remaining untreated task quantity in a certain processor core be present, terminal is stilled need to processing Task in device core carries out load dispatch.Therefore, in the case, terminal can continue executing with task tune with return to step 101 Degree, until terminal detects that untreated task quantity is less than or equal to pre-set threshold value in each processor core.
It should be noted that the executive agent in the embodiment of the present invention can include but is not limited to personal computer (Personal Computer, PC), personal digital assistant (Personal Digital Assistant, PDA), wireless handheld Equipment, tablet personal computer (Tablet Computer), mobile phone etc..
The embodiment of the present invention additionally provides a kind of device of load dispatch, and the load for performing above-described embodiment offer is adjusted The method of degree, the composition figure of the device is as shown in figure 8, specifically include:
Acquiring unit 21, the quantity of untreated task during the task for obtaining each processor core is lined up.
First comparing unit 22, for untreated task during the task of each processor core is lined up quantity with it is pre- If threshold values compares.
Determining unit 23, the quantity for untreated task in lining up when processor core being present of the task are less than or equal to pre- If the processor core of threshold values, and processor core being present of the task line up in untreated task quantity be more than pre-set threshold value place When managing device core, the quantity of the task of each processor core average untreated task in lining up is determined.
Second comparing unit 24, the quantity for untreated task during the task of each processor core is lined up is with putting down The quantity of untreated task compares.
Scheduling unit 25, for the task of first processor core to be lined up into the untreated task scheduling in middle part to second processing In the task queue of device core.
Wherein, the first processor core is the quantity of untreated task beyond the place of the average untreated task quantity Manage device core;The second processor core is processor core of the quantity without departing from averagely untreated task quantity of untreated task.
Optionally, scheduling unit 25 is specifically used for:
The task of first processor core is lined up into the untreated task scheduling in middle part to untreated task quantity less than default In the second processor core of threshold value.
Optionally, scheduling unit 25 is specifically used for:
Detect resource occupation amount in each second processor core;And by the resource occupation amount according to from low to high Order arranges, to obtain the first sequence;And according to the described first sequence, by the untreated task in part in first processor core It is dispatched to successively in second processor core.
Optionally, as shown in figure 9, described device also includes:
Unit 26 is established, is lined up for creating task for each processor core.
The acquiring unit 21, it is additionally operable to obtain institute's pending processing task.
Allocation unit 27, during the task for the pending task to be evenly distributed into establishment is lined up.
Optionally, described device also includes:
Unit 26 is established to be additionally operable to create and the same number of matrix operation thread of the processor core.
Allocation unit 27 is additionally operable to distribute to the matrix operation thread in each processor core, so that the square Battle array computing thread lines up one-to-one relationship be present with the task.
Optionally, the acquiring unit 21 is specifically used for:
The quantity of untreated task in being lined up according to the task of the scheduling thread of processor detection each processor core.
Optionally, as shown in Figure 10, described device also includes:
Judging unit 28, for judge scheduling after each task line up in untreated task quantity whether both less than or Equal to pre-set threshold value.
End unit 29, line up untreated task quantity both less than for each task after determining to dispatch or be equal to During pre-set threshold value, scheduling thread stops scheduling.
Execution unit 30, for when it is determined that appointed task be present and line up untreated task quantity and be more than pre-set threshold value, Perform task scheduling.
A kind of device of load dispatch provided in an embodiment of the present invention, do not locate when existing in processor in some processor core When the number of tasks of reason is less than or equal to pre-set threshold value, terminal will be untreated in the big processor core of untreated task quantity Task scheduling into other untreated less processor cores of task quantity, share more by the processor core for making processing speed fast Task, so that untreated task quantity keeps balancing to a certain extent in each processor core in processor, and then reduce The free time of the fast each processor core of processing speed so that each processor core utilization is more abundant, reduces the place of processor The overall duration of reason task.
The embodiment of the present invention additionally provides a kind of terminal, and as described in Figure 11, the terminal includes processor 41, memory 42 With input-output equipment 43, the processor 41, memory 42 and input/output interface 43 are communicated by bus;It is described to deposit Computer instruction is configured with reservoir 42, the processor 41 can call the instruction with control input output interface 43;
When the computer instruction is performed by the processor 41 so that the terminal realizes any of the above-described load dispatch Method.
A kind of terminal provided in an embodiment of the present invention, when in processor exist some processor core in untreated number of tasks During less than or equal to pre-set threshold value, terminal arrives untreated task scheduling in the big processor core of untreated task quantity In other untreated less processor cores of task quantity, the fast processor core of processing speed is shared a little tasks more, so as to Make in processor that untreated task quantity keeps balancing to a certain extent in each processor core, and then it is fast to reduce processing speed Each processor core free time so that each processor core utilization is more abundant, reduce processor processing task it is total Body duration.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, the corresponding process in preceding method embodiment is may be referred to, will not be repeated here.
In several embodiments provided by the present invention, it should be understood that disclosed system, apparatus and method can be with Realize by another way.For example, device embodiment described above is only schematical, for example, the unit Division, only a kind of division of logic function, can there is other dividing mode, for example, multiple units or group when actually realizing Part can combine or be desirably integrated into another system, or some features can be ignored, or not perform.It is another, it is shown Or the mutual coupling discussed or direct-coupling or communication connection can be by some interfaces, device or unit it is indirect Coupling or communication connection, can be electrical, mechanical or other forms.
The unit illustrated as separating component can be or may not be physically separate, show as unit The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also That unit is individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated list Member can both be realized in the form of hardware, can also be realized in the form of hardware adds SFU software functional unit.
The above-mentioned integrated unit realized in the form of SFU software functional unit, can be stored in one and computer-readable deposit In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions are causing a computer It is each that device (can be personal computer, server, or network equipment etc.) or processor (Processor) perform the present invention The part steps of embodiment methods described.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (Read- Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disc or CD etc. it is various Can be with the medium of store program codes.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention God any modification, equivalent substitution and improvements done etc., should be included within the scope of protection of the invention with principle.

Claims (10)

  1. A kind of 1. method of load dispatch, it is characterised in that methods described includes:
    Obtain each processor core task line up in untreated task quantity;
    The quantity of untreated task is compared with pre-set threshold value during the task of each processor core is lined up;
    The quantity of untreated task is less than or equal to the processor core of pre-set threshold value in processor core being present of the task is lined up, and And processor core being present of the task line up in untreated task quantity be more than pre-set threshold value processor core when, determine each place The quantity of the task of reason device core average untreated task in lining up;
    The quantity of untreated task is compared with the quantity of average untreated task during the task of each processor core is lined up;
    The task of first processor core is lined up into the untreated task scheduling in middle part into the task queue of second processor core;
    Wherein, the first processor core exceeds the processor of the average untreated task quantity for the quantity of untreated task Core;The second processor core is processor core of the quantity without departing from averagely untreated task quantity of untreated task.
  2. 2. according to the method for claim 1, it is characterised in that the task by first processor core lines up middle part not The task queue of processing task scheduling to second processor core includes:
    The task of first processor core is lined up into the untreated task scheduling in middle part and is less than predetermined threshold value to untreated task quantity Second processor core in.
  3. 3. according to the method for claim 1, it is characterised in that the task by first processor core lines up middle part not The task queue of processing task scheduling to second processor core includes:
    Detect resource occupation amount in each second processor core;
    According to the order of the resource occupation amount from low to high to the second processor nuclear arrangement, to obtain the first sequence;
    According to the described first sequence, the untreated task in part in first processor core is dispatched to second processor core successively In.
  4. 4. according to the method for claim 1, it is characterised in that in the obtaining each processor core of the task is lined up not Before the quantity of processing task, methods described also includes:
    Task is created for each processor core to line up;
    Obtain institute's pending processing task;
    The pending task is evenly distributed to during the task lines up.
  5. 5. according to the method for claim 1, it is characterised in that in the number for obtaining each untreated task of processor core Before amount, methods described also includes:
    Establishment and the same number of matrix operation thread of the processor core,
    The matrix operation thread is distributed in each processor core, so that the matrix operation thread and the task Line up one-to-one relationship be present.
  6. 6. according to the method for claim 5, it is characterised in that the obtaining each processor core of the task is not located in lining up The quantity of reason task includes:
    The quantity of untreated task in being lined up according to the task of the scheduling thread of processor detection each processor core.
  7. 7. according to the method for claim 1, it is characterised in that part is not located in the task of first processor core is lined up After task scheduling is managed into the task queue of second processor core, in addition to:
    Judge scheduling after each task line up in untreated task quantity whether both less than or equal to pre-set threshold value;
    When it is determined that each task after scheduling lines up untreated task quantity both less than or during equal to pre-set threshold value, scheduling thread Stop scheduling;
    When it is determined that appointed task be present and line up untreated task quantity and be more than pre-set threshold value, task scheduling is performed.
  8. 8. a kind of device of load dispatch, it is characterised in that described device includes:
    Acquiring unit, the quantity of untreated task during the task for obtaining each processor core is lined up;
    First comparing unit, quantity and pre-set threshold value for untreated task during the task of each processor core is lined up Compare;
    Determining unit, the quantity for untreated task in lining up when processor core being present of the task are less than or equal to pre-set threshold value Processor core, and processor core being present of the task line up in untreated task quantity be more than pre-set threshold value processor core When, determine the quantity of the task of each processor core average untreated task in lining up;
    Second comparing unit, the quantity for untreated task during the task of each processor core is lined up are not located with average The quantity of reason task compares;
    Scheduling unit, for the task of first processor core to be lined up into the untreated task scheduling in middle part to second processor core In task queue;
    Wherein, the first processor core exceeds the processor of the average untreated task quantity for the quantity of untreated task Core;The second processor core is processor core of the quantity without departing from averagely untreated task quantity of untreated task.
  9. 9. device according to claim 6, it is characterised in that described device also includes:
    Judging unit, for judge scheduling after each task line up in untreated task quantity whether both less than or equal to pre- If threshold values;
    End unit, line up untreated task quantity both less than or equal to default valve for each task after determining to dispatch During value, scheduling thread stops scheduling;
    Execution unit, for when it is determined that appointed task be present and line up untreated task quantity and be more than pre-set threshold value, performing and appointing Business scheduling.
  10. 10. a kind of terminal, it is characterised in that the terminal includes processor, memory and input-output equipment, the processing Device, memory and input/output interface are communicated by bus;Computer instruction, the place are configured with the memory Reason device can call the instruction with control input output interface;
    When the computer instruction is by the computing device so that the terminal is realized as described in claim any one of 1-7 Method.
CN201710910618.5A 2017-09-29 2017-09-29 The method, apparatus and terminal of a kind of load dispatch Pending CN107656813A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710910618.5A CN107656813A (en) 2017-09-29 2017-09-29 The method, apparatus and terminal of a kind of load dispatch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710910618.5A CN107656813A (en) 2017-09-29 2017-09-29 The method, apparatus and terminal of a kind of load dispatch

Publications (1)

Publication Number Publication Date
CN107656813A true CN107656813A (en) 2018-02-02

Family

ID=61117317

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710910618.5A Pending CN107656813A (en) 2017-09-29 2017-09-29 The method, apparatus and terminal of a kind of load dispatch

Country Status (1)

Country Link
CN (1) CN107656813A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108897622A (en) * 2018-06-29 2018-11-27 郑州云海信息技术有限公司 A kind of dispatching method and relevant apparatus of task run
CN109389286A (en) * 2018-09-03 2019-02-26 阿里巴巴集团控股有限公司 A kind of business processing, scheduling, batch processes, device, equipment and medium
CN109406025A (en) * 2018-10-16 2019-03-01 武汉斗鱼网络科技有限公司 Method for testing pressure, device and electronic equipment
CN109947015A (en) * 2019-03-15 2019-06-28 浙江中控技术股份有限公司 The execution method and master controller of task
CN110349076A (en) * 2019-07-18 2019-10-18 秒针信息技术有限公司 The processing method and processing device of data
CN110532060A (en) * 2019-08-10 2019-12-03 佳都新太科技股份有限公司 A kind of hybrid network environmental data collecting method and system
CN111124644A (en) * 2019-12-19 2020-05-08 北京旷视科技有限公司 Method, device and system for determining task scheduling resources
WO2020168505A1 (en) * 2019-02-21 2020-08-27 华为技术有限公司 Method and apparatus for scheduling software tasks among multiple processors
CN113157427A (en) * 2020-01-07 2021-07-23 中科寒武纪科技股份有限公司 Task migration method and device, computer equipment and readable storage medium
CN115408163A (en) * 2022-10-31 2022-11-29 广东电网有限责任公司佛山供电局 Model inference scheduling method and system based on batch processing dynamic adjustment
CN116185582A (en) * 2022-12-29 2023-05-30 国科础石(重庆)软件有限公司 Multi-core scheduling method, device, vehicle, electronic equipment and medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101458634A (en) * 2008-01-22 2009-06-17 中兴通讯股份有限公司 Load equilibration scheduling method and device
CN102495857A (en) * 2011-11-21 2012-06-13 北京新媒传信科技有限公司 Load balancing method for distributed database
CN103106112A (en) * 2013-02-05 2013-05-15 浪潮(北京)电子信息产业有限公司 Method and device based on maximum load and used for load balancing scheduling
CN103918239A (en) * 2012-09-28 2014-07-09 华为技术有限公司 Load balancing method, device, system and computer readable medium
KR101534137B1 (en) * 2014-08-27 2015-07-24 성균관대학교산학협력단 Method for Coordinated Scheduling For virtual machine
CN105528330A (en) * 2014-09-30 2016-04-27 杭州华为数字技术有限公司 Load balancing method and device, cluster and many-core processor
CN105700959A (en) * 2016-01-13 2016-06-22 南京邮电大学 Multi-core platform oriented multithreaded division and static balancing scheduling policy
CN106371914A (en) * 2015-07-23 2017-02-01 中国科学院声学研究所 Load intensity-based multi-core task scheduling method and system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101458634A (en) * 2008-01-22 2009-06-17 中兴通讯股份有限公司 Load equilibration scheduling method and device
CN102495857A (en) * 2011-11-21 2012-06-13 北京新媒传信科技有限公司 Load balancing method for distributed database
CN103918239A (en) * 2012-09-28 2014-07-09 华为技术有限公司 Load balancing method, device, system and computer readable medium
CN103106112A (en) * 2013-02-05 2013-05-15 浪潮(北京)电子信息产业有限公司 Method and device based on maximum load and used for load balancing scheduling
KR101534137B1 (en) * 2014-08-27 2015-07-24 성균관대학교산학협력단 Method for Coordinated Scheduling For virtual machine
CN105528330A (en) * 2014-09-30 2016-04-27 杭州华为数字技术有限公司 Load balancing method and device, cluster and many-core processor
CN106371914A (en) * 2015-07-23 2017-02-01 中国科学院声学研究所 Load intensity-based multi-core task scheduling method and system
CN105700959A (en) * 2016-01-13 2016-06-22 南京邮电大学 Multi-core platform oriented multithreaded division and static balancing scheduling policy

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
黄亮: "多核处理器中任务调度与负载均衡的研究", 《中国优秀硕士学位论文全文数据库(信息科技辑)》 *

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108897622A (en) * 2018-06-29 2018-11-27 郑州云海信息技术有限公司 A kind of dispatching method and relevant apparatus of task run
CN109389286A (en) * 2018-09-03 2019-02-26 阿里巴巴集团控股有限公司 A kind of business processing, scheduling, batch processes, device, equipment and medium
CN109389286B (en) * 2018-09-03 2022-11-18 阿里巴巴集团控股有限公司 Business processing, scheduling and batching method, device, equipment and medium
CN109406025A (en) * 2018-10-16 2019-03-01 武汉斗鱼网络科技有限公司 Method for testing pressure, device and electronic equipment
CN109406025B (en) * 2018-10-16 2020-12-15 武汉斗鱼网络科技有限公司 Pressure testing method and device and electronic equipment
WO2020168505A1 (en) * 2019-02-21 2020-08-27 华为技术有限公司 Method and apparatus for scheduling software tasks among multiple processors
CN109947015A (en) * 2019-03-15 2019-06-28 浙江中控技术股份有限公司 The execution method and master controller of task
CN110349076A (en) * 2019-07-18 2019-10-18 秒针信息技术有限公司 The processing method and processing device of data
CN110349076B (en) * 2019-07-18 2022-11-29 秒针信息技术有限公司 Data processing method and device
CN110532060A (en) * 2019-08-10 2019-12-03 佳都新太科技股份有限公司 A kind of hybrid network environmental data collecting method and system
CN111124644A (en) * 2019-12-19 2020-05-08 北京旷视科技有限公司 Method, device and system for determining task scheduling resources
CN111124644B (en) * 2019-12-19 2023-04-04 北京旷视科技有限公司 Method, device and system for determining task scheduling resources
CN113157427A (en) * 2020-01-07 2021-07-23 中科寒武纪科技股份有限公司 Task migration method and device, computer equipment and readable storage medium
CN113157427B (en) * 2020-01-07 2024-03-15 中科寒武纪科技股份有限公司 Method, device, computer equipment and readable storage medium for task migration
CN115408163A (en) * 2022-10-31 2022-11-29 广东电网有限责任公司佛山供电局 Model inference scheduling method and system based on batch processing dynamic adjustment
CN116185582A (en) * 2022-12-29 2023-05-30 国科础石(重庆)软件有限公司 Multi-core scheduling method, device, vehicle, electronic equipment and medium
CN116185582B (en) * 2022-12-29 2024-03-01 国科础石(重庆)软件有限公司 Multi-core scheduling method, device, vehicle, electronic equipment and medium

Similar Documents

Publication Publication Date Title
CN107656813A (en) The method, apparatus and terminal of a kind of load dispatch
CN104615488B (en) The method and apparatus of task scheduling in heterogeneous multi-core reconfigurable calculating platform
US11558244B2 (en) Improving performance of multi-processor computer systems
CN103327072B (en) A kind of method of cluster load balance and system thereof
CN107124472A (en) Load-balancing method and device, computer-readable recording medium
US7900210B2 (en) Application connector parallelism in enterprise application integration systems
CN107579926A (en) The QoS methods to set up of Ceph cloud storage systems based on token bucket algorithm
CN104268018B (en) Job scheduling method and job scheduler in a kind of Hadoop clusters
CN110427256A (en) Job scheduling optimization method, equipment, storage medium and device priority-based
CN106209682A (en) Business scheduling method, device and system
CN107239336A (en) A kind of method and device for realizing task scheduling
CN106547612A (en) A kind of multi-task processing method and device
CN111104211A (en) Task dependency based computation offload method, system, device and medium
CN104123304A (en) Data-driven parallel sorting system and method
CN104793996A (en) Task scheduling method and device of parallel computing equipment
CN109840149B (en) Task scheduling method, device, equipment and storage medium
CN106775493A (en) A kind of storage control and I/O Request processing method
CN108595567A (en) A kind of merging method of small documents, device, equipment and readable storage medium storing program for executing
CN106897136A (en) A kind of method for scheduling task and device
CN109492024A (en) Data processing method, device, computer equipment and storage medium
CN104461722B (en) A kind of job scheduling method for cloud computing system
CN101799772A (en) Kernel dispatching method, kernel backup method and multi-core processor
CN103412790A (en) Method and system for multicore concurrent scheduling of mobile safety middleware
CN114721818A (en) Kubernetes cluster-based GPU time-sharing method and system
CN111767023A (en) Data sorting method and data sorting system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 201807 Shanghai city Jiading District Industrial Zone Jiading Road No. 2258

Applicant after: Shanghai Lianying Medical Technology Co.,Ltd.

Address before: 201807 Shanghai city Jiading District Industrial Zone Jiading Road No. 2258

Applicant before: SHANGHAI UNITED IMAGING HEALTHCARE Co.,Ltd.

CB02 Change of applicant information
RJ01 Rejection of invention patent application after publication

Application publication date: 20180202

RJ01 Rejection of invention patent application after publication