CN106326066B - A kind of method and its system of the monitoring adjustment of tasks of embedded system response performance - Google Patents
A kind of method and its system of the monitoring adjustment of tasks of embedded system response performance Download PDFInfo
- Publication number
- CN106326066B CN106326066B CN201510393685.5A CN201510393685A CN106326066B CN 106326066 B CN106326066 B CN 106326066B CN 201510393685 A CN201510393685 A CN 201510393685A CN 106326066 B CN106326066 B CN 106326066B
- Authority
- CN
- China
- Prior art keywords
- task
- system task
- time
- priority
- monitoring
- 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.)
- Active
Links
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The method and its system of a kind of monitoring adjustment of tasks of embedded system response performance are provided in the present invention, the priority of the system task operation are preset according to the importance of system task, wherein system task all sets the threshold time of task run;The operation information of each system task is monitored, wherein operation information includes task ID, task schedule number and clock interrupt number;According to monitoring that the operation information of each system task calculates the time of the system task continuous operation;When monitor high priority system task continuous operating time be more than preset threshold time, the priority of the high priority system task is reduced under the priority for the system task for needing to dispatch in time.It ensure that system software executes the real-time of task;Guarantee that the other tasks of system can be called simultaneously, while also guaranteeing that the task can also be called execution again after running between time-out occurs in system task, ensure that the safety of system.
Description
Technical field
The present invention relates to embedded system technology field more particularly to a kind of monitorings of tasks of embedded system response performance
The method and its system of adjustment.
Background technique
In the prior art, the product requirement of embedded system has quick, reliable responding ability.To more in system
Business carries out reasonable workload partition, and corresponding task priority is arranged according to requirement of each task in terms of real-time,
It is to maintain the basis of the good real-time of system.
Non-critical task, receipts for using the Ethernet switch of vxWorks operating system, in embedded software
Give out a contract for a project task, ring agreement task, system timer task and abnormality processing task dispatching, just successively there is from low to high preferential
Grade.Ring agreement task therein, such as Rstp (Rapid Spanning Tree Protocol), generally there is the requirement of such as 50ms convergence time,
So corresponding tRstp this kind of task be to requirement of real-time it is very high, just can be fast after related protocol massages in order to receive
The response of speed, is not only limited to the task of RSTP (Rapid Spanning Tree Protocol) etc certainly, further includes other real-time being wanted
Seek higher task.
Each task shares cpu resource in the system of Preemptive multitask.When making more Gao Youxian for some reason
Grade task long-play, or more low priority task after taskLock long-play, can all cause related
Task cannot be dispatched in time, influence the real-time response ability of equipment.
Existing technical solution mainly uses system tick interrupt to carry out time counting judges whether task run is overtime
Or then endless loop is handled task suspension post debugging.Common endless loop inspection is not up to when the time of a task continuous service
When survey thresholding has still influenced requirement of real-time high agreement generic task, it will not be monitored, lead in response to this
It often needs to carry out different agreements different performance tests, verifying workload is heavy, while in the case where applying at the scene, no
It can be set as debugging mode, therefore, it is necessary to a kind of automatic easy monitoring tune for being directed to system internal software real-time response performance
Whole method.
Therefore, how by way of relative ease real-time response performance to be carried out by software automatically in internal system
Self diagnosis adjustment is not limited only to from system maintenance bring difficulty, but also exposes those and threaten asking for system real time
Topic.
Summary of the invention
In view of the above problems, it proposes on the present invention overcomes the above problem or at least be partially solved in order to provide one kind
State the method and its system of a kind of monitoring adjustment of tasks of embedded system response performance of problem.
The embodiment of the invention provides a kind of method of the monitoring adjustment of tasks of embedded system response performance, this method packets
It includes:
The priority that the system task operation is preset according to the importance of the system task, wherein the system task
All set the threshold time of task run;
Monitor the operation information of each system task, wherein the operation information include task ID, task schedule number and
Clock interrupt number;According to the operation information for monitoring each system task calculate the system task continuous operation when
Between;
It, will be described high preferential when the continuous operating time for monitoring high priority system task is more than preset threshold time
The priority of grade system task reduces under the priority for the system task for needing to dispatch in time.
When monitoring the high priority system task continuous operating time after the degradation again above preset thresholding
Between, the priority of the high priority system task after the degradation is reduced again.
The operation information that each system task is monitored according to calculate the system task continuous operation when
Between include:
The task ID and task schedule number for monitoring each system task, judge current system task task ID and
Task schedule number and the task ID and task schedule number of last time system task compare, when the two is consistent, according to statistics
The number of clock interrupt triggering, the acquisition system task that clock interrupt duration is multiplied with the number that clock interrupt triggers are continuous
The time of operation;
When one of both difference, the task ID and task schedule number of each system task are monitored again.
The priority that the system task operation is preset according to the importance of the system task, wherein the system task
All set the threshold time of task run further include:
The system task of different priorities presets the threshold time of different system task operations, high priority system task
Threshold time be less than low priority system task threshold time.
When the continuous operating time for monitoring high priority system task is more than preset threshold time further include: will be to institute
The alarm of high priority system task is stated,
And/or the high priority system task is hung up.
The embodiment of the invention provides a kind of system of the monitoring adjustment of tasks of embedded system response performance, the system packets
It includes:
System task setting module, for presetting the excellent of the system task operation according to the importance of the system task
First grade, wherein the system task all sets the threshold time of task run;
System task monitoring modular, for monitoring the operation information of each system task, wherein the operation information includes
Task ID, task schedule number and clock interrupt number;Institute is calculated according to the operation information for monitoring each system task
State the time of system task continuous operation;
System task adjusts module, for being more than preset when the continuous operating time for monitoring high priority system task
Threshold time, by the priority of the high priority system task reduce to the system task for needing to dispatch in time priority it
Under.
The system also includes system tasks to adjust module again, for high priority system after monitoring the degradation
Task continuous operating time is again above preset threshold time, by the priority of the high priority system task after the degradation
It reduces again.
The system task setting module further include:
The system task of different priorities presets the threshold time of different system task operations, high priority system task
Threshold time be less than low priority system task threshold time.
The system task monitoring modular includes:
The task ID and task schedule number for monitoring each system task, judge current system task task ID and
Task schedule number and the task ID and task schedule number of last time system task compare, when the two is consistent, according to statistics
The number of clock interrupt triggering, the acquisition system task that clock interrupt duration is multiplied with the number that clock interrupt triggers are continuous
The time of operation;
When one of both difference, the task ID and task schedule number of each system task are monitored again.
Told system task monitoring modular further include: the high priority system task will be alerted,
And/or the high priority system task is hung up.
The method and its system of a kind of monitoring adjustment of tasks of embedded system response performance are provided in the present invention, according to
The importance of the system task presets the priority of the system task operation, wherein the system task all sets task fortune
Capable threshold time;The operation information of each system task is monitored, wherein the operation information includes task ID, task schedule time
Several and clock interrupt number;The system task continuous operation is calculated according to the operation information for monitoring each system task
Time;It, will be described high preferential when the continuous operating time for monitoring high priority system task is more than preset threshold time
The priority of grade system task reduces under the priority for the system task for needing to dispatch in time, solves and goes out in system task
It can only generally be used when being run between existing endless loop or time-out and force task to cause the associated task execution of the task after hanging up
It goes wrong, this invention ensures that system software executes the real-time of task, also guarantees that the other tasks of system can be called, together
When ensure run between time-out occurs in system task after the task can also be called again execution, ensure that the safety of system
Property.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention,
And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can
It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field
Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention
Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 is a kind of method flow of the monitoring adjustment of tasks of embedded system response performance provided in an embodiment of the present invention
Figure;
Fig. 2 is a kind of the specific of the method for built-in system software response performance monitoring adjustment provided in an embodiment of the present invention
Implementation process figure;
Fig. 3 is a kind of knot of the system of the monitoring adjustment of tasks of embedded system response performance provided in an embodiment of the present invention
Composition.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
It is fully disclosed to those skilled in the art.
Below with reference to attached drawing is illustrated, the embodiment of the present invention is illustrated.
Fig. 1 is a kind of method flow of the monitoring adjustment of tasks of embedded system response performance provided in an embodiment of the present invention
Figure, the process the following steps are included:
S101: the priority of the system task operation is preset according to the importance of the system task, wherein the system
System task all sets the threshold time of task run;
Specifically, here 3 factors of the importance of so-called system task generally comprise system task in embedded system
The operation duration of system, timeliness of other system tasks for the degree of dependence of the system task and the system task itself.
Based on above-mentioned three factors generally by software designer rule of thumb either by whole system task according to three factors into
Running priority grade is arranged in row score ranking.
In addition, each system task sets a threshold time, threshold time is possible in system according to the system task
Duration, the general duration obtained than test is bigger, but is also not centainly, in the present invention in the threshold time will be with it
Priority has much relations.
S102: monitoring the operation information of each system task, wherein the operation information includes task ID, task schedule time
Several and clock interrupt number;The system task continuous operation is calculated according to the operation information for monitoring each system task
Time;
Specifically, in the present invention, whole system monitors the operation information of each system task, wherein by task tune
Record is worked as in the Hook Function taskSwitchHook (when this Hook Function for having task to switch every time can all be called) of degree
Before the task ID that is dispatched to, and the number of task schedule is done cumulative, is that the task continues before task schedule next time
The stage of operation.
By the way that in the processing function TickAnnounce of clock interrupt, (each tick can report one to interrupt and adjust back automatically
This function, tick are generally 10ms) in combine the ID of current task and the information of task schedule number, so that it may know current
Task whether be in continuous operation state.
S103:, will be described when the continuous operating time for monitoring high priority system task is more than preset threshold time
The priority of high priority system task reduces under the priority for the system task for needing to dispatch in time.
Specifically, each system task is monitored, include high priority system task, priority it is slightly lower
The system task of the demanding system task of timeliness and low priority, when the continuous operating time of high priority system task
It, in the present invention will be timely using the priority of high priority system task is reduced to needs when more than preset threshold time
Under the priority of the system task of scheduling.Here the priority of the system task dispatched in time be typically also it is relatively high,
But due to requiring higher system task for timeliness there are also other in system, this generic task is generally arranged
Highest priority, but its operation duration is generally shorter.According to system task operation duration and the relationship of threshold time to being
The adjustment for task priority of uniting is important feature of the present invention.
A kind of optimization of the method for the monitoring adjustment of tasks of embedded system response performance provided in an embodiment of the present invention
One of journey, the process are further comprising the steps of:
When monitoring the high priority system task continuous operating time after the degradation again above preset thresholding
Between, the priority of the high priority system task after the degradation is reduced again.
Specifically, the system task for needing to dispatch in time will be reduced to using by the priority of high priority system task
Under priority then, when due to the high priority system task continuous operating time after the degradation again above preset thresholding
Between, the system task of the grade that necessarily causes that All factors being equal, preference will be give to and the lower priority for needing to dispatch in time can not execute, it is however generally that
Problems are in practical general few appearance, but if searching problems with unconventional method will be a huge work
Journey, and using will be easy to search the problem and make system task still to can continue to execute when adjusting its priority again,
The safe shape and timeliness of guarantee system.
In addition, in the present invention can also using by the system task of All factors being equal, preference will be give to grade timeliness is required according to it or its
Its degree of dependence is arranged different threshold times in its task, can mainly be set according to the task ID of system task here
Not, such as: different threshold times is arranged in the task ID in different sections.
It is described to be monitored according to often in order to illustrate the process for the duration for calculating each system task continuous operation
The time that the operation information of a system task calculates the system task continuous operation includes:
The task ID and task schedule number for monitoring each system task, judge current system task task ID and
Task schedule number and the task ID and task schedule number of last time system task compare, when the two is consistent, according to statistics
The number of clock interrupt triggering, the acquisition system task that clock interrupt duration is multiplied with the number that clock interrupt triggers are continuous
The time of operation;
When one of both difference, the task ID and task schedule number of each system task are monitored again.
Specifically, firstly, by task schedule Hook Function taskSwitchHook (have every time task switch when
This Hook Function can all be called) in the task ID that arrives of record current scheduling, and the number of task schedule is done it is cumulative, until
It is the stage of the task continuous service before task schedule next time.
Secondly, by the way that in the processing function TickAnnounce of clock interrupt, (each tick can report an interruption automatically
And adjust back this function, tick is generally 10ms) in combine current task ID and task schedule number information, so that it may know
Whether the current task in road is in continuous operation state, and the time of continuous operation can pass through the duration and tick several phase of tick
Multiply to calculate (worst error is -1tick).
It is default according to the importance of the system task in order to illustrate the relationship of each system task and threshold time
The priority of the system task operation, wherein the system task all sets the threshold time of task run further include:
The system task of different priorities presets the threshold time of different system task operations, high priority system task
Threshold time be less than low priority system task threshold time.
In general, the threshold time that the system task of different priority runs the different system task of correspondence, by
In, the system task of high priority will preferentially be run in systems, and it is in the running duration of system it is not possible that too long, therefore its
The threshold time of the system task of middle high priority is less than the threshold time of low priority system task.
In addition, the present invention also provides another mode, the system task of the equal priority thresholding that correspondence is different
Time, the threshold time will be preset according to the task ID of system task.This method, which will further be enriched, appoints multisystem
There are the processing means of overtime long running or endless loop in business.
In order to further clarify the processing means of the system task long for time-out: when monitoring high priority system task
Continuous operating time be more than preset threshold time further include: the high priority system task will be alerted, and/or by institute
State the hang-up of high priority system task.
Fig. 2 is a kind of the specific of the method for built-in system software response performance monitoring adjustment provided in an embodiment of the present invention
Implementation process figure,
4 tasks of priority from high to low are respectively indicated with tHigh, tRstp, tTask, tLow, are divided into 5 etc.
Grade, priority (numerical value high priority is high) the corresponding thresholdings that are respectively 5,4 and 1 are 15ms, 30ms, 45ms, 60ms, 2ms, wherein
TRstp has the requirement of real-time response, is to need the goal task that ensures, it is assumed that stp topology have occurred variation need its
It is scheduled for setting its thresholding as 30ms, Thigh threshold time is 15ms, the threshold time of Ttask to make accordingly in 20ms
For 45ms, Tlow threshold time is 2s.
By taking the priority adjustment to Thigh as an example, specific step is as follows
S201: system clock is persistently occurred with the frequency of mono- tick of 10ms and calls corresponding interrupt processing function;
S202: currently running task, namely times of monitoring each system task are detected in the interrupt handling function
Business ID and task schedule number, the number of statistics clock interrupt triggering;
S203: by monitoring task ID and count judge whether the task switches, namely judge current task whether with it is upper
Secondary detecting for task is identical.If it is different, then task is switched during this, show that task schedule has worked, system is real
When property is normal, returns to previous step and continues to test;If identical, it is also necessary to sentence again by the way that whether the total degree that task switches increases
Whether disconnected task is switched.It then indicates that task switched if there is increasing, returns to previous step and continue to test S202;If cut
It changes number not increase, then toward processing S204 in next step;
S204: the Tick number of cumulative task continuous operation;Its continuous operation is counted by chronomere of tick number to task A
Duration;
S205: judging whether Tick number is more than thresholding, namely to judge whether the runing time of system task has exceeded default
Thresholding (N number of tick).If the not super thresholding of task A, continues to test S202;Otherwise toward processing S206 in next step, according to detection
Purpose is different, and N can also be different.For the purpose of protection ring switching performance, N should be associated with the performance indicator of ring switching;
S206: current task priority is reduced, runs current high priority, namely when the task of high priority 5 is continuously transported
The capable time is more than preset monitoring thresholding 15ms, and the grade of high-priority task tHigh is reduced to and needs to dispatch in time
Under task priority 4, being set as task tHigh priority is 3;
S207: judge whether the task continuous operating time after degrading is more than preset monitoring thresholding;
S208: when monitoring that task tHigh continuous operating time after degradation is more than preset monitoring thresholding 45ms, by this
Task grade is reduced to 2 again.
In addition, in S206, for the system of super thresholding can task be considered as and influence the emphasis investigation pair of system real time
As, therefore its task ID, operation duration and current system time clock are recorded, while reliable period, these information also back up
It can also be checked after restarting into high memory so as to system just in case be abnormal.A global variable is defined in system to be used to indicate
It is current whether debugging mode.When version is in close beta state, can be set to debugging mode with obtain more information into
Row positioning.
In the case where applying at the scene, it cannot be set as debugging mode, whether can be selectively arranged to Gao You at this time
First grade and long-term the occupying CPU of the task reduces its priority automatically.After the task wait suspect is suspended or reduces priority,
A log will be printed and record this event to facilitate system maintenance.
Fig. 3 is a kind of knot of the system of the monitoring adjustment of tasks of embedded system response performance provided in an embodiment of the present invention
Composition, the system comprises:
System task setting module 31, for presetting the system task operation according to the importance of the system task
Priority, wherein the system task all sets the threshold time of task run;
System task monitoring modular 32, for monitoring the operation information of each system task, wherein the operation information packet
Include task ID, task schedule number and clock interrupt number;It is calculated according to the operation information for monitoring each system task
The time of the system task continuous operation;
System task adjusts module 33, for being more than default when the continuous operating time for monitoring high priority system task
Threshold time, the priority of the high priority system task is reduced to the priority for the system task for needing to dispatch in time
Under.
Specifically, for system task setting module 31,3 factors of the importance of so-called system task are general here
The operation duration in embedded system including system task, other system tasks for the system task degree of dependence and
The timeliness of the system task itself.It generally rule of thumb either will be entire by software designer based on above-mentioned three factors
System task carries out score ranking setting running priority grade according to three factors.
In addition, each system task sets a threshold time, threshold time is possible in system according to the system task
Duration, the general duration obtained than test is bigger, but is also not centainly, in the present invention in the threshold time will be with it
Priority has much relations.
For system task monitoring modular 32, specifically, in the present invention, whole system monitors the fortune of each system task
Row information, wherein by by task schedule Hook Function taskSwitchHook (have every time task switch when this
Hook Function can all be called) in the task ID that arrives of record current scheduling, and the number of task schedule is done it is cumulative, until next
It is the stage of the task continuous service before subtask scheduling.
By the way that in the processing function TickAnnounce of clock interrupt, (each tick can report one to interrupt and adjust back automatically
This function, tick are generally 10ms) in combine the ID of current task and the information of task schedule number, so that it may know current
Task whether be in continuous operation state.
System task adjustment module 33 is specifically monitored each system task, includes that high priority is
The system task of the demanding system task of the slightly lower timeliness of system task, priority and low priority, when high priority system
When the continuous operating time of system task is more than preset threshold time, it will use in the present invention by high priority system task
Priority reduces under the priority for the system task for needing to dispatch in time.Here the system task dispatched in time it is preferential
Grade is typically also relatively high, but due to requiring higher system task for timeliness there are also other in system, it is right
Highest priority is generally set in this generic task, but its operation duration is generally shorter.According to system task operation duration with
The relationship of threshold time is important feature of the present invention to the adjustment of system task priority.
In order to further illustrate the detailed process that system task adjusts again, the system also includes system tasks to adjust mould again
Block 34, for when monitoring the high priority system task continuous operating time after the degradation again above preset thresholding
Between, the priority of the high priority system task after the degradation is reduced again.
Specifically, the system task for needing to dispatch in time will be reduced to using by the priority of high priority system task
Under priority then, when due to the high priority system task continuous operating time after the degradation again above preset thresholding
Between, the system task of the grade that necessarily causes that All factors being equal, preference will be give to and the lower priority for needing to dispatch in time can not execute, it is however generally that
Problems are in practical general few appearance, but if searching problems with unconventional method will be a huge work
Journey, and using will be easy to search the problem and make system task still to can continue to execute when adjusting its priority again,
The safe shape and timeliness of guarantee system.
In addition, in the present invention can also using by the system task of All factors being equal, preference will be give to grade timeliness is required according to it or its
Its degree of dependence is arranged different threshold times in its task, can mainly be set according to the task ID of system task here
Not, such as: different threshold times is arranged in the task ID in different sections.
In order to illustrate the process for the duration for calculating each system task continuous operation, the system task setting module
31 further include:
The system task of different priorities presets the threshold time of different system task operations, high priority system task
Threshold time be less than low priority system task threshold time.
Specifically, firstly, by task schedule Hook Function taskSwitchHook (have every time task switch when
This Hook Function can all be called) in the task ID that arrives of record current scheduling, and the number of task schedule is done it is cumulative, until
It is the stage of the task continuous service before task schedule next time.
Secondly, by the way that in the processing function TickAnnounce of clock interrupt, (each tick can report an interruption automatically
And adjust back this function, tick is generally 10ms) in combine current task ID and task schedule number information, so that it may know
Whether the current task in road is in continuous operation state, and the time of continuous operation can pass through the duration and tick several phase of tick
Multiply to calculate (worst error is -1tick).
In order to illustrate the relationship of each system task and threshold time, the system task monitoring modular 32 includes:
The task ID and task schedule number for monitoring each system task, judge current system task task ID and
Task schedule number and the task ID and task schedule number of last time system task compare, when the two is consistent, according to statistics
The number of clock interrupt triggering, the acquisition system task that clock interrupt duration is multiplied with the number that clock interrupt triggers are continuous
The time of operation;
When one of both difference, the task ID and task schedule number of each system task are monitored again.
In general, the threshold time that the system task of different priority runs the different system task of correspondence, by
In, the system task of high priority will preferentially be run in systems, and it is in the running duration of system it is not possible that too long, therefore its
The threshold time of the system task of middle high priority is less than the threshold time of low priority system task.
In addition, the present invention also provides another mode, the system task of the equal priority thresholding that correspondence is different
Time, the threshold time will be preset according to the task ID of system task.This method, which will further be enriched, appoints multisystem
There are the processing means of overtime long running or endless loop in business.
In order to further clarify the processing means for the long system task of time-out, told system task monitoring modular 32 is also
It include: that the high priority system task will be alerted,
And/or the high priority system task is hung up.
Algorithm and display are not inherently related to any particular computer, virtual system, or other device provided herein.
Various general-purpose systems can also be used together with teachings based herein.As described above, it constructs required by this kind of system
Structure be obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can use various
Programming language realizes summary of the invention described herein, and the description done above to language-specific is to disclose this hair
Bright preferred forms.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention
Example can be practiced without these specific details.In some instances, well known method, structure is not been shown in detail
And technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects,
Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes
In example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect
Shield the present invention claims features more more than feature expressly recited in each claim.More precisely, as following
Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore,
Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself
All as a separate embodiment of the present invention.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment
Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment
Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or
Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any
Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed
All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power
Benefit requires, abstract and attached drawing) disclosed in each feature can be by providing identical, equivalent, or similar purpose alternative features come generation
It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention
Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed
Meaning one of can in any combination mode come using.
Various component embodiments of the invention can be implemented in hardware, or to run on one or more processors
Software module realize, or be implemented in a combination thereof.It will be understood by those of skill in the art that can be used in practice
Microprocessor or digital signal processor (DSP) realize the rule entry according to an embodiment of the present invention for Message processing
Optimization device in some or all components some or all functions.The present invention is also implemented as executing this
In described method some or all device or device programs (for example, computer program and computer program
Product).It is such to realize that program of the invention can store on a computer-readable medium, it either can have one or more
The form of a signal.Such signal can be downloaded from an internet website to obtain, be perhaps provided on the carrier signal or with
Any other form provides.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability
Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not
Element or step listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple such
Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real
It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch
To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame
Claim.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.
Claims (8)
1. a kind of method of the monitoring adjustment of tasks of embedded system response performance, which is characterized in that this method comprises:
The priority that the system task operation is preset according to the importance of the system task, wherein the system task is all set
Determine the threshold time of task run;
The operation information of each system task is monitored, wherein the operation information includes task ID, task schedule number and clock
Interruption times;The time of the system task continuous operation is calculated according to the operation information for monitoring each system task;
When the continuous operating time for monitoring high priority system task is more than preset threshold time, by the high priority system
The priority of system task reduces under the priority for the system task for needing to dispatch in time;
The operation information that each system task is monitored according to calculates the time packet of the system task continuous operation
It includes:
The task ID and task schedule number for monitoring each system task, judge the task ID and task of current system task
Scheduling times and the task ID and task schedule number of last time system task compare, when the two is consistent, according to statistics clock
Clock interrupt duration is multiplied with the number that clock interrupt triggers and obtains the system task continuous operation by the number of down trigger
Time;
When one of both difference, the task ID and task schedule number of each system task are monitored again.
2. the method as described in claim 1, which is characterized in that the method also includes: height after monitoring the degradation
Priority system task continuous operating time appoints the high priority system after the degradation again above preset threshold time
The priority of business reduces again.
3. the method as described in claim 1, it is characterised in that: preset the system according to the importance of the system task and appoint
The priority of business operation, wherein the system task all sets the threshold time of task run further include:
The system task of different priorities presets the threshold time of different system task operations, the door of high priority system task
It is less than the threshold time of low priority system task between in limited time.
4. the method as described in claim 1, it is characterised in that: when the continuous operating time for monitoring high priority system task
More than preset threshold time further include: the high priority system task will be alerted,
And/or the high priority system task is hung up.
5. a kind of system of the monitoring adjustment of tasks of embedded system response performance, which is characterized in that the system includes:
System task setting module, for presetting the preferential of the system task operation according to the importance of the system task
Grade, wherein the system task all sets the threshold time of task run;
System task monitoring modular, for monitoring the operation information of each system task, wherein the operation information includes task
ID, task schedule number and clock interrupt number;The system is calculated according to the operation information for monitoring each system task
The time of system task continuous operation;
System task adjusts module, for being more than preset thresholding when the continuous operating time for monitoring high priority system task
Time reduces to the priority of the high priority system task under the priority for the system task for needing to dispatch in time;
The system task monitoring modular includes:
The task ID and task schedule number for monitoring each system task, judge the task ID and task of current system task
Scheduling times and the task ID and task schedule number of last time system task compare, when the two is consistent, according to statistics clock
Clock interrupt duration is multiplied with the number that clock interrupt triggers and obtains the system task continuous operation by the number of down trigger
Time;
When one of both difference, the task ID and task schedule number of each system task are monitored again.
6. system as claimed in claim 5, which is characterized in that the system also includes system tasks to adjust module again, is used for
High priority system task continuous operating time after monitoring the degradation, will be described again above preset threshold time
The priority of high priority system task after degradation reduces again.
7. system as claimed in claim 5, it is characterised in that: the system task setting module further include:
The system task of different priorities presets the threshold time of different system task operations, the door of high priority system task
It is less than the threshold time of low priority system task between in limited time.
8. system as claimed in claim 5, it is characterised in that: told system task monitoring modular further include: will be to the height
The alarm of priority system task,
And/or the high priority system task is hung up.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510393685.5A CN106326066B (en) | 2015-07-07 | 2015-07-07 | A kind of method and its system of the monitoring adjustment of tasks of embedded system response performance |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510393685.5A CN106326066B (en) | 2015-07-07 | 2015-07-07 | A kind of method and its system of the monitoring adjustment of tasks of embedded system response performance |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106326066A CN106326066A (en) | 2017-01-11 |
CN106326066B true CN106326066B (en) | 2019-04-26 |
Family
ID=57727446
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510393685.5A Active CN106326066B (en) | 2015-07-07 | 2015-07-07 | A kind of method and its system of the monitoring adjustment of tasks of embedded system response performance |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106326066B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108399096B (en) * | 2018-02-08 | 2021-06-11 | 合肥国轩高科动力能源有限公司 | Multi-task scheduling time sequence monitoring method and system for battery management system |
CN108958909A (en) * | 2018-04-29 | 2018-12-07 | 浙江工规科技有限公司 | Tasks of embedded system management system based on clock interrupt |
KR20200101682A (en) * | 2019-02-20 | 2020-08-28 | 삼성전자주식회사 | Electronic device and control method thereof |
CN111522713B (en) * | 2020-04-20 | 2021-09-28 | 浙江大学 | Intelligent robot software state monitoring system and method based on ROS development |
CN112650591B (en) * | 2021-01-05 | 2024-05-14 | 上海擎昆信息科技有限公司 | Method, device and system for adjusting interrupt priority |
CN112799816B (en) * | 2021-02-01 | 2023-03-31 | 安徽芯纪元科技有限公司 | Multitask program specified task debugging method of embedded operating system |
CN113342493B (en) * | 2021-06-15 | 2022-09-20 | 上海哔哩哔哩科技有限公司 | Task execution method and device and computer equipment |
CN113419928A (en) * | 2021-07-16 | 2021-09-21 | 中国建设银行股份有限公司 | Monitoring alarm method and device |
CN114253683B (en) | 2021-11-26 | 2022-11-01 | 北京百度网讯科技有限公司 | Task processing method and device, electronic equipment and storage medium |
CN114567625B (en) * | 2022-03-01 | 2024-07-05 | 上海创远仪器技术股份有限公司 | Radio monitoring equipment control processing system, method, device, processor and storage medium thereof based on android Http service |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102622300A (en) * | 2012-04-18 | 2012-08-01 | 迈普通信技术股份有限公司 | Infinite loop or similar infinite loop detection method in multitask system |
CN103164332A (en) * | 2011-12-15 | 2013-06-19 | 迈普通信技术股份有限公司 | Detection and processing method of endless loop task |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
FR2818769B1 (en) * | 2000-12-21 | 2004-06-18 | Eads Airbus Sa | MULTI-TASK REAL-TIME OPERATION METHOD AND SYSTEM |
US8473956B2 (en) * | 2008-01-15 | 2013-06-25 | Microsoft Corporation | Priority based scheduling system for server |
US9411641B2 (en) * | 2012-10-04 | 2016-08-09 | Lawrence J. Dickson | Method and apparatus implemented in processors for real-time scheduling and task organization based on response time order of magnitude |
-
2015
- 2015-07-07 CN CN201510393685.5A patent/CN106326066B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103164332A (en) * | 2011-12-15 | 2013-06-19 | 迈普通信技术股份有限公司 | Detection and processing method of endless loop task |
CN102622300A (en) * | 2012-04-18 | 2012-08-01 | 迈普通信技术股份有限公司 | Infinite loop or similar infinite loop detection method in multitask system |
Also Published As
Publication number | Publication date |
---|---|
CN106326066A (en) | 2017-01-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106326066B (en) | A kind of method and its system of the monitoring adjustment of tasks of embedded system response performance | |
US9218203B2 (en) | Packet scheduling in a multiprocessor system using inter-core switchover policy | |
CN106802826B (en) | Service processing method and device based on thread pool | |
CN110164104B (en) | Fault early warning method, device and equipment based on fault classification | |
CN101788949B (en) | Method and device for realizing embedded type system function monitoring | |
US10520935B2 (en) | Distributed control system, control device, control method, and computer program product | |
CN106919462B (en) | Method and device for generating fault record of processor | |
CN106062716B (en) | The method, apparatus and single task system of multitask are realized in single task system | |
CN107977302B (en) | CPU utilization rate output method and device | |
US20120245709A1 (en) | Safety controller and safety control method | |
CN108536530B (en) | Multithreading task scheduling method and device | |
CN110347427A (en) | The optimization method and device of web page code | |
CN102932200B (en) | Monitoring method and device for information flow node processing time limit | |
Katoen | GSPNs revisited: Simple semantics and new analysis algorithms | |
CN103631695A (en) | Time monitoring method and device | |
CN113986500A (en) | Task deterministic scheduling method and task diagnosis method in multi-task system | |
CN109947015B (en) | Task execution method and main controller | |
US9430419B2 (en) | Synchronizing exception control in a multiprocessor system using processing unit exception states and group exception states | |
CA2767782C (en) | Suspendable interrupts for processor idle management | |
Richter et al. | A framework for component-based real-time control applications | |
RU2150739C1 (en) | Responding signal processing system and method for detection of maximal duration of automatic process completion using responding system | |
JP5771114B2 (en) | Controller and how to handle tasks and ladders | |
CN109933487A (en) | The monitoring method and device of intelligent robot | |
CN111367702A (en) | Multitask software watchdog processing method and device | |
CN105204935B (en) | Automatically it opens and takes method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |