CN115866054A - Non-periodic task scheduling method, device and medium based on bandwidth server - Google Patents

Non-periodic task scheduling method, device and medium based on bandwidth server Download PDF

Info

Publication number
CN115866054A
CN115866054A CN202211177286.1A CN202211177286A CN115866054A CN 115866054 A CN115866054 A CN 115866054A CN 202211177286 A CN202211177286 A CN 202211177286A CN 115866054 A CN115866054 A CN 115866054A
Authority
CN
China
Prior art keywords
bandwidth
server
task
periodic
system state
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.)
Granted
Application number
CN202211177286.1A
Other languages
Chinese (zh)
Other versions
CN115866054B (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.)
Harbin Institute of Technology
Original Assignee
Harbin Institute of 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 Harbin Institute of Technology filed Critical Harbin Institute of Technology
Priority to CN202211177286.1A priority Critical patent/CN115866054B/en
Priority claimed from CN202211177286.1A external-priority patent/CN115866054B/en
Publication of CN115866054A publication Critical patent/CN115866054A/en
Application granted granted Critical
Publication of CN115866054B publication Critical patent/CN115866054B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the invention discloses a non-periodic task scheduling method, a device and a medium based on a bandwidth server, wherein the method comprises the following steps: according to the system state information of the non-periodic tasks in the single processor system, a system state dynamic equation is constructed by adopting a hard constant bandwidth server feedback control algorithm; identifying unknown parameters in the system state dynamic equation by using a least square method according to the control input of a controller, the actual value, the predicted value and the residual function of the system state to obtain an identification result of the unknown parameters; evaluating the identification result of the unknown parameters by using the root mean square error and the judgment coefficient to obtain an optimal matching function of the average response delay of the non-periodic task and the difference between the non-periodic task utilization rate and the server bandwidth; and utilizing the optimal matching function to dynamically adjust the bandwidth of the server according to the utilization rate of the non-periodic tasks so as to obtain the minimized average response delay of the non-periodic tasks.

Description

Non-periodic task scheduling method, device and medium based on bandwidth server
Technical Field
The embodiment of the invention relates to the field of non-periodic task scheduling of a satellite system, in particular to a non-periodic task scheduling method, device and medium based on a bandwidth server.
Background
When an external event occurs, the house keeping system uses an aperiodic task to capture in response to the generated workload. The execution time and release interval of each aperiodic job vary greatly, and direct scheduling may cause real-time tasks in the system to miss deadlines. Therefore, on the basis of not sacrificing the performance of the periodic real-time tasks, the system response time of the non-periodic jobs is optimized, and a scheduling strategy needs to be further considered.
Disclosure of Invention
In view of this, embodiments of the present invention are expected to provide a method, an apparatus, and a medium for non-periodic task scheduling based on a bandwidth server, which can reduce average response delay of non-periodic tasks while ensuring a low periodic task miss rate.
The technical scheme of the embodiment of the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a bandwidth server-based aperiodic task scheduling method, including:
according to system state information of a non-periodic task operation process in a single processor system, a system state dynamic equation is constructed by adopting a hard constant bandwidth server feedback control algorithm; the system state dynamic equation comprises unknown parameters of the difference multiple relation between the average response delay of the non-periodic tasks and the utilization rate of the non-periodic tasks and the bandwidth of the server;
identifying unknown parameters in the system state dynamic equation by using a least square method according to the control input of a controller, the actual value, the predicted value and the residual function of the system state to obtain an identification result of the unknown parameters;
evaluating the identification result of the unknown parameters by using the root mean square error and the judgment coefficient to obtain an optimal matching function of the average response delay of the non-periodic task and the difference between the non-periodic task utilization rate and the server bandwidth;
and utilizing the optimal matching function of the average response delay of the non-periodic tasks and the difference between the non-periodic task utilization rate and the server bandwidth, and dynamically adjusting the server bandwidth according to the non-periodic task utilization rate to obtain the minimized average response delay of the non-periodic tasks.
In a second aspect, an embodiment of the present invention provides an aperiodic task scheduling apparatus based on a bandwidth server, where the apparatus includes: the system comprises a construction part, an identification part, an evaluation part and an adjustment part; wherein the content of the first and second substances,
the construction part is configured to construct a system state dynamic equation by adopting a hard and constant bandwidth server feedback control algorithm according to system state information of a non-periodic task operation process in the single processor system; the system state dynamic equation comprises unknown parameters of the difference multiple relation between the average response delay of the non-periodic task and the utilization rate of the non-periodic task and the bandwidth of the server;
the identification part is configured to identify unknown parameters in the system state dynamic equation by using a least square method according to the control input of the controller, the actual value and the predicted value of the system state and a residual function so as to obtain an identification result of the unknown parameters;
the evaluation part is configured to evaluate the identification result of the unknown parameter by using a root mean square error and a judgment coefficient so as to obtain a best matching function of the average response delay of the non-periodic task and the difference between the non-periodic task utilization rate and the server bandwidth;
the adjusting part is configured to utilize the optimal matching function of the average response delay of the non-periodic tasks and the difference between the utilization rate of the non-periodic tasks and the bandwidth of the server to dynamically adjust the bandwidth of the server according to the utilization rate of the non-periodic tasks so as to obtain the minimized average response delay of the non-periodic tasks.
In a third aspect, an embodiment of the present invention provides a computing device, where the computing device includes: a communication interface, a memory, and a processor; the various components are coupled together by a bus system; wherein the content of the first and second substances,
the communication interface is used for receiving and sending signals in the process of receiving and sending information with other external network elements;
the memory for storing a computer program operable on the processor;
the processor is configured to, when running the computer program, execute the steps of the bandwidth server-based aperiodic task scheduling method according to the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer storage medium, where the computer storage medium stores a program for bandwidth server-based aperiodic task scheduling, and the program for bandwidth server-based aperiodic task scheduling is executed by at least one processor to implement the steps of the bandwidth server-based aperiodic task scheduling method according to the first aspect.
The embodiment of the invention provides a non-periodic task scheduling method, a non-periodic task scheduling device and a non-periodic task scheduling medium based on a bandwidth server, and provides a scheduling method based on a feedback control algorithm of a hard constant bandwidth server aiming at non-periodic task scheduling on the basis of earliest time limit priority of an original scheduling algorithm based on a given scheduler model, a dynamic state space equation under the overload condition of a single processor system is established, bandwidth parameters of the server are adjusted through a feedback control strategy, and parameter identification is carried out by using a least square method. The algorithm can ensure the real-time performance of periodic tasks and reduce the response delay of non-periodic tasks under the condition of dynamic change of system loads.
Drawings
Fig. 1 is a flowchart of an aperiodic task scheduling method based on a bandwidth server according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of bandwidth management with multiple aperiodic tasks for a single processor according to an embodiment of the present invention;
FIG. 3 is a graph of RMSE versus R2 results for 10 groups of data with a single processor having only one aperiodic task and release intervals that follow a normal distribution, according to an embodiment of the present invention;
fig. 4 is a graph showing a best fit result of the release interval obeying normal distribution and a comparison between an actual value and a predicted value in a certain state, according to the embodiment of the present invention;
FIG. 5 is a graph of the RMSE versus R2 results for a single processor having only one aperiodic task and releasing 10 sets of data whose intervals are subject to exponential distribution;
fig. 6 is a graph showing a best fit result of the release interval obeying exponential distribution and a comparison between an actual value and a predicted value of a certain state, according to the embodiment of the present invention;
FIG. 7 is a graph comparing processor and task utilization for different scheduling policies when a single processor has multiple aperiodic tasks according to an embodiment of the present invention;
FIG. 8 is a graph comparing the periodic task miss rates of different scheduling policies for a single processor with multiple non-periodic tasks according to an embodiment of the present invention;
fig. 9 is a graph of the average response delay of aperiodic tasks under different scheduling policies according to an embodiment of the present invention;
FIG. 10 is a graph comparing job throughput under different scheduling policies according to an embodiment of the present invention;
fig. 11 is a schematic diagram of an aperiodic task scheduling apparatus based on a bandwidth server according to an embodiment of the present invention;
fig. 12 is a schematic hardware structure diagram of a computing device according to an embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
When an external event occurs, the house keeping system uses an aperiodic task to capture in response to the generated workload. Since the execution time and release interval of each aperiodic job vary greatly, direct scheduling may miss deadlines for real-time tasks in the system. For this reason, it is necessary to consider the task scheduling problem for a system in which a mixed task exists, that is, a periodic task and an aperiodic task exist at the same time in the system. Based on the above description, the embodiments of the present invention are expected to provide an aperiodic task scheduling method based on a bandwidth server. Referring to fig. 1, the method may include:
s101: according to system state information of a non-periodic task operation process in a single processor system, a system state dynamic equation is constructed by adopting a hard constant bandwidth server feedback control algorithm; the system state dynamic equation comprises unknown parameters of the difference multiple relation between the average response delay of the non-periodic tasks and the utilization rate of the non-periodic tasks and the bandwidth of the server;
s102: identifying unknown parameters in the system state dynamic equation by using a least square method according to the control input of a controller, the actual value, the predicted value and the residual function of the system state to obtain an identification result of the unknown parameters;
s103: evaluating the identification result of the unknown parameters by using the root mean square error and the judgment coefficient to obtain an optimal matching function of the average response delay of the non-periodic task and the difference between the non-periodic task utilization rate and the server bandwidth;
s104: and utilizing the optimal matching function of the average response delay of the non-periodic tasks and the difference between the non-periodic task utilization rate and the server bandwidth, and dynamically adjusting the server bandwidth according to the non-periodic task utilization rate to obtain the minimized average response delay of the non-periodic tasks.
It should be noted that, if the release interval of the periodic task is fixed, the periodic task is called a periodic task; the non-periodic task is an aperiodic task if the release time of the operation is not fixed and has a minimum interval, and the operation has weak timing constraint or no timing constraint; the task utilization rate is the ratio of the task execution time to the total processor time; the residual function is a functional relation of the difference between the actual value and the predicted value of the system state.
According to the description of the technical scheme, the embodiment of the invention provides a scheduling method based on a Hard-Constant Bandwidth Server Feedback Control (H-CBS-FC) algorithm based on the Earliest time limit First (EDF) of the original scheduling algorithm based on a given scheduler model and aiming at non-periodic task scheduling, establishes a dynamic state space equation under the overload condition of a single processor system, adjusts the Bandwidth parameters of the Server through a Feedback Control strategy and identifies the parameters by using a least square method. The algorithm can ensure the real-time performance of periodic tasks and reduce the response delay of non-periodic tasks under the condition of dynamic change of system loads.
It should be noted that the EDF algorithm is a fixed job priority scheduling algorithm, and allocates job priorities according to the task absolute deadline: the earlier the absolute deadline, the higher the priority.
For the technical solution shown in fig. 1, in some possible implementations, a system state dynamic equation is constructed by using a hard constant bandwidth server feedback control algorithm according to system state information of a non-periodic task operation process in a single processor system; the system state dynamic equation comprises unknown parameters of the difference multiple relation between the average response delay of the non-periodic task and the utilization rate of the non-periodic task and the bandwidth of the server, and comprises the following steps:
analyzing the relation between the server bandwidth and the average response delay of the non-periodic task according to the relation between the response delay of the non-periodic task and the task execution time to obtain the control input of the state feedback controller;
and constructing a system state dynamic equation by utilizing the control input and selecting the system state information of the non-periodic task in a sampling interval.
For the above implementation, in some examples, the relationship between the Server Bandwidth and the average response delay of the aperiodic tasks is analyzed according to the relationship between the response delay of the aperiodic task job and the job execution time to obtain the control input of the state feedback controller, and specifically, a Hard Constant Bandwidth Server (H-CBS) algorithm may generate a large response delay when scheduling the aperiodic tasks with dynamically changing load. The non-periodic task response delay is caused by the fact that the server bandwidth of the H-CBS algorithm cannot match the non-periodic task utilization. Therefore, it is necessary to set the best matching function relationship between the average response delay of the aperiodic task and the utilization rate of the aperiodic task and the bandwidth of the server to obtain the minimized average response delay.
Assuming that the average release interval of the non-periodic task is equal to the server period, and considering the condition of an implicit deadline, a relational expression of the response delay delta of the non-periodic task and the execution time of the task J is obtained:
Figure SMS_1
where c denotes a job execution time, d denotes an absolute deadline of the job, and Q S Represents the maximum budget of the server, T S Representing a server cycle.
As can be seen from the above equation, when the server maximum budget is equal to or greater than the job execution time, the response delay is 0. Therefore, the average response delay of the non-periodic task can be reduced by adjusting the maximum bandwidth of the server. At fixed server period T S Using the variation amount DeltaU of the server bandwidth S =ΔQ S /T S As control inputs to the state feedback controller:
u(k)=ΔU S (k)
during the operation of the system, the bandwidth of the server should satisfy the following constraints:
Figure SMS_2
wherein the content of the first and second substances,
Figure SMS_3
based on a minimum server bandwidth set for a person>
Figure SMS_4
The average utilization rate of the periodic real-time tasks in the sampling interval is shown.
When there are multiple non-periodic tasks in the processor, forThe embodiment of the invention provides a server bandwidth compression method, which is based on the proportional allocation of the utilization rate of a residual processor and compresses the control input of a controller to ensure the bandwidth adjustment effect. The working principle is as follows: each aperiodic task's H-CBS needs to establish a state feedback controller to regulate server bandwidth. The summation of control inputs from multiple independent controllers may cause the total bandwidth of the server for non-periodic tasks to exceed the upper system bandwidth limit
Figure SMS_5
The dynamic adjustment effect of the bandwidth of the server is reduced or is in an adverse effect. Therefore, all server bandwidths adjusted by feedback control need to be reasonably compressed to ensure the effectiveness of bandwidth adjustment on the non-periodic task server. Referring to fig. 2, a schematic diagram of bandwidth management with a single processor having multiple non-periodic tasks is shown, where after all controllers generate control inputs, the control inputs are directly applied to servers from the original state, and instead, after the bandwidth managers centrally manage the server bandwidths, new bandwidths are uniformly allocated to the servers.
The bandwidth manager first calculates the sum of the control inputs of all the controllers
Figure SMS_6
And total remaining utilization of processor
Figure SMS_7
Then is judged by>
Figure SMS_8
And U R (k) The size of (2) adjusts the bandwidth: />
(1)
Figure SMS_9
Proportional compression control input>
Figure SMS_10
And calculates the new server bandwidth->
Figure SMS_11
(2)
Figure SMS_12
Calculating new server bandwidth U Si (k+1)=U Si (k)+u i (k)。
Wherein, U Si (k) In order to adjust the bandwidth of the server prior to adjustment,
Figure SMS_13
the average utilization rate of the periodical real-time tasks in the sampling interval is obtained.
If any server bandwidth
Figure SMS_14
Then make it asserted>
Figure SMS_15
. The pseudo code for the server bandwidth compression algorithm is as follows:
Figure SMS_16
for the above implementation manner, in some examples, the system state dynamic equation is constructed by using the control input and selecting the system state information of the aperiodic task in one sampling interval, and specifically, the calculation system state information may be a selected state quantity in one sampling interval, such as an actual execution time and a task execution number of the aperiodic task job, and a release time and a completion time of the aperiodic job.
When the utilization rate of the non-periodic task is greater than the bandwidth of the server, that is, the load of the single processor is overloaded, the system can be described as a linear steady system, and the state space expression is as follows:
Figure SMS_17
y(k)=Cx(k)
because of variations in mean response delay of non-periodic tasks
Figure SMS_18
And/or>
Figure SMS_19
Correlation, hypothesis +>
Figure SMS_20
The coefficient matrix can be expressed as: />
Figure SMS_21
In order to realize the random configuration of the closed loop pole, the following state feedback control law is selected:
Figure SMS_22
the system state dynamic equation is:
Figure SMS_23
wherein x is 1 And x 2 Representing the state quantity of the system, K representing the variation of the mean response delay of the non-periodic task
Figure SMS_24
Average utilization rate of non-periodic tasks and H-CBS bandwidth U S The difference is greater or less>
Figure SMS_25
In a multiple relationship of, i.e. < >>
Figure SMS_26
K 1 And K 2 Is a parameter used by closed loop pole allocation and state feedback control law, namely a feedback controller coefficient.
The system closed-loop characteristic polynomial is:
f(λ)=det[λI-(A-BK)]=λ 2 +(K 2 -2)λ+1-K 2 +KK 1
in addition, the above description is given
Figure SMS_27
Where N denotes the number of executions of the aperiodic task τ, J i Represents the operation of an aperiodic task tau>
Figure SMS_28
Represents the completion time of the aperiodic task job, d (J) represents the absolute deadline of the aperiodic task job, i =1, …, N;
Figure SMS_29
indicating an average utilization of non-periodic tasks->
Figure SMS_30
And H-CBS bandwidth U S The difference between the two; wherein, the first and the second end of the pipe are connected with each other,
Figure SMS_31
Figure SMS_32
denotes the mean release interval of tau>
Figure SMS_33
Representing the actual execution time of the non-periodic task job, and N representing the execution times of the non-periodic task tau;
for the technical solution shown in fig. 1, in some possible implementations, the identifying an unknown parameter in the system state dynamic equation by using a least square method according to a control input of a controller, an actual value, a predicted value, and a residual function of a system state to obtain an identification result of the unknown parameter includes:
identifying by using a least square method according to the control input of the controller, the predicted value, the actual value and the residual function of the system state to obtain an identification result of the unknown parameter;
and solving by using a system closed-loop characteristic polynomial according to the identification result of the unknown parameter and the expected closed-loop pole so as to obtain a feedback controller coefficient.
Specifically, for the unknown parameter K in the system state dynamic equation, a least square method is used for identification. State x under the condition of a control input u (k) =0 1 The expression of (a) is:
x 1 (k+1)=x 1 (k)+Kx 2 (k)
assume state x 1 Predicted value of (2)
Figure SMS_34
The following expression is satisfied:
Figure SMS_35
then state x 1 The residual of (d) is defined as:
Figure SMS_36
the values of a and b can be obtained by the least square method:
Figure SMS_37
Figure SMS_38
Figure SMS_39
Figure SMS_40
Figure SMS_41
wherein the content of the first and second substances,
Figure SMS_42
Figure SMS_43
Figure SMS_44
Figure SMS_45
Figure SMS_46
it should be noted that the least square method is also called a least squares method, and is a mathematical optimization technique. It matches by minimizing the sum of the squares of the errors to find the best function of the data. The method of least squares can be used to easily find unknown data and minimize the sum of squares of errors between these found data and actual data, and the method of least squares can also be used for curve fitting, and other optimization problems can also be expressed by the method of least squares by minimizing energy or maximizing entropy. The term "two times" means square.
For the technical solution shown in fig. 1, in some possible implementations, the evaluating the identification result of the unknown parameter by using a root mean square error and a decision coefficient to obtain an optimal matching function of an average response delay of the aperiodic task and a difference between an utilization rate of the aperiodic task and a bandwidth of the server includes:
calculating the root mean square error by using the actual value and the predicted value of the system state so as to judge the measurement precision;
calculating a decision coefficient using a regression sum of squares and a total dispersion sum of squares of the system state to determine goodness of fit for the unknown parameter identification;
and judging the optimal value of the unknown parameter identification result of the system dynamic equation according to the root mean square error and the judgment coefficient obtained by calculation.
Specifically, a Root Mean Square Error (RMSE) and a decision coefficient R are used 2 And evaluating the parameter identification result. Where the root mean square error RMSE reflects the precision of the measurement, defined as:
Figure SMS_47
determination coefficient R 2 The closer to 1, the higher the goodness of fit of the model. In general, R 2 A fit considered acceptable > 0.8, and let var (x) be the variance of the parameter x, then it is defined as:
Figure SMS_48
and judging the optimal value of the unknown parameter identification result according to the calculation results of the root mean square error and the judgment coefficient to obtain the optimal matching function of the average response delay of the non-periodic task and the difference between the non-periodic task utilization rate and the server bandwidth.
It should be noted that the Root Mean Square Deviation RMSE, also called Root-Mean-Square Deviation (RMSD), is a commonly used measure of the difference between measured values, and RMSE is the Mean of the Square Root of the error between predicted and actual values; the decision coefficient, also called the coefficient of certainty or the coefficient of certainty, is the ratio of the sum of the squares of the regression to the sum of the squares of the total deviations in the linear regression, the value of which is equal to the square of the correlation coefficient, i.e. R 2 It is a measure of the goodness of fit of the estimated regression equation, the closer the statistic is to 1, the higher the goodness of fit of the model is; the goodness of fit refers to the degree of fit of the regression line to the observed value.
For the technical solution shown in fig. 1, in some possible implementations, the server bandwidth is dynamically adjusted according to the utilization ratio of the aperiodic task by using a best matching function of the average response delay of the aperiodic task and the difference between the utilization ratio of the aperiodic task and the server bandwidth, so as to obtain a minimized average response delay of the aperiodic task. Specifically, according to the optimal matching function, according to the utilization rate load dynamic change of the non-periodic task, and according to the method for compressing the server bandwidth in proportion, the bandwidth of the server is dynamically adjusted in real time to ensure the effectiveness of the bandwidth of the non-periodic task server, so that the utilization rate of the non-periodic task is matched, and the minimum average response delay of the non-periodic task is obtained.
Based on the technical scheme, the implementation mode and the explanation of the example, in order to verify the effect and the superiority of the feedback control H-CBS-FC algorithm based on the hard constant bandwidth server, the following two conditions are respectively compared based on a simulation experiment to obtain an analysis conclusion, wherein the two conditions are that a single non-periodic task exists in a single processor and a plurality of non-periodic tasks exist in the single processor, and specifically:
1. a set of mutually independent task sets TG = { tau on a single processor 12 }。
Wherein, tau 1 For periodic tasks, time c 1 =2ms, period p 1 =5ms, relative deadline equals period, task utilization U P =0.4;τ 2 For non-periodic tasks, the execution time obeys normal distribution c under the condition that the system normally runs 2 N (5,5), relative deadline equals release interval; initial maximum budget Q of H-CBS S0 =5ms, initial period T S0 =15ms, minimum bandwidth of server
Figure SMS_49
The sum of the periodic tasks and the H-CBS bandwidth is: u shape P +U S0 =0.733 < 1. The super-period of the task set is H =15ms, and the system sampling interval is an integral multiple of the super-period, namely T SW =60ms. Let τ be 2 Dynamic change of execution time during system operation, c 2 Satisfies the following conditions:
Figure SMS_50
let τ be 2 Respectively obey the following two probability scoresCloth condition: release intervals obey a normal distribution P 2 N (15,15), with a minimum release interval of 0.5 times the average release interval, i.e., 7.5ms; release interval obeys an exponential distribution P 2 E (1/15), the minimum release interval is 0.5 times the average release interval, i.e. 7.5ms.
2. A set of mutually independent task sets TG = { tau on a single processor 123456 }。
Wherein, { τ 123 Is a periodic task, { τ 456 The periodic tasks are non-periodic tasks, under the condition that the system normally operates, the parameters of the tasks and the server are shown in a table 1-1, the relative deadline of the periodic tasks is equal to the period, the relative deadline of the non-periodic tasks is equal to the release interval, and the minimum bandwidth of the server
Figure SMS_51
. The sum of the periodic tasks and the H-CBS bandwidth is as follows: u shape P +U S0 =0.8 < 1. The super-period of the task set is H =60ms, and considering that each task can be executed more than 1 time in one super-period, the sampling interval of the system can be the super-period of the task set, i.e. T SW =60ms。τ 5 Variation of execution time during system operation and the above-mentioned tau 2 The execution time of (c) varies the same. The release intervals of the non-periodic tasks respectively follow normal distribution and exponential distribution, and the minimum release intervals are average release intervals of 0.5 times.
TABLE 1-1 task parameters and Server parameters
Figure SMS_52
And (4) simulation conclusion:
1. system parameter identification
From the system parameters in case 1, let us assume from τ 2 Second operation J of 2,2 At the beginning, τ 2 Takes into account that in the worst case the system is overloaded, J 2,2 Execution time c of 2 Obey N (12,12), the total overload time is set to 1000ms, and the system runs the same as the overload time. For tau 2 The release intervals of (1) are subject to normal distribution and exponential distribution, and 10 groups of operation results are respectively counted.
Referring to fig. 3 and 5, the rms error and the decision coefficient of 10 groups of data with normal and exponential release intervals are shown, respectively. It can be seen that the decision coefficients are all greater than 0.8, and therefore, the group with the smallest root mean square error is selected as the final result of the system identification. As shown in fig. 4, at τ 2 Subject to a normal distribution, RMSE =4.573 2 =0.999,a =0.987,b =84.369; as shown in fig. 6, at τ 2 Subject to exponential distribution, RMSE =11.592 2 =0.996,a=1.010,b=42.590。
2. Algorithm validation
In order to verify the superiority of the algorithm, under two experimental conditions that a single processor only has one aperiodic task and the single processor has a plurality of aperiodic tasks, the influence of three different scheduling strategies, namely EDF scheduling (which can be abbreviated as EDF) without H-CBS (or can be abbreviated as H-CBS), EDF scheduling based on H-CBS (or can be abbreviated as H-CBS-FC) and EDF scheduling based on H-CBS feedback control on the utilization rate of a system processor, the periodic task miss rate, the average response delay of the aperiodic tasks and the job throughput are respectively verified by comparing the results under the condition that the single processor has only one aperiodic task and the condition that the single processor has a plurality of aperiodic tasks, the embodiment of the invention only shows the comparison results under the condition that the single processor has a plurality of aperiodic tasks, the comparison results under the condition that the single processor has only one aperiodic task are basically similar to the results under the condition that the single processor has a plurality of aperiodic tasks are as follows:
(1) Processor and task utilization
Referring to fig. 7, which shows a comparison graph of processor and task utilization rates under different scheduling strategies, when an EDF algorithm without H-CBS is used for scheduling, the processor utilization rate changes synchronously with the load change; when the H-CBS-based EDF algorithm is used for scheduling, the utilization rate of a processor is basically kept constant; when the EDF algorithm based on the H-CBS-FC is used for scheduling, the utilization rate of the processor is increased along with the increase of the load, and the utilization rate is increased after the load is reduced, and then the utilization rate is reduced after the utilization rate is continuously increased.
(2) Periodic task miss rate
Referring to fig. 8, a graph of periodic task miss rate versus scheduling policy is shown. The scheduling by using an EDF algorithm without H-CBS has the highest miss rate, and the maximum values are 0.565 and 0.680 respectively; the dispatching is carried out by using an EDF algorithm based on H-CBS, and almost no periodic task is missed; the scheduling by using the EDF algorithm based on H-CBS-FC has lower periodic task miss rate, and the maximum values are 0.078 and 0.042 respectively.
(3) Mean response delay of non-periodic tasks
Referring to fig. 9, a graph of the average response delay of aperiodic tasks under different scheduling strategies is shown. When the EDF algorithm without the H-CBS is used for scheduling, the three non-periodic tasks have similar response delay, and the maximum values are 2311ms, 2236ms and 2232ms, and 1308ms, 1311ms and 1308ms respectively; when the EDF algorithm based on H-CBS is used for scheduling and the release interval obeys normal distribution, the task tau 5 With the average response delay rising rapidly with increasing load, task τ 4 And τ 6 Gradually slowly increases with time. Task τ when the release interval follows an exponential distribution 5 The average response delay of the task (tau) is increased and then gradually decreased along with the increase of the load, the maximum value is 10780ms, and the task (tau) 4 And τ 6 The average response delay of (a) fluctuates at a lower level; when the EDF algorithm based on H-CBS-FC is used for scheduling, due to the existence of bandwidth compression, when the system load is increased, the server bandwidth of all non-periodic tasks can be redistributed, so that the task τ is removed 5 Outer, task τ 4 And τ 6 The average response delay of the three non-periodic tasks also increases along with the increase of the system load, the maximum values are 5167ms, 7295ms, 2796ms, 4551ms, 3194ms and 724ms respectively, but the average response delay of the three non-periodic tasks gradually decreases to 0 along with the decrease of the load.
(4) Job throughput
Referring to fig. 10, a graph of job throughput versus job scheduling policy is shown. The job throughputs of the three scheduling strategies are similar, and when the load is increased, the job throughputs are gradually reduced; when the load is reduced, when the EDF algorithm without the H-CBS and the EDF algorithm based on the H-CBS-FC are used for scheduling, the throughput is increased and then reduced, the throughput is kept stable, and the fluctuation amplitude of the throughput of the latter is smaller than that of the former.
Therefore, for the condition that a plurality of non-periodic tasks exist in the processor, the EDF scheduling strategy based on the H-CBS-FC can reduce the response delay of all the non-periodic tasks while ensuring that the periodic task miss rate is low and the job throughput is high.
Based on the same inventive concept of the foregoing technical solution, referring to fig. 11, it shows an aperiodic task scheduling apparatus 1100 based on a bandwidth server, where the apparatus 1100 includes: a construction section 1101, a recognition section 1102, an evaluation section 1103, an adjustment section 1104; wherein the content of the first and second substances,
the constructing part 1101 is configured to construct a system state dynamic equation by adopting a hard constant bandwidth server feedback control algorithm according to system state information of a non-periodic task operation process in the single processor system; the system state dynamic equation comprises unknown parameters of the difference multiple relation between the average response delay of the non-periodic task and the utilization rate of the non-periodic task and the bandwidth of the server;
the identification part 1102 is configured to identify the unknown parameters in the system state dynamic equation by using a least square method according to the control input of the controller, the actual value, the predicted value and the residual function of the system state, so as to obtain an identification result of the unknown parameters;
the evaluation portion 1103 is configured to evaluate the identification result of the unknown parameter by using a root mean square error and a decision coefficient to obtain a best matching function of an average response delay of the aperiodic task and a difference between an aperiodic task utilization rate and a server bandwidth;
the adjusting part 1104 is configured to dynamically adjust the server bandwidth according to the utilization ratio of the aperiodic task by using a best matching function of the average response delay of the aperiodic task and the difference between the utilization ratio of the aperiodic task and the server bandwidth to obtain a minimized average response delay of the aperiodic task.
In some examples, the build portion 1101 is configured to:
analyzing the relation between the server bandwidth and the average response delay of the non-periodic task according to the relation between the response delay of the non-periodic task and the task execution time to obtain the control input of the state feedback controller;
and constructing a system state dynamic equation by utilizing the control input and selecting the system state information of the non-periodic task in a sampling interval.
In some examples, the recognition portion 1102 is configured to:
identifying by using a least square method according to the control input of the controller, the predicted value of the system state, the actual value and the residual function so as to obtain an identification result of the unknown parameter;
and solving by using a system closed-loop characteristic polynomial according to the identification result of the unknown parameter and the expected closed-loop pole so as to obtain a feedback controller coefficient.
In some examples, the evaluation portion 1103 is configured to:
calculating the root mean square error by using the actual value and the predicted value of the system state so as to judge the measurement precision;
calculating a decision coefficient using a regression sum of squares and a total dispersion sum of squares of the system state to determine goodness of fit for the unknown parameter identification;
and judging the optimal value of the unknown parameter identification result of the system dynamic equation according to the root mean square error and the judgment coefficient obtained by calculation.
It is understood that in this embodiment, "part" may be part of a circuit, part of a processor, part of a program or software, etc., and may also be a unit, and may also be a module or a non-modular.
In addition, each component in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit. The integrated unit can be realized in a form of hardware or a form of a software functional module.
Based on the understanding that the technical solution of the present embodiment essentially or a part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, and include several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the method of the present embodiment. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Therefore, the present embodiment provides a computer storage medium, where the computer storage medium stores a program for bandwidth server-based aperiodic task scheduling, and the program for bandwidth server-based aperiodic task scheduling is executed by at least one processor to implement the steps of the bandwidth server-based aperiodic task scheduling method in the foregoing technical solution.
Referring to fig. 12, which illustrates a specific hardware structure of a computing device 1200 capable of implementing the bandwidth server based aperiodic task scheduler 1100 according to the embodiment of the present invention, the computing device 1200 may be a wireless device, a mobile or cellular phone (including a so-called smart phone), a Personal Digital Assistant (PDA), a video game console (including a video display, a mobile video game device, and a mobile video conference unit), a laptop computer, a desktop computer, a television set-top box, a tablet computing device, an e-book reader, a fixed or mobile media player, and the like. The computing device 1200 includes: a communication interface 1201, a memory 1202, and a processor 1203; the various components are coupled together by a bus system 1204. It is understood that the bus system 1204 is used to enable connective communication between these components. The bus system 1204 includes a power bus, a control bus, and a status signal bus, in addition to a data bus. For clarity of illustration, however, the various buses are designated as bus system 1204 in figure 12. Wherein the content of the first and second substances,
the communication interface 1201 is used for receiving and sending signals in the process of receiving and sending information with other external network elements;
the memory 1202 for storing a computer program operable on the processor 1203;
the processor 1203 is configured to, when the computer program is executed, execute the steps of the bandwidth server-based aperiodic task scheduling method in the foregoing technical solution.
It is to be understood that the memory 1202 in embodiments of the present invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), double Data Rate Synchronous Dynamic random access memory (ddr Data Rate SDRAM, ddr SDRAM), enhanced Synchronous SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 1202 of the systems and methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
And the processor 1203 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 1203. The Processor 1203 may be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, or discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may be located in ram, flash, rom, prom, or eprom, registers, etc. as is well known in the art. The storage medium is located in the memory 1202, and the processor 1203 reads the information in the memory 1202 to complete the steps of the above-mentioned method in combination with the hardware thereof.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the Processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
It can be understood that the above exemplary technical solutions of the bandwidth server based aperiodic task scheduling apparatus 1100 and the computing device 1200 belong to the same concept as the technical solution of the bandwidth server based aperiodic task scheduling method, and therefore, for details that are not described in detail in the above technical solutions of the bandwidth server based aperiodic task scheduling apparatus 1100 and the computing device 1200, reference may be made to the foregoing description of the technical solution of the bandwidth server based aperiodic task scheduling method. The embodiments of the present invention will not be described in detail herein.
It should be noted that: the technical schemes described in the embodiments of the present invention can be combined arbitrarily without conflict.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of the changes or substitutions within the technical scope of the present invention, and shall cover the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. An aperiodic task scheduling method based on a bandwidth server, which is characterized by comprising the following steps:
according to system state information of a non-periodic task operation process in a single processor system, a system state dynamic equation is constructed by adopting a hard constant bandwidth server feedback control algorithm; the system state dynamic equation comprises unknown parameters of the difference multiple relation between the average response delay of the non-periodic tasks and the utilization rate of the non-periodic tasks and the bandwidth of the server;
identifying unknown parameters in the system state dynamic equation by using a least square method according to the control input of a controller, the actual value, the predicted value and the residual function of the system state to obtain an identification result of the unknown parameters;
evaluating the identification result of the unknown parameters by using the root mean square error and the judgment coefficient to obtain an optimal matching function of the average response delay of the non-periodic task and the difference between the non-periodic task utilization rate and the server bandwidth;
and utilizing the optimal matching function of the average response delay of the non-periodic tasks and the difference between the non-periodic task utilization rate and the server bandwidth to dynamically adjust the server bandwidth according to the non-periodic task utilization rate so as to obtain the minimized average response delay of the non-periodic tasks.
2. The method according to claim 1, wherein a system state dynamic equation is constructed by adopting a hard constant bandwidth server feedback control algorithm according to system state information of a non-periodic task operation process in the single processor system; the system state dynamic equation comprises unknown parameters of the difference multiple relation between the average response delay of the non-periodic task and the utilization rate of the non-periodic task and the bandwidth of the server, and comprises the following steps:
analyzing the relation between the server bandwidth and the average response delay of the non-periodic task according to the relation between the response delay of the non-periodic task and the task execution time to obtain the control input of the state feedback controller;
and constructing a system state dynamic equation by utilizing the control input and selecting the system state information of the non-periodic task in a sampling interval.
3. The method according to claim 1, wherein the identifying the unknown parameters in the system state dynamic equation by using a least square method according to the control input of the controller, the actual value, the predicted value and the residual function of the system state to obtain the identification result of the unknown parameters comprises:
identifying by using a least square method according to the control input of the controller, the predicted value of the system state, the actual value and the residual function so as to obtain an identification result of the unknown parameter;
and solving by using a system closed-loop characteristic polynomial according to the identification result of the unknown parameter and the expected closed-loop pole so as to obtain a feedback controller coefficient.
4. The method of claim 1, wherein the evaluating the identification of the unknown parameters using root mean square error and decision coefficients to obtain a best match function of average response delay of the aperiodic task versus the difference between utilization of the aperiodic task and server bandwidth comprises:
calculating the root mean square error by using the actual value and the predicted value of the system state so as to judge the measurement precision;
calculating a decision coefficient using a regression sum of squares and a total dispersion sum of squares of the system state to determine goodness of fit for the unknown parameter identification;
and judging the optimal value of the unknown parameter identification result of the system dynamic equation according to the root mean square error and the judgment coefficient obtained by calculation.
5. An aperiodic task scheduler based on a bandwidth server, the device comprising: the system comprises a construction part, an identification part, an evaluation part and an adjustment part; wherein the content of the first and second substances,
the construction part is configured to construct a system state dynamic equation by adopting a hard constant bandwidth server feedback control algorithm according to system state information of a non-periodic task operation process in the single processor system; the system state dynamic equation comprises unknown parameters of the difference multiple relation between the average response delay of the non-periodic tasks and the utilization rate of the non-periodic tasks and the bandwidth of the server;
the identification part is configured to identify unknown parameters in the system state dynamic equation by using a least square method according to the control input of the controller, the actual value and the predicted value of the system state and a residual function so as to obtain an identification result of the unknown parameters;
the evaluation part is configured to evaluate the identification result of the unknown parameter by using a root mean square error and a judgment coefficient so as to obtain a best matching function of the average response delay of the non-periodic task and the difference between the non-periodic task utilization rate and the server bandwidth;
the adjusting part is configured to dynamically adjust the server bandwidth according to the utilization rate of the non-periodic task by using the optimal matching function of the average response delay of the non-periodic task and the difference between the non-periodic task utilization rate and the server bandwidth so as to obtain the minimized average response delay of the non-periodic task.
6. The apparatus of claim 5, wherein the build portion is configured to:
analyzing the relation between the server bandwidth and the average response delay of the non-periodic task according to the relation between the response delay of the non-periodic task and the task execution time to obtain the control input of the state feedback controller;
and constructing a system state dynamic equation by utilizing the control input and selecting the system state information of the non-periodic task in a sampling interval.
7. The apparatus of claim 5, wherein the recognition portion is configured to:
identifying by using a least square method according to the control input of the controller, the predicted value, the actual value and the residual function of the system state to obtain an identification result of the unknown parameter;
and solving by using a system closed-loop characteristic polynomial according to the identification result of the unknown parameter and the expected closed-loop pole so as to obtain a feedback controller coefficient.
8. The apparatus of claim 5, wherein the evaluation portion is configured to:
calculating the root mean square error by using the actual value and the predicted value of the system state so as to judge the measurement precision;
calculating a decision coefficient using a regression sum of squares and a total dispersion sum of squares of the system state to determine goodness of fit for the unknown parameter identification;
and judging the optimal value of the unknown parameter identification result of the system dynamic equation according to the root mean square error and the judgment coefficient obtained by calculation.
9. A computing device, wherein the computing device comprises: a communication interface, a processor, a memory; the various components are coupled together by a bus system; wherein the content of the first and second substances,
the communication interface is used for receiving and sending signals in the process of receiving and sending information with other external network elements;
the memory for storing a computer program operable on the processor;
the processor, when executing the computer program, is configured to perform the steps of the bandwidth server based aperiodic task scheduling method according to any one of claims 1 to 4.
10. A computer storage medium storing a program for bandwidth server based aperiodic task scheduling, which when executed by at least one processor implements the steps of the method for bandwidth server based aperiodic task scheduling according to any one of claims 1 to 4.
CN202211177286.1A 2022-09-26 Non-periodic task scheduling method, device and medium based on bandwidth server Active CN115866054B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211177286.1A CN115866054B (en) 2022-09-26 Non-periodic task scheduling method, device and medium based on bandwidth server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211177286.1A CN115866054B (en) 2022-09-26 Non-periodic task scheduling method, device and medium based on bandwidth server

Publications (2)

Publication Number Publication Date
CN115866054A true CN115866054A (en) 2023-03-28
CN115866054B CN115866054B (en) 2024-04-26

Family

ID=

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630126A (en) * 2014-11-05 2016-06-01 中国科学院沈阳计算技术研究所有限公司 Low-power scheduling method for mixed task based on constant bandwidth server
CN107181617A (en) * 2010-12-09 2017-09-19 台湾积体电路制造股份有限公司 Packet management system and method in communication network
US20200252949A1 (en) * 2019-01-31 2020-08-06 Apple Inc. Dynamic Bandwidth Adaptation with Network Scheduling

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107181617A (en) * 2010-12-09 2017-09-19 台湾积体电路制造股份有限公司 Packet management system and method in communication network
CN105630126A (en) * 2014-11-05 2016-06-01 中国科学院沈阳计算技术研究所有限公司 Low-power scheduling method for mixed task based on constant bandwidth server
US20200252949A1 (en) * 2019-01-31 2020-08-06 Apple Inc. Dynamic Bandwidth Adaptation with Network Scheduling

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
ALESSANDRO BIONDI: "Hard Constant Bandwidth Server:Comprehensive formulation and critical scenarios", IEEE, 7 August 2014 (2014-08-07) *
ALESSANDRO BIONDI: "Resource reservation for real-time self-suspending tasks: theory and practice", ACM, 4 November 2015 (2015-11-04) *
CASINI, DANIEL: "Constant Bandwidth Servers with Constrained Deadlines", ACM, 4 October 2017 (2017-10-04) *
JIANKANG REN: "Execution allowance based fixed priority scheduling for probaliistic real-time systems", ELSEVIER, 2 March 2019 (2019-03-02) *

Similar Documents

Publication Publication Date Title
US11601512B2 (en) System and method for throttling service requests having non-uniform workloads
Lu et al. Design and evaluation of a feedback control EDF scheduling algorithm
US8307370B2 (en) Apparatus and method for balancing load in multi-core processor system
US7581008B2 (en) System and method for allocating server resources
US7346401B2 (en) Systems and methods for providing constrained optimization using adaptive regulatory control
US8429441B2 (en) Operating processor below maximum turbo mode frequency by sending higher than actual current amount signal to monitor
US20160116954A1 (en) Dynamic adjustment of cpu operating frequency
US20060090163A1 (en) Method of controlling access to computing resource within shared computing environment
US20120144392A1 (en) Resource Manager for Managing Hardware Resources
US11221876B2 (en) Scheduling applications in CPU and GPU hybrid environments
US20140259018A1 (en) Backoff Job Queue Polling Mechanism
US10761592B2 (en) Power subsystem-monitoring-based graphics processing system
US20230214002A1 (en) Power Consumption Management Method and Related Device
US10248618B1 (en) Scheduling snapshots
CA2637987C (en) Method for autonomic system management using adaptive allocation of resources
CN115866054A (en) Non-periodic task scheduling method, device and medium based on bandwidth server
CN111694653A (en) Method, device and system for adjusting distribution of calculation operator types in calculation system
He et al. Budget-based control for interactive services with adaptive execution
CN115866054B (en) Non-periodic task scheduling method, device and medium based on bandwidth server
CN110647437B (en) Method, device, terminal and medium for adjusting CPU utilization rate based on PID controller
Sahoo et al. Feedback control for real-time scheduling
CN112631512B (en) Method and equipment for adaptive steady state of SSD
US20120131586A1 (en) Apparatus and method for controlling response time of application program
CN112669091A (en) Data processing method, device and storage medium
US20130166871A1 (en) Memory control method for a computer system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant