A dynamic voltage and frequency regulation scheduling method and device based on balanced optimization
By adopting the equalization optimization method in dynamic voltage frequency adjustment, the task set is built and the maximum task execution time is optimized, the problem of low power consumption optimization efficiency in the existing technology is solved, and the low power consumption design in navigation equipment is realized. in multi-channel real-time system.
Patent Information
- Application Number
- CN202210351127.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-02
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2042-04-02
AI Technical Summary
The existing dynamic voltage frequency adjustment method is low in power consumption optimization efficiency when dealing with task sets with dynamic changes in timing parameters, and fails to fully consider the timing requirements of task sets.
Using a dynamic voltage frequency adjustment and scheduling method based on equalization optimization, the channel task set is constructed, the initial weighting factor and energy-saving factor are calculated according to the equalization criterion, and the monotonic function-optimized dichotomy search algorithm is used to search and satisfy the task within the task set utilization range. The determined task utilization rate can be scheduled, optimized the maximum task execution time, and dynamically adjust the frequency and voltage.
It realizes the rapid solution to energy-saving factors while meeting the receiver timing requirements, optimizes task execution time allocation, and reduces system power consumption. It is suitable for energy-saving designs for dynamic voltage frequency adjustment of multi-channel real-time system.
Smart Images

Figure CN114996896B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of satellite navigation technology, and in particular to a method and device for dynamic voltage and frequency regulation and scheduling based on equilibrium optimization. Background Art
[0002] For high-precision measurement receivers powered by ground stations, as well as receivers powered by vehicles, ships, aircraft and other transport carriers, low-power design is conducive to system heat dissipation design and extends the working life of the equipment. Satellite navigation terminals are battery-powered in navigation satellites, handheld applications, and portable applications. The low-power design of navigation equipment must consider improving battery life. Modern embedded designs widely use dynamic voltage and frequency adjustment technology, accompanied by the use of dynamic power management technologies such as standby, sleep, and power off to achieve system low-power design.
[0003] The power consumption optimization design during the visible satellite signal reception period is the focus of the energy-saving design of the navigation receiver. Traditional methods include establishing a power consumption model based on a low-power system-on-chip with dynamic voltage and frequency adjustment, and using two dynamic priority energy-saving scheduling methods, CCEDF (Cycle Conserving EDF) and LAEDF (Look Ahead EDF), to evaluate the power consumption optimization effect of the processor. There is also a method of considering the task preemptive scheduling in the hard real-time system, using the method of quantitative hierarchical selection of voltage and frequency of each task to obtain the lowest possible processor power consumption.
[0004] However, current dynamic voltage and frequency adjustment methods pay little attention to the task set with dynamically changing timing parameters, and suffer from problems such as low power consumption optimization efficiency. Summary of the invention
[0005] Based on this, it is necessary to provide a dynamic voltage and frequency adjustment scheduling method, device, computer equipment and storage medium based on balanced optimization to address the above technical problems.
[0006] A dynamic voltage and frequency regulation and scheduling method based on balanced optimization, the method comprising:
[0007] Constructing a channel task set; the tasks in the channel task set include a maximum task execution time, a task cycle, and a task relative deadline;
[0008] According to the balance criterion, an initial weighting factor is obtained, and according to the utilization upper bound of the scheduling algorithm, the initial weighting factor and the task utilization, an initial energy saving factor is obtained;
[0009] Input the initial weighting factor and the initial energy-saving factor into a monotone function optimized bisection search algorithm, optimize the maximum execution time of the task by searching for the task utilization that satisfies the task schedulability determination within the task set utilization range, and output the weighting factor and the energy-saving factor according to the searched task utilization;
[0010] The working frequency of the task is obtained according to the weighting factor and the energy-saving factor, and the frequency and voltage are adjusted by dynamically adjusting the voltage and frequency and the working frequency to obtain the task scheduling result of real-time work.
[0011] In one embodiment, the method further includes: according to the balance criterion, obtaining a weighted factor calculation formula: Under the utilization balance criterion, the weighted factor is expressed as:
[0012]
[0013] Under the utilization inverse equilibrium criterion, the weighting factor is expressed as:
[0014]
[0015] in, For the The task utilization rate of each task, For the The task utilization rate of each task, , is the maximum number of tasks, , is the maximum execution time of the task, is the task cycle, , is the number of channels, is the maximum instruction cycle of a single-channel task, is the operating frequency; and according to the weighting factor calculation formula, an initial weighting factor is obtained.
[0016] In one embodiment, the method further includes: obtaining a calculation formula of an energy saving factor according to an upper limit of utilization of a scheduling algorithm, the initial weighting factor and task utilization:
[0017]
[0018] in, is the upper bound of the task set utilization of the scheduling algorithm, express A one-dimensional vector of represents the weighting factor, express A one-dimensional vector of Indicates The task utilization rate of each task, , is the maximum execution time of the task, is the task cycle, , is the number of channels, is the maximum instruction cycle of a single-channel task, is the operating frequency; and according to the calculation formula of the energy-saving factor, the initial energy-saving factor is obtained.
[0019] In one of the embodiments, it also includes: inputting the initial weighting factor and the initial energy-saving factor into a monotonic function optimized bisection search algorithm; when the difference between the median of the task set utilization and the lower bound of the task set utilization is not less than the step interval, searching for the task utilization within the task set utilization range through the monotonic function optimized bisection search algorithm, and updating the weighting factor and the energy-saving factor according to the task utilization obtained by the search; obtaining a task schedulability judgment according to the task cycle, the maximum execution time of the task, the relative deadline of the task and the task priority, and optimizing the maximum execution time of the task according to the task schedulability judgment; updating the task set utilization value range according to the task schedulability judgment result, and when the difference between the median of the task set utilization and the lower bound of the task set utilization is less than the step interval, outputting the updated weighting factor and the energy-saving factor to obtain the weighting factor and the energy-saving factor.
[0020] In one embodiment, the method further includes: obtaining a task schedulability determination based on the task cycle, the maximum task execution time, the task relative deadline and the task priority as follows:
[0021]
[0022] in, , Indicates that the priority is higher than the task The task set, Indicates that the priority is equal to the task The task set, Indicates that the priority is higher than or equal to the task The CPU time occupied by the task running, Indicates the task The maximum execution time of Indicates the relative deadline of the task. represents any time within the task's relative deadline, Indicates rounding up.
[0023] In one embodiment, it also includes:
[0024]
[0025] in, is the reference frequency, is the minimum task operating frequency, is the maximum task operating frequency, , is the weighting factor, is the energy saving factor, Indicates rounding up.
[0026] In one of the embodiments, it also includes: pre-calculating the energy saving factor offline according to the equalization criterion, the number of channels and the bisection search algorithm optimized by the monotonic function, and constructing an energy saving factor lookup table; searching the energy saving factor lookup table according to the current equalization criterion and the number of channels to obtain the energy saving factor for online application.
[0027] A dynamic voltage and frequency regulation and scheduling device based on balanced optimization, the device comprising:
[0028] A task set building module is used to build a channel task set; the tasks in the channel task set include a maximum task execution time, a task cycle, and a task relative deadline;
[0029] An initial value setting module is used to obtain an initial weighting factor according to a balance criterion, and to obtain an initial energy saving factor according to an upper bound of utilization of a scheduling algorithm, the weighting factor and task utilization;
[0030] An optimization module, used for inputting the initial weighting factor and the initial energy-saving factor into a bisection search algorithm optimized by a monotone function, optimizing the maximum execution time of the task by searching for a task utilization rate that satisfies the task schedulability determination within the task set utilization rate range, and outputting a weighting factor and an energy-saving factor according to the task utilization rate obtained by the search;
[0031] The scheduling module is used to obtain the working frequency of the task according to the weighting factor and the energy-saving factor, and adjust the frequency and voltage through dynamic voltage and frequency regulation and the working frequency to obtain the task scheduling result of real-time work.
[0032] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0033] Constructing a channel task set; the tasks in the channel task set include a maximum task execution time, a task cycle, and a task relative deadline;
[0034] According to the balance criterion, an initial weighting factor is obtained, and according to the utilization upper bound of the scheduling algorithm, the initial weighting factor and the task utilization, an initial energy saving factor is obtained;
[0035] Input the initial weighting factor and the initial energy-saving factor into a monotone function optimized bisection search algorithm, optimize the maximum execution time of the task by searching for the task utilization that satisfies the task schedulability determination within the task set utilization range, and output the weighting factor and the energy-saving factor according to the searched task utilization;
[0036] The working frequency of the task is obtained according to the weighting factor and the energy-saving factor, and the frequency and voltage are adjusted by dynamically adjusting the voltage and frequency and the working frequency to obtain the task scheduling result of real-time work.
[0037] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0038] Constructing a channel task set; the tasks in the channel task set include a maximum task execution time, a task cycle, and a task relative deadline;
[0039] According to the balance criterion, an initial weighting factor is obtained, and according to the utilization upper bound of the scheduling algorithm, the initial weighting factor and the task utilization, an initial energy saving factor is obtained;
[0040] Input the initial weighting factor and the initial energy-saving factor into a monotone function optimized bisection search algorithm, optimize the maximum execution time of the task by searching for the task utilization that satisfies the task schedulability determination within the task set utilization range, and output the weighting factor and the energy-saving factor according to the searched task utilization;
[0041] The working frequency of the task is obtained according to the weighting factor and the energy-saving factor, and the frequency and voltage are adjusted by dynamically adjusting the voltage and frequency and the working frequency to obtain the task scheduling result of real-time work.
[0042] The above-mentioned dynamic voltage and frequency adjustment scheduling method, device, computer equipment and storage medium based on balanced optimization define the initial weighting factor of the task through the balanced criterion, solve the initial energy-saving factor of the system through the utilization rate, and optimize the energy-saving factor based on the initial weighting factor and the initial energy-saving factor, and use the monotonic function to optimize the execution time search method to optimize the energy-saving factor, which can quickly solve the energy-saving factor that meets the timing requirements of the receiver. According to the energy-saving factor obtained by the search, the working frequency of the task is planned, thereby optimizing the task execution time allocation, dynamically adjusting the frequency and voltage, so that the real-time normal operation can be carried out while reducing the system power consumption as much as possible. The embodiment of the present invention can be not limited to the scheduling algorithm and its scheduling judgment criteria, and can be extended to the energy-saving design of dynamic voltage and frequency adjustment of multi-channel real-time systems. The idea based on balanced optimization of utilization can be conveniently applied to the energy-saving scheduling of single-core / multi-core processors. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a flowchart of a dynamic voltage and frequency adjustment and scheduling method based on balanced optimization in one embodiment;
[0044] Figure 2 A task block diagram of baseband signal processing of a navigation device in one embodiment;
[0045] Figure 3 A schematic diagram of a process of searching for energy-saving factors in one embodiment;
[0046] Figure 4 A schematic diagram of the results of a Monte Carlo simulation of dynamic voltage and frequency regulation in a specific embodiment;
[0047] Figure 5 (a) is a schematic diagram of the number of satellites visible within 24 hours in one embodiment;
[0048] Figure 5 (b) is a schematic diagram of the operating frequency of a navigation device in one embodiment;
[0049] Figure 5 (c) is a schematic diagram of energy saving factors of a navigation device in one embodiment;
[0050] Figure 5 (d) is a schematic diagram of the core power consumption of a navigation device in one embodiment;
[0051] Figure 6 It is a structural block diagram of a dynamic voltage and frequency regulation and scheduling device based on balanced optimization in one embodiment;
[0052] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0054] The dynamic voltage and frequency regulation and scheduling method based on balanced optimization provided in the present application can be applied to energy-saving scheduling of navigation equipment.
[0055] In one embodiment, Figure 1 As shown, a dynamic voltage and frequency adjustment scheduling method based on balanced optimization is provided, comprising the following steps:
[0056] Step 102, construct a channel task set.
[0057] The tasks in the channel task set include the maximum execution time of the task, the task cycle, and the relative deadline of the task. The receiver of the channel is Figure 2 As shown, the receiver is turned on when working channels, The value is dynamically adjusted according to the number of currently visible satellites. When each channel is working, it completes the corresponding satellite signal capture, tracking, demodulation, message processing and other navigation tasks. In order to make the receiver work properly, consider scheduling navigation tasks, and the task set is recorded as The task is modeled as the following triple:
[0058]
[0059] in, Indicates the maximum execution time of the task. Represents the task cycle, Indicates the relative deadline of the task. , is the maximum number of tasks.
[0060] Step 104, according to the balance criterion, an initial weighting factor is obtained, and according to the utilization upper bound of the scheduling algorithm, the initial weighting factor and the task utilization, an initial energy saving factor is obtained.
[0061] The balance criteria include utilization balance criteria and utilization inverse balance criteria. The utilization balance criteria refers to weighting in proportion to task utilization, while the utilization inverse balance criteria refers to weighting in inverse proportion to task utilization. The weighting factor is a value weighted by the proportion of task utilization according to the selected balance criteria. Define tasks The utilization rate is:
[0062]
[0063] in, is the maximum execution time of the task, is the task cycle. Scheduling algorithms include RM (Rate Monotonic) and EDF (Earliest Deadline First). The upper limit of the utilization of the scheduling algorithm refers to the percentage of the total running time of the task set to the total CPU running time under the scheduling algorithm. The energy saving factor is defined as the reciprocal of the task working frequency. The working frequency of the task can be determined by the energy saving factor, thereby reducing the system energy consumption through dynamic voltage and frequency adjustment technology. The initial weighting factor is obtained through the balance criterion, the initial energy saving factor is calculated through the energy saving factor calculation formula, and the initial task utilization is calculated by the initial task related parameters and the initial operating frequency of the processor.
[0064] Step 106, input the initial weighting factor and the initial energy-saving factor into the monotonic function optimized bisection search algorithm, optimize the maximum task execution time by searching for the task utilization that meets the task schedulability judgment within the task set utilization range, and output the weighting factor and energy-saving factor based on the task utilization obtained by the search.
[0065] By using a monotonic function to optimize the binary search algorithm, we can efficiently search for the task utilization that makes the task set schedulable between the upper and lower bounds of the task set utilization. By comprehensively judging the maximum execution time of the task set, we can optimize the energy-saving factor and convert the dynamic adjustment of frequency and voltage into a reasonable allocation of execution time.
[0066] Step 108, according to the weighting factor and the energy-saving factor, the working frequency of the task work is obtained, and the frequency and voltage are adjusted by dynamically adjusting the voltage and frequency and the working frequency of the task work to obtain the task scheduling result of the real-time work.
[0067] The principle of dynamic voltage-frequency regulation applied to the embodiment of the present invention is as follows:
[0068] The core power consumption of processors based on modern CMOS technology consists of dynamic power and static power:
[0069]
[0070] Among them, dynamic power , static power , α represents the efficiency factor, represents the switched capacitance, Indicates the core supply voltage, Indicates the processor operating frequency. Represents leakage current, which is usually in the milliampere or even microampere range, and static power can be ignored. The number of instruction cycles run by the processor per unit time is:
[0071]
[0072] Ignoring static power consumption, the energy consumption per unit time can be obtained as:
[0073]
[0074] When the core voltage decreases, the processor power consumption decreases at a square level. The core voltage cannot be lower than the transistor threshold voltage. Within the effective operating range of the CMOS circuit, the processor operating frequency is approximately linearly related to the core voltage - as the voltage decreases, the frequency also decreases accordingly. A decrease in operating frequency will linearly increase the task execution time, thereby affecting the real-time performance of task execution.
[0075] In the above-mentioned dynamic voltage and frequency adjustment scheduling method based on balanced optimization, the initial weighting factor of the task is defined by the balanced criterion, the initial energy-saving factor of the system is solved by the utilization rate, and the energy-saving factor is optimized by using the monotonic function to optimize the execution time search method according to the initial weighting factor and the initial energy-saving factor. According to the energy-saving factor obtained by the search, the working frequency of the task is planned, thereby optimizing the task execution time allocation, dynamically adjusting the frequency and voltage, so that the system power consumption can be reduced as much as possible while working normally in real time. The embodiment of the present invention is not limited to the scheduling algorithm and its scheduling judgment criteria, and can be extended to the energy-saving design of dynamic voltage and frequency adjustment of multi-channel real-time systems. The idea based on balanced optimization of utilization can be conveniently applied to the energy-saving scheduling of single-core / multi-core processors.
[0076] Normal system scheduling means reasonable design parameters , , , ensuring that all tasks can be completed before the deadline and that the task set is schedulable. Let the scheduling algorithm be Ψ , since the receiver period and deadline are determined by the system requirements, T i and D i is a fixed parameter, so the task scheduling algorithm can be simplified as:
[0077]
[0078] Consider the receiver has If the single channel task is working at the same time, the frequency division method between tasks is adopted. Reducing the frequency will linearly increase the task execution time. The maximum instruction cycle is , the operating frequency is , then the maximum execution time corresponding to a single-channel task is , The maximum execution time of a channel is:
[0079]
[0080] In summary, the energy-saving scheduling optimization goal of the present invention is: minimized, and Scheduling available.
[0081] According to the energy-saving scheduling optimization target, m , n i The key to energy-saving scheduling is to determine the appropriate , define the task The energy saving factor is:
[0082]
[0083] In one embodiment, according to the equalization criterion, the step of obtaining the initial weighting factor includes:
[0084] According to the balance criterion, the weighted factor calculation formula is obtained as follows: Under the utilization balance criterion, the weighted factor is expressed as:
[0085]
[0086] Under the utilization inverse equilibrium criterion, the weighting factor is expressed as:
[0087]
[0088] in, For the The task utilization rate of each task, For the The task utilization rate of each task, , is the maximum number of tasks, , is the maximum execution time of the task, is the task cycle, , is the number of channels, is the maximum instruction cycle of a single-channel task, is the operating frequency; according to the weighting factor calculation formula, the initial weighting factor is obtained.
[0089] In this embodiment, different weighting criteria will affect W i The value of, under the utilization balance criterion, the weighted utilization is proportional to the single channel utilization, the weighting factor value is constant, under the utilization inverse balance criterion, the weighted utilization is always equal to , the weighting factor changes inversely proportional to the single channel utilization.
[0090] In one embodiment, the step of obtaining the initial energy saving factor includes: according to the utilization upper bound of the scheduling algorithm, the initial weighting factor and the task utilization, the calculation formula of the energy saving factor is obtained as follows:
[0091]
[0092] in, is the upper bound of the task set utilization of the scheduling algorithm, express A one-dimensional vector of represents the weighting factor, express A one-dimensional vector of Indicates The task utilization rate of each task, , is the maximum execution time of the task, is the task cycle, , is the number of channels, is the maximum instruction cycle of a single-channel task, is the operating frequency; according to the calculation formula of the energy-saving factor, the initial energy-saving factor is obtained.
[0093] In this embodiment, RM and DEF are taken as examples to illustrate the upper bounds of the utilization of the scheduling algorithm. The upper bounds of RM and EDF scheduling are:
[0094]
[0095]
[0096] In one embodiment, Figure 3 As shown, a flow chart of energy-saving factor search is provided, wherein an initial weighting factor and an initial energy-saving factor are input into a bisection search algorithm optimized by a monotone function, and the maximum execution time of the task is optimized by searching for the task utilization that satisfies the task schedulability judgment within the task set utilization range. According to the task utilization obtained by the search, the weighting factor and the energy-saving factor are output, which includes: inputting the initial weighting factor and the initial energy-saving factor into the bisection search algorithm optimized by a monotone function; when the difference between the median value of the task set utilization and the lower bound of the task set utilization is not less than the step interval, searching for the task utilization within the task set utilization range by the bisection search algorithm optimized by a monotone function, and updating the weighting factor and the energy-saving factor according to the task utilization obtained by the search; obtaining the task schedulability judgment according to the task cycle, the maximum execution time of the task, the relative deadline of the task and the task priority, and optimizing the maximum execution time of the task according to the task schedulability judgment; updating the value range of the task set utilization according to the task schedulability judgment result, and when the difference between the median value of the task set utilization and the lower bound of the task set utilization is less than the step interval, outputting the updated weighting factor and the energy-saving factor to obtain the weighting factor and the energy-saving factor.
[0097] In this embodiment, the algorithm process also includes: inputting the initial weighting factor and the initial energy-saving factor into the monotonic function optimized binary search algorithm, when the difference between the median of the task set utilization and the lower bound of the task set utilization is less than the step interval, outputting the initial weighting factor to obtain the weighting factor, outputting the initial energy-saving factor to obtain the energy-saving factor. Figure 3 middle, Um is the median utilization of the task set, Uis the task set utilization, which is the sum of the task utilizations of the tasks in the channel task set, ∆ is the step interval, which is a manually defined step size, depending on the granularity required by the algorithm, and can generally be taken as , the RM upper bound is not sufficient and necessary, that is, the utilization rate below the RM upper bound must be schedulable, and the utilization rate above the RM upper bound may be schedulable or not, so the RM upper bound is selected as the lower bound of the initial search task set utilization. The EDF upper bound is necessary and sufficient, and it is also the highest possible task set utilization. Considering the reliability and real-time requirements, the navigation equipment adopts static priority scheduling design. Static priority scheduling judgment is an NP (Non- deterministic Polynomial) problem. In the task set utilization value range [ , 100%], the commonly used bisection search method for monotonic function optimization is used to optimize the energy-saving factor, which can improve the optimization efficiency of NP problems.
[0098] In one embodiment, obtaining a task schedulability determination according to the task cycle, the maximum task execution time, the task relative deadline and the task priority includes: obtaining a task schedulability determination according to the task cycle, the maximum task execution time, the task relative deadline and the task priority as follows:
[0099]
[0100] in, , Indicates that the priority is higher than the task The task set, Indicates that the priority is equal to the task The task set, Indicates that the priority is higher than or equal to the task The CPU time occupied by the task running, Indicates the task The maximum execution time of Indicates the relative deadline of the task. represents any time within the task's relative deadline, Indicates rounding up.
[0101] In this embodiment, taking the Katcher criterion applied to the embodiment of the present invention as an example, different priorities can be given to real-time tasks according to the different urgency of the real-time tasks, so that high-priority tasks can obtain system resources first and be executed as soon as possible. The method of the present invention is not limited to the scheduling algorithm and its scheduling judgment criteria, and can be extended to the DVFS energy-saving design of multi-channel real-time systems.
[0102] In one embodiment, the calculation formula of the working frequency of the task is expressed as:
[0103]
[0104] in, is the reference frequency, is the minimum task operating frequency, is the maximum task operating frequency, , is the weighting factor, is the energy saving factor, Indicates rounding up.
[0105] In this embodiment, the reference frequency is used in actual application, and the working frequency of the task can be a multiple or a division of the reference frequency. , the task working frequency range is [ , ], positive integer < .
[0106] In one embodiment, the method further includes: pre-calculating the energy-saving factor offline and constructing an energy-saving factor lookup table according to a bisection search algorithm optimized based on the equalization criterion, the number of channels and the monotonic function; searching the energy-saving factor lookup table according to the current equalization criterion and the number of channels to obtain the energy-saving factor for online application.
[0107] In this embodiment, since scheduling decision usually takes a long time, in order to facilitate online application, various weighting criteria and channel numbers are used to determine the scheduling decision. , calculate the energy saving factor offline in advance, and use it online according to the current weighted criteria and The value can be obtained by quick table lookup, as shown in the following table:
[0108] Table 1. Energy saving factor lookup table
[0109]
[0110] The single-channel mission parameters of a navigation receiving device with a 400MHz operating frequency are as follows:
[0111] Table 2. Single-channel mission set parameters of a navigation receiver
[0112]
[0113] Consider the base frequency f 0=10M, use the utilization balancing weighted method based on the Katcher criterion, and examine different numbers of channels The corresponding optimal power consumption is The value ranges from 5 to 12. The power of 5 channels working simultaneously at 200MHz is recorded as P 0. Channel The power consumption of the processor core under different values is shown in the following table:
[0114] Table 3. Channel values Correspondence table with operating frequency and power
[0115]
[0116] Determine the number of receiver working channels according to the number of visible navigation satellites, optimize the execution time allocation of navigation tasks, and dynamically adjust the frequency and voltage.
[0117] In a specific embodiment, Figure 4 As shown in FIG. 1 , a schematic diagram of the Monte Carlo simulation results of dynamic voltage and frequency regulation is provided. The Monte Carlo simulation experiment is used to randomly generate a task set, and the task parameters are selected as follows:
[0118] 1) Number of tasks The value starts from 2 and increases in steps of 2 to 20;
[0119] 2) The task period is uniformly and randomly generated in the range of [1, 1000];
[0120] 3) The initial utilization rate of the task is (0, ] are generated uniformly randomly within the range.
[0121] For the number of tasks N For each value of , 1000 independent simulation tests are performed to generate the corresponding task set. The RM upper bound and Katcher criterion are used to find the optimal power consumption of the dynamic voltage and frequency regulation of the task set. The RM upper bound is used as a schedulable judgment. N The 1000 groups of normalized power consumption corresponding to the value are averaged, and the optimal power consumption is normalized to 1 when the utilization rate is 100%, which is obtained by Figure 4It can be seen that the power consumption based on the Katcher criterion is better than the power consumption based on the RM upper bound, because the use of the Katcher criterion optimization can obtain a higher processor utilization, thereby reducing the operating frequency to a greater extent. On the other hand, under the same optimization criterion, the power consumption obtained by the utilization balance weighting is better than the power consumption obtained by the utilization inverse balance weighting, because when the utilization balance weighting is used, each task is proportionally reduced in frequency, and the power consumption of each task is reduced in the same proportion; but in most cases, the utilization inverse balance weighting makes the frequency reduction ratio of each task unbalanced, although the frequency reduction ratio of some tasks is more significant than the balanced situation, but some tasks are less reduced in frequency, and may even increase in frequency, so the average power consumption of the utilization inverse balance weighting is greater. The simulation results show that the method of the present invention is concise and intuitive, and can quickly solve the energy-saving factor that meets the timing requirements of the navigation device, thereby realizing the energy-saving scheduling of the navigation device by adjusting the task working frequency. In addition, compared with the utilization inverse balance criterion, the utilization balance criterion can obtain the energy-saving factor of each task in proportion, which is more suitable for the energy-saving design of multi-channel receivers, and provides a fast method for the top-level design of navigation energy-saving scheduling.
[0122] In a specific embodiment, based on the utilization balance weighting method of the scheduling decision criterion table lookup, the power consumption of a navigation receiving device is analyzed, wherein: Figure 5 (a) is the change of the number of visible satellites observed by the receiver in 24 hours. The number of channels of the device is the number of visible satellites at the current moment. Figure 5 (b) shows how the operating frequency selected by the receiver changes over time, and the frequency is proportional to the number of operating channels. Figure 5 (c) shows how the energy saving factor of the device changes over time. The energy saving factor is inversely proportional to the number of working channels. Figure 5 (d) represents the instantaneous power of the receiver core. It can be seen from the curve in the figure that, compared with the case where the receiver operates at a constant frequency of 400 MHz, the average power consumed by the dynamic voltage and frequency regulation of the receiver processor core under the method of the present invention is reduced by about 23.6%.
[0123] It should be understood that although Figure 1 and Figure 3 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in the present invention, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 and Figure 3At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0124] In one embodiment, Figure 6 As shown, a dynamic voltage and frequency regulation and scheduling device based on balanced optimization is provided, including: a task set construction module 602, an initial value setting module 604, an optimization module 606 and a scheduling module 608, wherein:
[0125] A task set building module 602 is used to build a channel task set; the tasks in the channel task set include the maximum execution time of the task, the task cycle, and the relative deadline of the task;
[0126] The initial value setting module 604 is used to obtain an initial weighting factor according to the balance criterion, and obtain an initial energy saving factor according to the utilization upper bound of the scheduling algorithm, the initial weighting factor and the task utilization;
[0127] The optimization module 606 is used to input the initial weighting factor and the initial energy-saving factor into the bisection search algorithm optimized by the monotone function, optimize the maximum execution time of the task by searching for the task utilization that meets the task schedulability judgment within the task set utilization range, and output the weighting factor and the energy-saving factor according to the searched task utilization;
[0128] The scheduling module 608 is used to obtain the working frequency of the task according to the weighting factor and the energy-saving factor, and to adjust the frequency and voltage through dynamic voltage and frequency regulation and working frequency to obtain the task scheduling result of real-time work.
[0129] In one embodiment, the initial value setting module 604 is further used to: according to the balance criterion, obtain the weighted factor calculation formula: Under the utilization balance criterion, the weighted factor is expressed as:
[0130]
[0131] Under the utilization inverse equilibrium criterion, the weighting factor is expressed as:
[0132]
[0133] in, For the The task utilization rate of each task, For the The task utilization rate of each task, , is the maximum number of tasks, , is the maximum execution time of the task, is the task cycle, , is the number of channels, is the maximum instruction cycle of a single-channel task, is the operating frequency; according to the weighting factor calculation formula, the initial weighting factor is obtained.
[0134] In one embodiment, the initial value setting module 604 is further used to obtain the calculation formula of the energy saving factor according to the utilization upper limit of the scheduling algorithm, the initial weighting factor and the task utilization:
[0135]
[0136] in, is the upper bound of the task set utilization of the scheduling algorithm, express A one-dimensional vector of represents the weighting factor, express A one-dimensional vector of Indicates The task utilization rate of each task, , is the maximum execution time of the task, is the task cycle, , is the number of channels, is the maximum instruction cycle of a single-channel task, is the operating frequency; according to the calculation formula of the energy-saving factor, the initial energy-saving factor is obtained.
[0137] In one of the embodiments, the optimization module 606 is also used to input the initial weighting factor and the initial energy-saving factor into a monotonic function optimized bisection search algorithm; when the difference between the median of the task set utilization and the lower bound of the task set utilization is not less than the step interval, the task utilization is searched within the task set utilization range by the monotonic function optimized bisection search algorithm, and the weighting factor and the energy-saving factor are updated according to the task utilization obtained by the search; the task schedulability judgment is obtained according to the task cycle, the maximum execution time of the task, the relative deadline of the task and the task priority, and the maximum execution time of the task is optimized according to the task schedulability judgment; the task set utilization value range is updated according to the task schedulability judgment result, and when the difference between the median of the task set utilization and the lower bound of the task set utilization is less than the step interval, the updated weighting factor and energy-saving factor are output to obtain the weighting factor and the energy-saving factor.
[0138] In one embodiment, the optimization module 606 is further configured to determine the task schedulability according to the task cycle, the maximum execution time of the task, the relative deadline of the task, and the task priority:
[0139]
[0140] in, , Indicates that the priority is higher than the task The task set, Indicates that the priority is equal to the task The task set, Indicates that the priority is higher than or equal to the task The CPU time occupied by the task running, Indicates the task The maximum execution time of Indicates the relative deadline of the task. represents any time within the task's relative deadline, Indicates rounding up.
[0141] In one embodiment, the scheduling module 608 is further used to calculate the working frequency of the task as follows:
[0142]
[0143] in, is the reference frequency, is the minimum task operating frequency, is the maximum task operating frequency, , is the weighting factor, is the energy saving factor, Indicates rounding up.
[0144] In one of the embodiments, it is also used to pre-calculate the energy-saving factor offline and construct an energy-saving factor lookup table based on the equalization criterion, the number of channels and the bisection search algorithm optimized by the monotonic function; search the energy-saving factor lookup table according to the current equalization criterion and the number of channels to obtain the energy-saving factor for online application.
[0145] For the specific limitations of the dynamic voltage and frequency regulation and scheduling device based on balanced optimization, please refer to the limitations of the dynamic voltage and frequency regulation and scheduling method based on balanced optimization above, which will not be repeated here. Each module in the above-mentioned dynamic voltage and frequency regulation and scheduling device based on balanced optimization can be implemented in whole or in part through software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0146] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a dynamic voltage and frequency adjustment scheduling method based on balanced optimization is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0147] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0148] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method in the above embodiment when executing the computer program.
[0149] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method in the above embodiment are implemented.
[0150] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0151] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0152] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A dynamic voltage and frequency regulation and scheduling method based on balanced optimization, characterized in that: The method comprises: Constructing a channel task set; the tasks in the channel task set include a maximum task execution time, a task cycle, and a task relative deadline; According to the balance criterion, an initial weighting factor is obtained, and according to the utilization upper bound of the scheduling algorithm, the initial weighting factor and the task utilization, an initial energy saving factor is obtained; Input the initial weighting factor and the initial energy-saving factor into a monotone function optimized bisection search algorithm, optimize the maximum execution time of the task by searching for the task utilization that satisfies the task schedulability determination within the task set utilization range, and output the weighting factor and the energy-saving factor according to the searched task utilization; According to the weighting factor and the energy-saving factor, the working frequency of the task is obtained, and the frequency and voltage are adjusted by dynamically adjusting the voltage and frequency and the working frequency to obtain the task scheduling result of the real-time work; The steps of obtaining the initial weighting factors include: According to the equilibrium criterion, the weighted factor calculation formula is: Under the utilization balance criterion, the weighting factor is expressed as: Under the utilization inverse equilibrium criterion, the weighting factor is expressed as: in, For the The task utilization rate of each task, For the The task utilization rate of each task, , is the maximum number of tasks, , is the maximum execution time of the task, is the task cycle, , is the number of channels, is the maximum instruction cycle of a single-channel task, is the operating frequency; According to the weighting factor calculation formula, an initial weighting factor is obtained; The steps to obtain the initial energy saving factor include: According to the utilization upper bound of the scheduling algorithm, the initial weighting factor and the task utilization, the calculation formula of the energy saving factor is obtained as follows: in, is the upper bound of the task set utilization of the scheduling algorithm, express A one-dimensional vector of represents the weighting factor, express A one-dimensional vector of Indicates The task utilization rate of each task, , is the maximum execution time of the task, is the task cycle, , is the number of channels, is the maximum instruction cycle of a single-channel task, is the operating frequency; According to the calculation formula of the energy-saving factor, an initial energy-saving factor is obtained.
2. The method according to claim 1, characterized in that The initial weighting factor and the initial energy-saving factor are input into the bisection search algorithm optimized by the monotonic function, and the maximum execution time of the task is optimized by searching for the task utilization that satisfies the task schedulability judgment within the task set utilization range. According to the searched task utilization, the weighting factor and the energy-saving factor are output, which include: Inputting the initial weighting factor and the initial energy saving factor into a bisection search algorithm optimized by a monotone function; When the difference between the median utilization of the task set and the lower bound of the task set utilization is not less than the step interval, the task utilization is searched within the range of the task set utilization by a bisection search algorithm optimized by a monotone function, and the weighting factor and energy saving factor are updated according to the task utilization obtained by the search; Obtain a task schedulability determination based on the task cycle, the maximum task execution time, the task relative deadline, and the task priority, and optimize the maximum task execution time based on the task schedulability determination; The task set utilization value range is updated according to the task schedulability determination result. When the difference between the task set utilization median and the task set utilization lower bound is less than the step interval, the updated weighting factor and energy saving factor are output to obtain the weighting factor and energy saving factor.
3. The method according to claim 2, characterized in that The task schedulability determination according to the task cycle, the maximum task execution time, the relative task deadline and the task priority comprises: According to the task cycle, the maximum task execution time, the relative task deadline and the task priority, the task schedulability determination is obtained as follows: in, Indicates that the priority is higher than the task The task set, Indicates that the priority is equal to the task The task set, Indicates that the priority is higher than or equal to the task The CPU time occupied by the task running, Representation Task The maximum execution time of Indicates the relative deadline of the task. represents any time within the task's relative deadline, Indicates rounding up.
4. The method according to claim 1, characterized in that: The calculation formula of the task working frequency is expressed as: in, is the reference frequency, is the minimum task operating frequency, is the maximum task operating frequency, , is the weighting factor, is the energy saving factor, Indicates rounding up.
5. The method according to claim 3, characterized in that: The method further comprises: According to the equalization criterion, the number of channels and the bisection search algorithm optimized by the monotonic function, the energy saving factor is pre-calculated offline, and an energy saving factor lookup table is constructed; The energy saving factor lookup table is searched according to the current equalization criterion and the number of channels to obtain the energy saving factor for online application.
6. A dynamic voltage and frequency regulation and scheduling device based on balanced optimization, characterized in that: The device comprises: A task set building module is used to build a channel task set; the tasks in the channel task set include a maximum task execution time, a task cycle, and a task relative deadline; An initial value setting module is used to obtain an initial weighting factor according to a balance criterion, and to obtain an initial energy saving factor according to an upper bound of utilization of a scheduling algorithm, the weighting factor and task utilization; An optimization module, used for inputting the initial weighting factor and the initial energy-saving factor into a bisection search algorithm optimized by a monotonic function, searching for a task utilization that satisfies the task schedulability determination within the task set utilization range, and outputting a weighting factor and an energy-saving factor according to the task utilization obtained by the search; A scheduling module, used to obtain the working frequency of the task according to the weighted factor and the energy-saving factor, and to adjust the frequency and voltage through dynamic voltage and frequency adjustment and the working frequency to obtain a task scheduling result for real-time work; The initial value setting module is also used to obtain the weighted factor calculation formula according to the balance criterion: Under the utilization balance criterion, the weighted factor is expressed as: Under the utilization inverse equilibrium criterion, the weighting factor is expressed as: in, For the The task utilization rate of each task, For the The task utilization rate of each task, , is the maximum number of tasks, , is the maximum execution time of the task, is the task cycle, , is the number of channels, is the maximum instruction cycle of a single-channel task, is the operating frequency; according to the weighting factor calculation formula, an initial weighting factor is obtained; The initial value setting module is also used to obtain the calculation formula of the energy saving factor according to the utilization upper limit of the scheduling algorithm, the initial weighting factor and the task utilization: in, is the upper bound of the task set utilization of the scheduling algorithm, express A one-dimensional vector of represents the weighting factor, express A one-dimensional vector of Indicates The task utilization rate of each task, , is the maximum execution time of the task, is the task cycle, , is the number of channels, is the maximum instruction cycle of a single-channel task, is the operating frequency; According to the calculation formula of the energy-saving factor, an initial energy-saving factor is obtained.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
