CN1971506A - Method for avoiding occurrence of long-delayed event - Google Patents
Method for avoiding occurrence of long-delayed event Download PDFInfo
- Publication number
- CN1971506A CN1971506A CN 200510128702 CN200510128702A CN1971506A CN 1971506 A CN1971506 A CN 1971506A CN 200510128702 CN200510128702 CN 200510128702 CN 200510128702 A CN200510128702 A CN 200510128702A CN 1971506 A CN1971506 A CN 1971506A
- Authority
- CN
- China
- Prior art keywords
- incident
- preset value
- carry out
- avoiding
- counter
- 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
Links
Images
Landscapes
- Executing Machine-Instructions (AREA)
Abstract
A method of avoiding long event-delay is applied in a working routine of a processor, the processor checks whether a status is occurred, if the status is not occurred, a resource release procedure is executed to make the processor execute the first working routine within specific time to avoid the long event-delay of the processor.
Description
[technical field]
The present invention is relevant a kind of program that prevents that the long delay incident from taking place, particularly relevant for the program that prevents that in processor the long delay incident from taking place.
[background technology]
In processor working routine now, when many different working routines will be transferred to same processor and do computing and carry out, the processing order of how to arrange work was the important problem of door.Wait in time allow work be done earlier when being performed that when having a plurality of different work in the processor more not urgent work is then delayed and carried out is processing mode common in known technology with urgency.
Above-mentioned differentiation relevant for the work urgency then involves among prior art the use relevant for " right of priority " notion.For the higher working routine of importance, then processor gives higher relatively right of priority to handle early; Otherwise for the lower working routine of importance, processor will give relatively low right of priority to delay processing so.Well imagine that for being identified as most important work, processor will certainly give the highest right of priority so, and maximum calculation resources is full out to finish the work.
But in prior art, have most important work occasionally and must satisfy the situation generation that just can be performed after a certain specified conditions earlier, therefore if these specified conditions can not be satisfied in specific time, therefore all working routines in processor all will be delayed execution, this promptly so-called " long delay incident " so.
Fig. 1 shows the process flow diagram of working routine in the conventional processors.In step 100, be that the driving formula that drives processor is activated at first; Then in step 103, drive formula and check whether an incident (event) takes place, if incident does not take place then repeatedly to reexamine, take place just to enter next step up to this incident, and above-mentioned so-called incident just drives the work that formula promptly will be carried out, generally speaking, driving formula work to be processed in computer system, all be the higher work of importance, so processor will just continue to carry out other work after handling this incident; And when this incident takes place, can carry out a time delay routine 106, allow processor carry out a loop, its objective is in order to allow processor wait for a period of time quietly to wait for a state (status) generation, and so-called state is meant a necessary condition, is satisfying under the prerequisite of this necessary condition, and incident is performed, and above-mentioned incident and state, all can be in ensuing civilian illustrated it.
After executing time delay program 106, then just carry out polling status (poll status) 109 steps, if the condition that the state coincident event can be performed, so just carry out event target function (performevent destination function) 112, at this moment processor can be handled this incident, enter then in the step 115, drive formula and can carry out other feature operation, come back in the step 103 more at last; And if in step 109, state does not meet the condition that incident can be performed, will come back in the time delay program 106 so.
By above explanation as can be known, the condition that coincident event can be performed if the state in step 109 delays, the usefulness of processor will repeatedly expend on step 106 and step 109 so, and make the situation of long delay (long latency) take place.
In view of above-mentioned in known driving formula contingent long delay situation, particularly the incident of processing need see through set condition bit notification processor, rather than the mode notification processor of utilization interruption, thereby cause processor can't handle other work, therefore the utmost point need propose a kind of can the wait to avoid processor to expend the too much time to finish the method for other work by the temporary transient processor resource that discharges in the implementation that drives formula.
[summary of the invention]
In view of many shortcomings of conventional ADS driving formula in the above-mentioned prior art, fundamental purpose of the present invention is to propose a kind ofly can temporarily discharge processor resource, to avoid the method for long delay incident.
Another object of the present invention is in the method that proposes a kind of processor processing work, and it can still can temporarily handle other work when the long delay incident takes place.
According to the purpose of the above, the invention provides and a kind ofly can in the processor working routine, avoid the method for long delay incident, mainly comprise following steps: (a) whether rechecking one incident (event) takes place; (b) when incident takes place, carry out a time delay routine to wait for the effluxion of one first preset value; (c) check whether a state (status) takes place; And (d) when this state in the step (c) does not take place, carry out a resource release procedure, allow this processor in the time of one second preset value, carry out other working routine, and then get back to step (b).
[description of drawings]
Fig. 1 shows known processor workflow diagram;
Fig. 2 reveal competence covers and the vertical synoptic diagram that covers; And
Fig. 3 shows processor workflow diagram according to the invention.
[embodiment]
Some embodiments of the present invention can be described in detail as follows.Yet except describing in detail, the present invention can also implement in other embodiment widely, and scope of the present invention do not limited, its with after claim be as the criterion.
The present invention disclose a kind of can be in driving the implementation of formula the temporary transient processor resource that discharges to finish the method for other work.The method can be applied to any processor with poll (polling) function and drive on the formula.
Next will illustrate within the present invention with an embodiment and hold.In common computer system, comparatively dull or for the performance requirements of calculation process when little when the performed work of system, this moment is in order to save resource so, computer system can be judged the processing that central processing unit (CPU) is reduced the work time pulse frequency automatically, or reduces the operating voltage of supplying with central processing unit.But because computer system is still in running order this moment, so when central processing unit was carried out above-mentioned change, must be in due course to adjust just was unlikely to influence the work that computer system is being handled at present.
For instance, suppose computer system only to play VCD at present and when not carrying out other work, so because computer system does not need the whole calculation resources of central processing unit, can reduce frequency of operation or reduce the waste of operating voltage central processing unit so drive formula this moment with the saving resource, and generation of this promptly so-called incident (event).After an incident takes place, then drive formula and should wait for a suitable opportunity, that is to say that the computer system on this opportunity is in certain state (status), can carry out the processing that reduces frequency of operation or reduce operating voltage.In this example, the status condition that one of them is above-mentioned, the demonstration that refers to screen just in time is in " vertically cover " (vertical blanking) or " level covers " (horizontal blanking) time.
Show that in the 2nd A figure one vertically covers the example that covers with a level.When a screen will show a picture, this picture is that the upper left corner by screen begins successively so, the pixel (pixel) that demonstrates first row from left to right, then move to first pixel of secondary series again from first last pixel of row, again from left to right demonstrate secondary series, show ensuing each row last pixel of row to the last then in regular turn, just till the last cell of this screen.And when screen will show next picture, so then must after returning the upper left corner of screen again, the last cell of screen just begin to do the demonstration of picture.In the above description,, be back to the mistiming between first location of pixels of next column, so-called exactly when the demonstration of screen last pixel by a certain row " level covers ".Level cover during screen will can not show any new pixel.And screen is from last pixel of last row, and when first pixel that is back to screen first row was prepared to show next picture, the mistiming in the middle of this promptly was referred to as " vertically cover ".Similarly, screen also will can not show any new pixel during vertically covering.
Above-mentioned " level covers " or " vertically cover " and during, owing to do the action of demonstration without any pixel, therefore can be utilized to the execution incident and be unlikely to make the picture on the screen to show discontinuous, particularly " vertically cover " time of being continued is longer, so in this example with " vertically cover " and genetic definition be that the executable situation of incident is satisfied.But in application of the present invention, do not limit the performed dull worker of computer system only for playing VCD, in the present invention the incident of also not limiting is only represented the reduction frequency of operation of central processing unit or is reduced operating voltage, and state does not limit only expression yet " vertically cover " generation.
Fig. 3 shows processor workflow diagram of the present invention.The invention provides a kind of method that can temporarily discharge processor resource.In step 300, be that the driving formula of processor is activated at first; Then in step 303, drive formula and check whether an incident (event) takes place, if incident does not take place then repeatedly to reexamine, up to this incident next step takes place just to enter, incident in this example is meant that computer system reduces frequency of operation or reduces operating voltage the central processing unit work in order to save resource; And when this incident takes place, can carry out a time delay routine 306, allow processor carry out a loop, its objective is in order to allow processor wait for a period of time quietly to wait for a state (status) generation, and so-called state is meant a necessary condition, satisfying under the prerequisite of this necessary condition, incident is performed, state in the present embodiment is meant that screen is at this moment " vertically cover " situation.
In time delay program 306, comprised the step 3060 of counter being set one first preset value, the interior value of counter is subtracted 1 step 3063, and whether the interior value of judging counter is 0 step 3066, interior value as if counter in step 3066 is not 0, then return to step 3063, but if the interior value of counter is 0, then follow the just polling status of execution in step 309 (poll status), if the condition that the state coincident event can be performed, so just carry out event target function (perform event destinationfunction) 312, at this moment processor can be handled this incident, enter in the step 315 then, drive formula and can carry out other feature operation, come back in the step 303 more at last.
And if in step 309, state does not meet the condition that incident can be performed, and will enter the sleep pattern in the step 318 so, allows central processing unit in a special time T1, can temporarily release the resource of receiving central processing unit, the work of carrying out other is to avoid the generation of long delay incident.In the present embodiment, playing when computer system in the process of VCD, taken place central processing unit to be made the frequency reducing or the incident of step-down, even screen display so " vertically cover " state takes place as yet, central processing unit also can the sleep pattern among step 318 temporarily be handled other work, allow the broadcast work of VCD be linked up and do not occur postponing, for example VCD dials and puts picture sweep frequency deficiency.
By above explanation as can be known, the method that is proposed among the present invention can be in the executive routine that drives formula, and the resource that temporarily discharges central processing unit is to handle other work, so the long delay incident can not occur.And the present invention does not limit the central processing unit that only can be applied in the computer system, among other processor driving formula, as long as have the step of poll in the program of this driving formula, and this driving formula is not to utilize the mode of interrupting to come notification processor when incident takes place, and so all can use the present invention's method.
The above only is the present invention's preferred embodiment, is not in order to limit the present invention's claim; All other do not break away from following equivalence of finishing of disclosed spirit and changes or modification, all should be included in the following claim.
Claims (15)
1. method of avoiding the long delay incident is applied to comprise in the working routine of a processor:
(a) whether rechecking one incident (event) takes place;
(b) when this incident takes place, carry out a time delay routine to wait for the effluxion of one first preset value;
(c) check whether a state (status) takes place; And
(d) when this state in the step (c) does not take place, carry out a resource release procedure and allow this processor in the time of one second preset value, carry out one first working routine, and then get back to step (b).
2. the method for avoiding the long delay incident according to claim 1 is characterized in that, step (d) comprises when this state in the step (c) takes place, and carries out an incident purpose function (event destinationfunction).
3. the method for avoiding the long delay incident according to claim 2 is characterized in that, comprises after executing this incident purpose function, can carry out one second working routine.
4. the method for avoiding the long delay incident according to claim 3 is characterized in that, comprises after executing this second working routine, can return step (a).
5. the method for avoiding the long delay incident according to claim 1 is characterized in that, this time delay program is finished by following steps:
(e) in a counter, set a counter preset value;
(f) the counter preset value in the counter is subtracted 1;
(g) check whether the counter preset value equals 0; And
(h) when the counter preset value in the step (g) is not equal to 0, return step (f).
6. the method for avoiding the long delay incident according to claim 5 is characterized in that, when the counter preset value in the step (g) equals 0, can carry out step (c).
7. method of avoiding the long delay incident is applied to comprise in the working routine of a processor:
(a) whether rechecking one incident (event) takes place;
(b) when this incident takes place, in a counter, set a counter preset value;
(c) the counter preset value in the counter is subtracted 1;
(d) check whether the counter preset value equals 0;
(e) when the counter preset value in the step (d) equals 0, check whether a state (status) takes place; And
(f) when this state in the step (e) does not take place, carry out a resource release procedure and allow this processor in the time of one second preset value, carry out one first working routine, and then get back to step (b).
8. the method for avoiding the long delay incident according to claim 7 is characterized in that, step (f) comprises when this state in the step (e) takes place, and carries out an incident purpose function.
9. the method for avoiding the long delay incident according to claim 8 is characterized in that, comprises after executing this incident purpose function, can carry out one second working routine.
10. the method for avoiding the long delay incident according to claim 9 is characterized in that, comprises after executing this second working routine, can return step (a).
11. the method for avoiding the long delay incident according to claim 7 is characterized in that, when the counter preset value in the step (d) is not equal to 0, can carry out step (c).
12. a method of avoiding the long delay incident is applied to comprise in the working routine of a processor:
(a) whether rechecking one incident (event) takes place;
(b) when this incident takes place, in a counter, set a counter preset value;
(c) the counter preset value in the counter is subtracted 1;
(d) check whether the counter preset value equals 0;
(e) when the counter preset value in the step (d) equals 0, check whether a state (status) takes place;
(f) when this state in the step (e) does not take place, carry out a resource release procedure and allow this processor in the time of one second preset value, carry out one first working routine, and then get back to step (b); And
(g) when this state in the step (e) takes place, carry out an incident purpose function.
13. the method for avoiding the long delay incident according to claim 12 is characterized in that, more comprises after executing this incident purpose function, can carry out one second working routine.
14. the method for avoiding the long delay incident according to claim 13 is characterized in that, comprises after executing this second working routine, can return step (a).
15. the method for avoiding the long delay incident according to claim 12 is characterized in that, when the counter preset value in the step (d) is not equal to 0, can carry out step (c).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200510128702 CN1971506A (en) | 2005-11-24 | 2005-11-24 | Method for avoiding occurrence of long-delayed event |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200510128702 CN1971506A (en) | 2005-11-24 | 2005-11-24 | Method for avoiding occurrence of long-delayed event |
Publications (1)
Publication Number | Publication Date |
---|---|
CN1971506A true CN1971506A (en) | 2007-05-30 |
Family
ID=38112347
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 200510128702 Pending CN1971506A (en) | 2005-11-24 | 2005-11-24 | Method for avoiding occurrence of long-delayed event |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1971506A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103793205A (en) * | 2012-10-26 | 2014-05-14 | 辉达公司 | Selective poisoning of data during runahead |
-
2005
- 2005-11-24 CN CN 200510128702 patent/CN1971506A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103793205A (en) * | 2012-10-26 | 2014-05-14 | 辉达公司 | Selective poisoning of data during runahead |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1246766C (en) | Display method of multiple display computer system | |
EP2073097B1 (en) | Transitioning a processor package to a low power state | |
US8572299B2 (en) | Hardware accelerator module and method for setting up same | |
US7321942B2 (en) | Performance counter for adding variable work increment value that is dependent upon clock frequency | |
US7131015B2 (en) | Performance level selection in a data processing system using a plurality of performance request calculating algorithms | |
CN101290668B (en) | Time sharing operation dynamic dispatching method and device | |
CN105302638A (en) | MPP (Massively Parallel Processing) cluster task scheduling method based on system load | |
EP2551767B1 (en) | Method and device for adjusting clock interrupt cycle | |
CN103294533A (en) | Task flow control method and task flow control system | |
DE112007001713T5 (en) | System and method for controlling low power states in processors | |
WO2004044720A2 (en) | Performance level setting of a data processing system | |
CN1790270A (en) | Java virtual machine implementation method supporting multi-process | |
US20090292846A1 (en) | Method of interrupt scheduling | |
US20100122260A1 (en) | Preventing Delay in Execution Time of Instruction Executed by Exclusively Using External Resource | |
CN1783016A (en) | Computer system | |
US20040083478A1 (en) | Apparatus and method for reducing power consumption on simultaneous multi-threading systems | |
CN109918181B (en) | Worst response time-based task schedulability analysis method for hybrid critical system | |
US20130007493A1 (en) | Computer system, method for controlling power of computer system, and recording medium for power control program | |
CN1971506A (en) | Method for avoiding occurrence of long-delayed event | |
CN113434303A (en) | Batch-processed remote sensing image intelligent processing model prediction performance optimization system and method | |
CN107329817B (en) | Standby standby system mixed partitioning reliability perception energy consumption optimization method | |
CN101943944A (en) | Idle history information-based energy-saving method for computing array | |
JP2654612B2 (en) | Exclusive weight reduction control method | |
CN101349975A (en) | Method for implementing interrupt bottom semi-section mechanism and embedded system thereof | |
CN1322396C (en) | Method for auto-power-off according to user's habit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |