CN102012841B - Restart scheduling method of failure look-ahead threads - Google Patents

Restart scheduling method of failure look-ahead threads Download PDF

Info

Publication number
CN102012841B
CN102012841B CN 201010291185 CN201010291185A CN102012841B CN 102012841 B CN102012841 B CN 102012841B CN 201010291185 CN201010291185 CN 201010291185 CN 201010291185 A CN201010291185 A CN 201010291185A CN 102012841 B CN102012841 B CN 102012841B
Authority
CN
China
Prior art keywords
thread
threads
restart
failure
sum
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.)
Expired - Fee Related
Application number
CN 201010291185
Other languages
Chinese (zh)
Other versions
CN102012841A (en
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.)
University of Shanghai for Science and Technology
Original Assignee
University of Shanghai for Science and Technology
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 University of Shanghai for Science and Technology filed Critical University of Shanghai for Science and Technology
Priority to CN 201010291185 priority Critical patent/CN102012841B/en
Publication of CN102012841A publication Critical patent/CN102012841A/en
Application granted granted Critical
Publication of CN102012841B publication Critical patent/CN102012841B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention aims to provide a restart scheduling method of failure look-ahead threads. The method decides a restart exertion sequence of failure look-ahead threads according to the mutual relation between look-ahead threads and occupied resources. The method comprises the following steps of: detecting failure look-ahead threads; calculating resources and successor thread of a failure thread; judging priority execution levels of the failure thread and successor thread; and restarting the threads. The invention not only can preferably restart a thread with less resource need, but also can consider the conditions that the thread is the precursor thread or the successor thread of another thread, reduce the thread restart cost in case look-ahead failure and improve the thread restart efficiency.

Description

A kind of failure look-ahead threads is restarted dispatching method
Technical field
The present invention relates to computer realm, proposed a kind of failure look-ahead threads and restarted dispatching method.
Background technology
At present, high-performance processor only improves processor host frequency and complicated instruction flow line line technology has been difficult to significantly improve its performance, and do so also and can cause the thorny problems such as high power consumption and heat radiation, therefore, monolithic polycaryon processor (Chip Multi-Processors, CMP) technology becomes one of gordian technique that improves processor performance.Although the CMP technology has good effect to the executed in parallel multithreading, present most of programs also all are serial programs, how these serial programs are applied to the CMP platform, and allow its efficient operation, and these problems hamper the development of high-performance calculation always.
Concurrent technique based on thread-level prediction (Thread-Level Speculative, TLS) is one of main path that addresses these problems.But foresight technology infers that the result who draws might not be always correct, and this represents that some thread will inevitably outlook failure.When outlook failure occurring, the inefficacy thread often all is to restart in the synchronization request, but because the impact of the many aspects such as processor number, memory block, register, need a good thread scheduling method just can better improve the efficient that thread is restarted, so foresight thread is restarted dispatching method and is become one of gordian technique of serial program parallelization.
Summary of the invention
The object of the invention is to the defective for the prior art existence, provide a kind of failure look-ahead threads to restart dispatching method, improve the efficient that thread is restarted.
For achieving the above object, design of the present invention is: the resource of occupying according to foresight thread and mutual relation determine the execution sequence that failure look-ahead threads is restarted.By the foresight thread that detect to lose efficacy, calculate resource and the follow-up thread of inefficacy thread, judge the preferential executive level between them, being carried out thread, it restarts.
According to the foregoing invention design, the present invention adopts following technical proposals:
A kind of failure look-ahead threads is restarted dispatching method, it is characterized in that concrete operation step is as follows:
The foresight thread that A, detection were lost efficacy;
B, calculate the shared resource of thread of each outlook failure, be designated as M (i), i ∈ [0, n], n are all inefficacy total number of threads;
C, calculate the follow-up Thread Count of each failure look-ahead threads, be designated as N (i), i ∈ [0, n], n are all inefficacy total number of threads;
M (i) sum among D, the determining step B and the size of existing idling-resource sum M, selectively execution thread;
E, remaining thread is continued to turn back to step D, until the thread of all inefficacies all re-executes;
F, thread scheduling are carried out and are finished.
The execution sequence of above-mentioned steps D thread directly depends on the parameter among step B, the C, and operation steps is as follows:
D1, the M in step B (i) sum just forward step D11 to less than existing idling-resource sum M; M in step B (i) sum just forwards step D21 to greater than existing idling-resource sum M;
Whether each other D11, judgement restart the thread follow-up thread of forerunner, if so, carry out first forerunner's thread, forward step D11 to; Otherwise forward step D12 to;
D12, relatively restart thread and take resource M (i), preferentially carry out the little thread of M (i); Forward step F to;
Whether each other D21, judgement restart the thread follow-up thread of forerunner, if so, carry out first forerunner's thread, forward step D21 to; Otherwise forward step D22 to;
D22, the parameter among step B, the C is compared: as M (i)>M (j), j ∈ [0, n], n are all inefficacy total number of threads, during and N (i)<N (j), and preferential M (j) thread of carrying out just; When M (i)<M (j) and N (i)>N (j), preferential M (i) thread of carrying out just; As M (i)>M (j) and N (i)>N (j), perhaps when M (i)<M (j) and N (i)<N (j), if N/M=is ρ, ρ is called " the execution factor ", N (i)/M (i)=ρ (i), ρ is larger, illustrates that the priority level of carrying out is higher.Press successively execution thread of ρ order from big to small, until idling-resource M has been utilized, forward step e to;
The present invention compared with the prior art, have following apparent outstanding substantive distinguishing features and remarkable advantage: the present invention namely can satisfy preferentially restarts the few thread of resource requirement, can consider that again this thread is forerunner's thread of other threads and the situation of follow-up thread, thread when reducing outlook failure is restarted the band valency, improves the efficient that thread is restarted.
Description of drawings
Fig. 1 is that the failure look-ahead threads among the present invention is restarted the dispatching method process flow diagram.
Embodiment
Details are as follows by reference to the accompanying drawings for the preferred embodiments of the present invention:
Embodiment one: this failure look-ahead threads is restarted dispatching method, and concrete operation step is as follows:
The foresight thread that A, detection were lost efficacy;
B, calculate the shared resource of thread of each outlook failure, be designated as M (i), i ∈ [0, n], n are all inefficacy total number of threads;
C, calculate the follow-up Thread Count of each failure look-ahead threads, be designated as N (i), i ∈ [0, n], n are all inefficacy total number of threads;
M (i) sum among D, the determining step B and the size of existing idling-resource sum M, selectively execution thread;
E, remaining thread is continued to turn back to step D, until the thread of all inefficacies all re-executes;
F, thread scheduling are carried out and are finished.
Embodiment two: the present embodiment and embodiment one are basic identical, and special feature is as follows:
The execution sequence of described step D thread directly depends on the parameter among step B, the C, and operation steps is as follows:
D1, the M in step B (i) sum just forward step D11 to less than existing idling-resource sum M; M in step B (i) sum just forwards step D21 to greater than existing idling-resource sum M;
Whether each other D11, judgement restart the thread follow-up thread of forerunner, if so, carry out first forerunner's thread, forward step D11 to; Otherwise forward step D12 to;
D12, relatively restart thread and take resource M (i), preferentially carry out the little thread of M (i); Forward step F to;
Whether each other D21, judgement restart the thread follow-up thread of forerunner, if so, carry out first forerunner's thread, forward step D21 to; Otherwise forward step D22 to;
D22, the parameter among step B, the C is compared: as M (i)>M (j) j ∈ [0, n], n is all inefficacy total number of threads, during and N (i)<N (j), and preferential M (j) thread of carrying out just; When M (i)<M (j) and N (i)>N (j), preferential M (i) thread of carrying out just; As M (i)>M (j) and N (i)>N (j), perhaps when M (i)<M (j) and N (i)<N (j), if N/M=is ρ, ρ is called " the execution factor ", N (i)/M (i)=ρ (i), ρ is larger, illustrates that the priority level of carrying out is higher.Press successively execution thread of ρ order from big to small, until idling-resource M has been utilized, forward step e to;
Embodiment three: the applied environment of the described scheme of the present embodiment is the foresight thread executed in parallel environment of multi-core processor oriented, and the present embodiment does not limit polycaryon processor framework and thread scheduling mode in the described technical scheme applied environment.
With reference to Fig. 1, the operation steps that this failure look-ahead threads is restarted dispatching method is as follows:
The foresight thread that steps A (101), detection were lost efficacy.
Step B (102), calculate the shared resource M (i) of thread of each outlook failure.
Step C (103), calculate the follow-up Thread Count N (i) of each failure look-ahead threads.
Step D1 (104), judge that whether M (i) sum is greater than existing idling-resource sum M.
Whether each other step D11 (105), judgement restart the thread follow-up thread of forerunner.
Step D11 (106), execution forerunner thread.
Step D12 (107), relatively restart thread and take resource M (i), press M (i) order from small to large and carry out.
Whether each other step D21 (108), judgement restart the thread follow-up thread of forerunner.
Step D22 (109), establish N/M=ρ, ρ is called " the execution factor ", N (i)/M (i)=ρ (i), ρ is larger, illustrate that the priority level of carrying out is higher, press successively execution thread of ρ order from big to small, until idling-resource has been utilized, remainingly do not restart thread and continue to carry out next step operation.
Above this a kind of failure look-ahead threads is restarted dispatching method, be described in detail.This paper sets forth just for helping to understand method of the present invention and core concept in conjunction with Figure of description and specific embodiment; Simultaneously, for one of ordinary skill in the art, according to method of the present invention and thought, all will change on embodiment and range of application, in sum, this description should not be construed as limitation of the present invention.

Claims (1)

1. a failure look-ahead threads is restarted dispatching method, it is characterized in that concrete operation step is as follows:
The foresight thread that A, detection were lost efficacy;
B, calculate the shared resource of thread of each outlook failure, be designated as M (i),
Figure 554963DEST_PATH_IMAGE001
, n is all inefficacy total number of threads;
C, calculate the follow-up Thread Count of each failure look-ahead threads, be designated as N (i),
Figure 140665DEST_PATH_IMAGE001
, n is all inefficacy total number of threads;
M (i) sum among D, the determining step B and the size of existing idling-resource sum M, selectable execution thread, concrete steps are as follows:
D1, the M in step B (i) sum just forward step D11 to less than existing idling-resource sum M; M in step B (i) sum just forwards step D21 to greater than existing idling-resource sum M;
Whether each other D11, judgement restart the thread follow-up thread of forerunner, if so, carry out first forerunner's thread, forward step D11 to; Otherwise forward step D12 to;
D12, relatively restart thread and take resource M (i), preferentially carry out the little thread of M (i); Forward step F to;
Whether each other D21, judgement restart the thread follow-up thread of forerunner, if so, carry out first forerunner's thread, forward step D21 to; Otherwise forward step D22 to;
D22, the parameter among step B, the C is compared: as M (i) M (j)
Figure 570509DEST_PATH_IMAGE002
, n is all inefficacy total number of threads, during and N (i)<N (j), and preferential M (j) thread of carrying out just; As M (i)<M (j) and N (i)〉during N (j), preferential M (i) thread of carrying out just; As M (i)〉M (j) and N (i) N (j), perhaps when M (i)<M (j) and N (i)<N (j), establish N/M=
Figure 812135DEST_PATH_IMAGE003
,
Figure 897378DEST_PATH_IMAGE003
Be called " the execution factor ", N (i)/M (i)=
Figure 540849DEST_PATH_IMAGE003
(i),
Figure 876015DEST_PATH_IMAGE003
Larger, illustrate that the priority level of carrying out is higher, press
Figure 667254DEST_PATH_IMAGE003
Order from big to small is execution thread successively, until idling-resource M has been utilized, forwards step e to;
E, remaining thread is continued to turn back to step D, until the thread of all inefficacies all re-executes;
F, thread scheduling are carried out and are finished.
CN 201010291185 2010-09-21 2010-09-21 Restart scheduling method of failure look-ahead threads Expired - Fee Related CN102012841B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010291185 CN102012841B (en) 2010-09-21 2010-09-21 Restart scheduling method of failure look-ahead threads

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010291185 CN102012841B (en) 2010-09-21 2010-09-21 Restart scheduling method of failure look-ahead threads

Publications (2)

Publication Number Publication Date
CN102012841A CN102012841A (en) 2011-04-13
CN102012841B true CN102012841B (en) 2013-01-09

Family

ID=43843017

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010291185 Expired - Fee Related CN102012841B (en) 2010-09-21 2010-09-21 Restart scheduling method of failure look-ahead threads

Country Status (1)

Country Link
CN (1) CN102012841B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107491346B (en) * 2016-06-12 2021-03-12 阿里巴巴集团控股有限公司 Application task processing method, device and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030014471A1 (en) * 2001-07-12 2003-01-16 Nec Corporation Multi-thread execution method and parallel processor system
CN101526894A (en) * 2009-03-26 2009-09-09 上海大学 Structure controlling restarting optimization of speculation thread granules

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030014471A1 (en) * 2001-07-12 2003-01-16 Nec Corporation Multi-thread execution method and parallel processor system
CN101526894A (en) * 2009-03-26 2009-09-09 上海大学 Structure controlling restarting optimization of speculation thread granules

Also Published As

Publication number Publication date
CN102012841A (en) 2011-04-13

Similar Documents

Publication Publication Date Title
US9086883B2 (en) System and apparatus for consolidated dynamic frequency/voltage control
US20120256922A1 (en) Multithreaded Processor and Method for Realizing Functions of Central Processing Unit and Graphics Processing Unit
CN102193779A (en) MPSoC (multi-processor system-on-chip)-oriented multithread scheduling method
CN105607720B (en) Manage the method for the energy efficiency of computing system and the system of energy management efficiency
CN101256515A (en) Method for implementing load equalization of multicore processor operating system
WO2017016480A1 (en) System and method for multithreaded processing
US20130198758A1 (en) Task distribution method and apparatus for multi-core system
CN101299199A (en) Heterogeneous multi-core system based on configurable processor and instruction set extension
CN101923492A (en) Method for executing dynamic allocation command on embedded heterogeneous multi-core
US20160179429A1 (en) Controlling memory access conflict of threads on multi-core processor with set of highest priority processor cores based on a threshold value of issued-instruction efficiency
CN104380221A (en) Joint optimization of processor frequencies and system sleep states
US9740498B2 (en) Opportunistic multi-thread method and processor
CN110399034A (en) A kind of power consumption optimization method and terminal of SoC system
CN102012841B (en) Restart scheduling method of failure look-ahead threads
KR20120083000A (en) Method for dynamically assigned of parallel control module
US20130173933A1 (en) Performance of a power constrained processor
CN105653243A (en) Method for distributing tasks by general purpose graphic processing unit in multi-task concurrent execution manner
Liu et al. Task scheduling of real-time systems on multi-core embedded processor
CN102063291B (en) Multilevel parallel execution method of speculation thread
Prakash et al. Accelerating computer vision algorithms on heterogeneous edge computing platforms
CN103777995A (en) Synchronization optimized dispatching system and dispatching method based on group dispatching in virtualization environment
CN104699520B (en) A kind of power-economizing method based on virtual machine (vm) migration scheduling
CN102073482B (en) Partition method for speculative failure thread
CN101814019B (en) Method for identifying thread with outlook failure
Li et al. Empirical study of energy minimization issues for mixed-criticality systems with reliability constraint

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130109

Termination date: 20150921

EXPY Termination of patent right or utility model