CN116360929A - Multi-rendering task scheduling method for service quality perception of interactive application - Google Patents

Multi-rendering task scheduling method for service quality perception of interactive application Download PDF

Info

Publication number
CN116360929A
CN116360929A CN202111625247.9A CN202111625247A CN116360929A CN 116360929 A CN116360929 A CN 116360929A CN 202111625247 A CN202111625247 A CN 202111625247A CN 116360929 A CN116360929 A CN 116360929A
Authority
CN
China
Prior art keywords
task
resolution
scheduling
interval
tasks
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111625247.9A
Other languages
Chinese (zh)
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.)
Shenzhen University
Original Assignee
Shenzhen University
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 Shenzhen University filed Critical Shenzhen University
Priority to CN202111625247.9A priority Critical patent/CN116360929A/en
Publication of CN116360929A publication Critical patent/CN116360929A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a service quality perception multi-rendering task scheduling method aiming at interactive application. The method comprises the following steps: modeling the multi-rendering task as a task scheduling problem for selecting the task to be rendered and the resolution used by the task to meet the quality of service requirements and maximize the minimum utility among all the tasks; the task scheduling problem is solved through multiple rounds of interaction between a resolution adjustment algorithm and a frame rate fair scheduling algorithm, wherein the resolution adjustment algorithm is used for selecting resolution for tasks, the frame rate fair scheduling algorithm is used for deciding tasks to be processed, and constraint conditions for solving the task scheduling problem comprise various performances such as resolution, frame rate and delay. The invention fully balances the conflict between the performances, so that the various performances can meet the requirements as much as possible, and the probability of meeting all the service qualities is obviously improved.

Description

Multi-rendering task scheduling method for service quality perception of interactive application
Technical Field
The invention relates to the technical field of cloud computing, in particular to a service quality perception multi-rendering task scheduling method for interactive application.
Background
With emerging edge computing and 5G networks, the 3D rendering tasks of interactive applications (e.g., virtual reality and cloud games) can be offloaded onto edge servers. In order to improve resource utilization, multiple rendering tasks run on the same GPU server and compete with each other for computing resources. Each task has a corresponding performance requirement, i.e. quality of service requirement. Given a set of rendering tasks running on a server and sharing GPU resources and a set of available resolutions, knowing the quality of service requirements of each rendering task, when the server computing resources are idle, the scheduler needs to perform two decisions: 1) Which task is scheduled; 2) Which resolution is used for rendering. The optimization objective of the scheduler is: on one hand, the service quality requirements of all tasks are met; on the other hand, the scheduler needs to make full use of resources, optimizing the performance of all tasks to maximize user satisfaction. For example, regarding the quality of service and performance of rendering tasks, consideration needs to be given to performance affecting the interactive application user experience, such as resolution, frame rate, and latency.
Edge computation occurs in the form of localized clouds. Since the edge server is close to the user, the response time of the user request can be reduced. Cloud-based interactive applications, such as virtual reality and cloud gaming, utilize cloud resources to handle computationally intensive tasks, thereby avoiding the need for high-end hardware (often expensive and high-energy) by user equipment, and making clients lightweight. However, cloud-based interactive applications require high throughput and low latency network connections. If the distance between the user and the data center is large, the user's low latency requirements will be difficult to meet. One solution to overcome this problem is to use emerging mobile edge calculations. Specifically, the edge-assisted interactive application offloads the computationally intensive 3D rendering tasks into the mobile edge computing system and streams the edge-rendered video to the end user over a 5G connection. This approach can significantly reduce latency as the edge server is close to the end user.
As shown in fig. 1, an edge-assisted interactive application consists of three parts distributed in different locations: application logic running in the cloud server, a rendering engine running in the edge server, and display and control components running in the user device. These three parts interact with each other. Specifically, the rendering engine receives rendering instructions from the application logic, executes the instructions, and transmits rendering frames to the user device. The user device generates control instructions and transmits the control instructions back to the cloud server, which updates the application logic after receiving the control instructions. The application logic may also be offloaded to the edge server, in which case the rendering task scheduling problem is also the same.
For a rendering task, once its resource requirements and quality of service are set, the provider assigns it to an edge server. In order to improve the resource utilization rate, a plurality of rendering tasks simultaneously run on one edge server and share the same processor, and each rendering task provides rendering service for one interactive application program. The rendering tasks compete with each other for computing resources. The execution of each task is scheduled by a scheduler to achieve a preset quality of service. Therefore, the technical problems to be solved are: how to schedule rendering tasks so that all tasks can get good performance while meeting quality of service requirements.
In the prior art, the rendering task scheduling scheme mainly has the following defects: 1) The scheduling method of the shared GPU is applicable to general application programs and is not aimed at the interactive application, so that the methods only consider the resource utilization rate, but not consider the performance of the interactive application; 2) The existing method only decides to schedule tasks, but does not relate to resolution decision; 3) For edge-assisted or cloud-assisted interactive applications, existing methods improve user experience quality or reduce latency in terms of rendering mechanisms, rendering instruction compression, and compression parameter selection, but do not optimize performance through scheduling of multiple rendering tasks.
For example, one simple method of scheduling multiple rendering tasks is to schedule multiple rendering tasks in a round-robin fashion and using a fixed resolution. Since the tasks are all performed at the same frequency, this results in a fixed frame rate for all tasks. First, different tasks may have different frame rate requirements, so the frame rate requirements of certain tasks are not met. Second, this approach does not fully utilize computing resources. Therefore, this approach does not achieve the goal of optimizing both the decision-making task and the resolution used. Furthermore, increasing resolution increases both processing time and transmission time, and excessively increasing resolution may violate delay requirements. Therefore, the scheduling algorithm must consider the trade-off between each pair of performances and try to make the optimal choice.
Disclosure of Invention
The invention aims to overcome the defects of the prior art, and provides a scheduling method of a plurality of rendering tasks aiming at the edge-assisted or cloud-assisted interactive application.
The technical scheme of the invention is to provide a multi-rendering task scheduling method aiming at service quality perception of interactive application. The method comprises the following steps:
modeling a multi-rendering task as a task scheduling problem for selecting the task to be rendered and the resolution it uses to meet quality of service requirements and maximize the minimum utility among all tasks, expressed as:
Figure BDA0003438596110000031
Figure BDA0003438596110000032
Figure BDA0003438596110000033
Figure BDA0003438596110000034
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure BDA0003438596110000035
is a set utility function, +.>
Figure BDA0003438596110000036
And->
Figure BDA0003438596110000037
Respectively represent tasks s i Required resolution, maximum tolerable frame interval and maximum tolerable delay, m i Representing tasks s i The number of instructions executed in r ij Indicating a resolution, h, selected for execution of the j-th instruction ij And d ij Representing a frame interval and delay resulting from the instruction being executed;
the task scheduling problem is solved by multiple rounds of interactions between a resolution adjustment algorithm for selecting a resolution for the task and a frame rate fair scheduling algorithm for deciding the task to be processed.
Compared with the prior art, the invention has the advantages that the performance of the interactive application is considered, so that the task scheduling and the resolution selection are decided; the method can remarkably improve the resolution and the frame rate of the task and improve the performance of the task under the conditions of low load and abundant computing resources; the minimum frame rate requirement is considered, and the probability of meeting the minimum frame rate requirement is improved through reasonable modeling and method design; by designing the utility function, conflicts between performances are fully weighed, so that various performances can meet requirements as much as possible, and the probability of meeting all service quality is improved.
Other features of the present invention and its advantages will become apparent from the following detailed description of exemplary embodiments of the invention, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a system architecture diagram of edge 3D rendering according to one embodiment of the invention;
FIG. 2 is a schematic diagram of a solution of a scheduling sequence using a heuristic algorithm in accordance with one embodiment of the present invention;
FIG. 3 is a schematic diagram of an empirical cumulative distribution function of processing time samples rendered using various resolutions according to one embodiment of the invention;
FIG. 4 is a histogram of delay constraints according to one embodiment of the invention;
FIG. 5 is a graph of the minimum utility value containing penalty terms at various computational loads, where FIG. 5 (a) corresponds to low load and FIG. 5 (b) corresponds to high load, according to one embodiment of the invention;
FIG. 6 is a graph of minimum utility values without penalty terms under various computational loads, where FIG. 6 (a) corresponds to low load and FIG. 6 (b) corresponds to high load, according to one embodiment of the invention;
FIG. 7 is a schematic diagram of a penalty for frame interval variation under various computational loads, according to one embodiment of the invention;
FIG. 8 is a schematic diagram of percentages of an example of meeting quality of service under various computational loads, according to one embodiment of the invention;
FIG. 9 is a graph of minimum utility values containing penalty terms under various computational loads, where FIG. 9 (a) corresponds to low load and FIG. 9 (b) corresponds to high load, when each method is combined with a resolution adjustment algorithm, according to one embodiment of the present invention;
FIG. 10 is a graph illustrating the utility gain resulting from each method in combination with a resolution adjustment algorithm, according to one embodiment of the invention;
fig. 11 is a schematic diagram of percentages of examples of meeting quality of service with and without a resolution adjustment algorithm according to one embodiment of the invention.
Detailed Description
Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless it is specifically stated otherwise.
The following description of at least one exemplary embodiment is merely exemplary in nature and is in no way intended to limit the invention, its application, or uses.
Techniques, methods, and apparatus known to one of ordinary skill in the relevant art may not be discussed in detail, but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any specific values should be construed as merely illustrative, and not a limitation. Thus, other examples of exemplary embodiments may have different values.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further discussion thereof is necessary in subsequent figures.
The invention provides a service quality aware multi-rendering task scheduling method. The method decides in real time which resolution is used to perform which task, so that the quality of service requirements of the user are met while maximizing the performance of the user. The invention models the multitask scheduling problem as a maximum and minimum utility problem with limited service quality, and provides a high-efficiency scheduling method for solving the problem. The provided scheduling method consists of a resolution adjustment algorithm and a frame rate fair scheduling algorithm, wherein the resolution adjustment algorithm intelligently selects the resolution for the tasks, and the frame rate fair scheduling algorithm decides which task to process.
For clarity, the quality of service will be specifically described hereinafter, respectively; modeling task scheduling, including maximum and minimum utility problems with limited service quality, utility functions and punishments for frame interval variation; the overall scheduling method comprises a resolution adjustment method and a frame rate fair scheduling method; a resolution adjustment method; the frame rate fair scheduling method needs to solve two sub-problems, namely a weighted maximum and minimum frame rate problem and a scheduling sequence problem; weighting maximum and minimum frame rate problems and solving methods; scheduling sequence problems and solving methods.
1. Quality of service
In the following description, three properties of the interactive application are considered in combination: resolution, frame rate, and delay are illustrated as examples. Resolution and frame rate are two key issues for video applications. High resolution may lead to better image quality, while high frame rates may lead to smooth user interaction. Delay is critical to the user experience of the interactive application. The low latency may ensure a response to user interaction. Only the delay associated with the rendering schedule, i.e. the delay from the arrival of a rendering instruction at the system to the receipt of the corresponding rendering frame by the user, is considered below. There is a trade-off between resolution and delay. High resolution can extend rendering time and transmission time, thereby increasing latency. There is also a trade-off between resolution and frame rate. High resolution reduces the scheduling frequency and thus the frame rate. The quality of service objective referred to in the present invention refers to the minimum requirements for these three properties.
2. Modeling of task scheduling problems
For a task, a utility function may be employed to quantify its performance. Since there are multiple tasks that need to be optimized, the maximization of the minimum utility is illustrated as an example, and the maximum and minimum modeling is abbreviated. The rationale for this maximum-minimum modeling is to try best to meet all users' requirements and provide additional performance (e.g., better frame quality) when computing resources are adequate. Given n tasks on a server, once the server is idle, each task either has one instruction or no instruction, and the task scheduling problem is to select one instruction to render (corresponding to a certain task) and one resolution to use so that all quality of service (resolution, frame rate and latency) requirements are met and the minimum utility among all tasks is maximized. This is a quality of service limited maximum and minimum utility problem.
1) Maximum and minimum utility problem with limited quality of service
For a task, given its required resolution r min And the resolution r obtained by it, its performance is modeled as
Figure BDA0003438596110000061
Where u (x) is a concave non-decreasing utility function. If x is greater than 1, u (x) is positive, otherwise negative. Similarly, for maximum tolerable delay d max Its performance was modeled as +.>
Figure BDA0003438596110000062
However, for the minimum required frame rate f min Using its inverse, i.e. frame interval +.>
Figure BDA0003438596110000063
To measure performance. The frame interval is the time elapsed between two consecutive frames and the frame rate is the statistical data over a period of time. The frame interval has a more stringent constraint because a constant frame interval can ensure that frames received by a user are evenly distributed over time, while a constant frame rate cannot. Thus, for frame rate requirements, its performance is modeled as
Figure BDA0003438596110000064
Where h is the measured frame interval. In one embodiment, the overall performance is defined as a weighted sum, expressed as:
Figure BDA0003438596110000065
wherein θ r 、θ h And theta d Weights for balancing each performance. They are all non-negative and the sum is 1.
Given n tasks, use { s } 1 ,s 2 …s n And } represents. Each task receives a series of instructions, some of which are executed and some of which are discarded. For those instructions that are executed, the rendered frames that they generate will be encoded and transmitted over the network. However, both phases may be congested and may lead to frame loss. Thus, frames received by the client are taken to evaluate performance. Let m i Representing tasks s i The rendered frames of these instructions are successfully received by the corresponding user. To execute the j-th instruction, one is selected Resolution r ij After the instruction is executed, the frame interval h can be obtained ij And delay d ij . The instantaneous utility, u (r), can be obtained by equation (1) ij ,h ij ,d ij ). In one embodiment, the utility of a task is defined as the average utility of all of its executed instructions, u i The expression is that:
Figure BDA0003438596110000071
however, the utility function does not take into account fluctuations in frame spacing, which may negatively impact the user experience. In view of this, in another embodiment, a penalty term v is added to the utility function i And defines the final utility as follows:
Figure BDA0003438596110000072
where phi is the weight parameter. It should be noted that u i And
Figure BDA0003438596110000073
can be used as utility function, unless otherwise indicated, in the following description, default is +.>
Figure BDA0003438596110000074
An example is described.
Specifically, the multi-rendering task scheduling problem is modeled as:
Figure BDA0003438596110000075
Figure BDA0003438596110000076
Figure BDA0003438596110000077
Figure BDA0003438596110000078
wherein the method comprises the steps of
Figure BDA0003438596110000079
And->
Figure BDA00034385961100000710
Respectively represent tasks s i The required resolution, the maximum tolerable frame interval and the maximum tolerable delay. Three constraints in the modeling described above ensure average performance for each type. For the modeled problem and a scheduling policy, if all three constraints are satisfied, it is said that the quality of service is satisfied; otherwise, it is called a violation of quality of service.
2) Definition of the Utility function u (x)
To effectively constrain the above three average performances, in one embodiment, a utility function is defined, generally expressed as:
Figure BDA00034385961100000711
where α is a non-negative constant, used to adjust the penalty. When x >1, u (x) is within (0, 1), when x=1, u (x) =0, and when x <1, u (x) is within [ - ≡ - α).
The advantages of this utility function over conventional log (x) are mainly represented by: first, the upper limit is 1, rather than increasing to infinity. This helps balance the trade-off between the three properties. Second, the utility function has two segments, where the parameters of the negative segment can be adjusted so that any performance violation can be penalized enough to avoid problems with natural logarithms as utility functions, since one performance is over-lifted while the other performance is reduced. In other words, by setting the parameter α, u (r, h, d) <0 can be made to hold when any type of performance is violated.
Preferably three functions
Figure BDA0003438596110000081
And->
Figure BDA0003438596110000082
Respectively set alpha and respectively use alpha r 、α h And alpha d And (3) representing. The specific arrangement is as follows:
α r =σ(θ r ),α h =σ(θ h ),andα d =σ(θ d ) (6)
wherein:
Figure BDA0003438596110000083
3) Penalty for frame interval variation
The variation of the frame interval also has a significant impact on the user experience. For a series of frames received by the user, the smaller the frame interval fluctuation, the better the user experience. A sudden increase in frame interval may interrupt user interaction. For example, the relative standard deviation may be used to model the variation in frame spacing. The relative standard deviation is the ratio of standard deviation to mean.
For task s i Assuming that the user receives a series of frames, the number m i . Let h ij Representing the frame interval at the instant after the user receives the j-th frame. Then task s i Average value of frame interval of (2)
Figure BDA0003438596110000084
Average value of square of frame interval is
Figure BDA0003438596110000085
Let v i Representing tasks s i The relative standard deviation of the frame interval of (a) is:
Figure BDA0003438596110000086
3. task scheduling algorithm
In one embodiment, an algorithm is presented to solve the multi-task scheduling problem, consisting of a resolution adjustment algorithm and a frame rate fair scheduling algorithm. The resolution adjustment algorithm intelligently selects the resolution for the task, while the frame rate fair scheduling algorithm decides which task to process. The two interact with each other. Once the server is idle, the frame rate fair scheduler selects a task and executes its instructions using the resolution determined by the resolution adjustment algorithm. After multiple rounds of scheduling, the utility is evaluated and fed back to the resolution adjustment algorithm, which then decides how to update the resolution schedule.
4. Resolution adjustment algorithm
For each task, a total of k resolutions may be used. Low resolution may not meet resolution requirements, while high resolution may extend processing time and transmission time, resulting in increased latency and potentially violating latency constraints. Thus, when there is only one task, its utility is a concave function of resolution. However, when there are multiple tasks competing with each other, it is very complex how the resolution decisions of the tasks individually affect the final utility (minimum among all tasks).
Given n tasks and k resolutions, each task selects one resolution, n can be obtained k Permutation combinations, each combination representing a resolution arrangement. One simple approach is to try and select the best one from them, however, this approach requires O (n k ) And (3) a wheel. Furthermore, attempting too many poor arrangements can reduce overall performance. To address these issues, in one embodiment, starting from an initial arrangement, the resolution is gradually increased until the overall utility is no longer increased, thereby avoiding bad security as much as possibleAnd (5) arranging.
There are three important design issues with such an algorithm. First, the initial resolution; how to improve a resolution arrangement; thirdly, a convergence condition. These three design issues are discussed in detail below. First, the initial resolution of each task should be the resolution required by the user, so that the resolution requirement can be satisfied. Increasing the resolution of certain tasks may increase overall performance when computing resources are adequate. Among all tasks, the task with the lowest utility should be prioritized because it limits overall performance. Thus, a resolution arrangement is improved by increasing the resolution of the worst performing task by one level. By increasing the resolution until the overall utility is reduced due to insufficient computing resources, the algorithm can be considered to converge. However, randomness in the running system may lead to performance fluctuations, leading to premature convergence of the misleading algorithm. To tolerate such uncertainty, convergence is triggered only if the utility is allowed to significantly decrease. It should be noted that attempts should continue when there is no change in utility, as there may be multiple tasks where utility is minimal at the same time, in which case increasing a single resolution may not increase the minimum performance, while increasing all resolutions may.
Another key issue is when to adjust resolution. In order to evaluate the performance of a resolution arrangement as accurately as possible, it is necessary to keep a resolution arrangement long enough before it is changed. Furthermore, video coding complicates the problem. Rendered frames are typically encoded in groups of pictures (GOP). Each group of pictures includes an independently encoded intra-coded frame and a number of inter-coded frames that are encoded from previous frames in the same group of pictures. The same resolution should be used for a group of pictures, otherwise, common video coding techniques (e.g., h.264, MPEG-4, etc.) cannot be supported. Thus, for each task, the resolution can be adjusted only when one group of pictures is complete. Considering the above two aspects together, in one embodiment, the following two conditions are satisfied at the same time when a resolution adjustment is initiated: 1) The last adjustment has elapsed a sufficient time; 2) The task to be adjusted completes the encoding of one group of pictures. In the next simulation experiment, the length of the group of pictures is 64 frames, and the holding time of one resolution arrangement is set to be the time for which all tasks render 1024 frames in total.
Specifically, the resolution adjustment algorithm includes the steps of:
step S11, let vector r represent the current resolution schedule set, each element of which represents the resolution of a task, initialized to the initial schedule r min (resolution required by the user). Let r * Represents the best resolution arrangement currently found, its corresponding overall utility (in
Figure BDA0003438596110000101
Representation) is highest.
Step S12, if there is one task S among all the tasks k Simultaneously satisfying the following two conditions, task s k One-time resolution adjustment is initiated: (1) the last adjustment has elapsed a sufficient time; (2) task s k The encoding of one group of pictures is completed.
Step S13, calculating the average utility of each task from the last adjustment of the resolution (last change r) according to formula (3)
Figure BDA0003438596110000102
Will->
Figure BDA0003438596110000103
The minimum value of (2) as the overall utility->
Figure BDA0003438596110000104
General Utility->
Figure BDA0003438596110000105
For evaluating the performance of the current resolution schedule r.
Step S14, if the algorithm has converged, arranging r according to the presently found optimal resolution * Tasks s k Is adjusted to an optimal value. Returning to step S12.
Step S15, if task S of resolution adjustment is started k Is not the lowest, and returns to step S12, so that the resolution is not increased, since this cannot increase the lowest utility.
Step S16, recording optimal performance information: if it is
Figure BDA0003438596110000106
Ratio->
Figure BDA0003438596110000107
Big, then->
Figure BDA0003438596110000108
Become->
Figure BDA0003438596110000109
Optimal resolution arrangement r * Becomes r.
Step S17, if the following three conditions are satisfied simultaneously, by integrating the task S k Is increased by one level to increase r: (1)
Figure BDA00034385961100001010
relative to->
Figure BDA00034385961100001011
There is no significant drop (i.e.)>
Figure BDA00034385961100001012
Wherein ζ is greater than or equal to 0, the parameter ζ prevents premature convergence of the algorithm due to fluctuations in utility); (2) the average performance obtained using the current resolution schedule r may satisfy three constraints of equation (4 b-4 d); (3) task s k There is still room for improvement in resolution. Returning to step S12.
Step S18, if the three conditions in step S17 cannot be satisfied simultaneously, the algorithm converges and r is arranged according to the optimal resolution found at present * Tasks s k Is adjusted to an optimal value. Returning to step S12.
In summary, the provided resolution adjustment method can find a resolution arrangement that maximizes the overall utility among an exponential number of resolution arrangements in a short time.
5. Frame rate fair scheduling algorithm
Given n tasks { s ] 1 ,s 2 …s n They may be scheduled in a round robin fashion, each task will result in a similar rendering frequency and frame rate. However, this approach does not achieve optimal fairness when tasks have different requirements for frame rate/frame interval, and some demanding tasks may violate frame interval constraints. Instead, weighted maximum-minimum fairness in frame rate angle is achieved by optimizing the scheduling frequency of each task, which is referred to as a weighted maximum-minimum frame rate problem. If the frame rate of one task cannot be increased without decreasing the frame rate of another task that already has a lower frame rate, the frame rate allocation is max-min fair.
The objective of the present invention is to achieve fairness of long-term frame rate, but the scheduling frequency of one task is only planned for the next cycle, which determines the short-term frame rate. The short-term scheduling frequency versus long-term frame rate can be derived. For task s i Let f i Indicating its expected scheduling frequency in the next cycle, the duration of which will be determined later. Assuming that the average frame rate achieved by the task so far (i.e. the long-term frame rate) is
Figure BDA0003438596110000111
Then the long-term frame rate (in x) reached by the task after the next period i Representation) is:
Figure BDA0003438596110000112
where β is a constant parameter. Then the long term frame rate ratio is
Figure BDA0003438596110000113
The weighted maximum minimum frame rate problem is to find the weighted maximum on a feasible setThe minimum fairness vector x is then analyzed. The weighted maximum and minimum fairness is defined as: given some positive weights ∈ ->
Figure BDA0003438596110000114
Vector x is the weighted maximum and minimum fairness over a feasible set if and only if one component x of vector x is added s Must be reduced by some other component x t So that->
Figure BDA0003438596110000115
After the weighted maximum and minimum fairness vector x is obtained, the short-term frame rate vector f can be obtained by formula (11). To ensure if task s i Short term frame rate f of (2) i Is not zero, it is scheduled at least once, the duration of the next cycle is set to
Figure BDA0003438596110000121
Thus, task s i The number of scheduling in the next cycle (Q i Indicated) is:
Figure BDA0003438596110000122
once the number of schedules per task is obtained, the tasks can be scheduled in a round-robin fashion based on these quantities. However, this scheduling may cause a fluctuation in frame interval to be large, resulting in poor performance. In order to smooth out the variation in frame intervals, it is necessary to optimize the order of task scheduling, referred to as the scheduling sequence. Modeling it as a vector whose jth element if task s k Then represent task s k Will be processed in step j. For example, given three tasks s 1 、s 2 Sum s 3 Assuming that there are 1, 2 and 3 instructions to execute, respectively, for three tasks in a plan, vector (s 1 ,s 2 ,s 3 ,s 2 ,s 3 ,s 3 ) Sum vector(s) 1 ,s 3 ,s 2 ,s 3 ,s 2 ,s 3 ) Is two kindsScheduling sequences. It is assumed that the time to process an instruction is the same for each task. Then for task s 3 There are two frame interval samples under the first scheduling sequence: 1 and 0; in the second scheduling sequence, there are two frame interval samples: 1 and 1. The second scheduling sequence is superior to the first in terms of frame interval variation. In one embodiment, the scheduling sequence problem is defined as: given a set of instructions that execute in one cycle, the scheduling sequence of these instructions is optimized so that the penalty for frame interval variation is minimized.
The weighted maximum minimum frame rate problem and the scheduling sequence problem are two core problems in scheduling. After solving these two problems, the scheduling algorithm is easy to design.
Specifically, the frame rate fair scheduling algorithm includes the steps of:
step S21, for each task S i Order D i Indicating its value in red, initialized to 0. The iteration next of the scheduling sequence vector is initialized to 1. The total number of instructions scheduled to be executed m in the current cycle is initialized to 0.
Step S22, when the processor is idle and there is an instruction for at least one task in the queue, the following steps S23, S24 and S25 are performed to schedule one task.
Step S23, if the iterator next is larger than m, namely, one traversal of the scheduling sequence vector is completed, a new period is started, and the following steps are executed to obtain the new scheduling sequence vector:
step S23.1, solving a weighted maximum and minimum frame rate problem to obtain a scheduling frequency vector f;
step S23.2, based on f, for each task S i The scheduling number Q of the next period can be obtained by the formula (12) i At its value of red D i Middle accumulation Q i And rounding down D i Obtaining m i I.e. the number of instructions that are scheduled to be executed. Total number of instructions scheduled for execution m= Σin current cycle i m i
Step S23.3, vector m (the i-th element of which is m i ) As input, solve a scheduling sequenceThe problem is that a scheduling sequence vector S is obtained;
in step S23.4, the iteration next of the reset vector S is 0.
Step S24, traversing one element each time by iterating the next traversing vector S to obtain a corresponding task S idx Iterating the child next self-increment 1 until task s idx Instructions are in the queue and the value D of the deficit idx Not less than 1, the traversal is ended.
Step S25, scheduling task S idx The corresponding red word value D idx Minus 1. Returning to step S22.
In summary, the frame rate fair scheduling method is used for deciding the scheduling task of the next step, and the performance of all rendering tasks can be optimized by optimizing the scheduling frequency and optimizing the scheduling sequence. The optimal scheduling frequency can solve the short-term scheduling frequency of each task in a period of time, and the weighted maximum and minimum fairness of the frame rate angle of each task is realized. The optimal scheduling sequence is capable of ordering a plurality of instructions belonging to a plurality of tasks to be executed over a period of time in order to smooth out variations in the frame interval of the tasks.
6. Weighted maximum and minimum frame rate problem modeling and algorithm
The weighted maximum and minimum frame rate problem is modeled. First, a feasible set of x is modeled. Short-term frame rate f i Is non-negative and must not be greater than the arrival rate of the command (with lambda i Represented by), i.e. 0.ltoreq.f i ≤λ i . From equation (11), it can be obtained:
Figure BDA0003438596110000131
the arrival rate of the instructions may be estimated by statistical analysis. The time taken to execute all instructions is Σ i t i f i Wherein t is i Is task s i Average time to process each instruction, f i Representing the short-term frame rate. Let the duration of one cycle be 1 second, it is possible to obtain:
i=1…n t i f i ≤1 (14)
from equation (11), it can be obtained:
Figure BDA0003438596110000132
thus, the feasible set of x is:
Figure BDA0003438596110000133
Figure BDA0003438596110000134
it is a compact convex set. The goal is to obtain a weighted maximum and minimum fairness allocation x over the set (16), where x i Is given by the weight of
Figure BDA0003438596110000135
According to the maximum minimum fairness theory, x exists and can be found by a water-filling algorithm.
To more clearly demonstrate the algorithm, the above problem is transformed into a compact form. Let y i =t i x i The problem is then equivalent to finding a weighted maximum-minimum fair allocation y among the following feasible sets,
Figure BDA0003438596110000141
wherein the capacity is
Figure BDA0003438596110000142
Lower limit->
Figure BDA0003438596110000143
Upper limit->
Figure BDA0003438596110000144
Figure BDA0003438596110000145
y i The weight of (2) is +.>
Figure BDA0003438596110000146
Specifically, the optimized scheduling frequency algorithm includes the steps of:
in step S31, the algorithm inputs include
Figure BDA0003438596110000147
f min Lambda and t are each defined by +.>
Figure BDA0003438596110000148
λ i And t i A component vector. From these inputs the following parameters were obtained: capacity C, lower limit L i Upper limit U i ,y i Weight W of (2) i
Step S32, the ratio of each task (i.e., y i ) Initialized to its corresponding lower limit L i . Let C' denote the remaining capacity, initialize to
Figure BDA0003438596110000149
Let I represent a set of tasks whose ratio can be further increased, initialized to {1,2, …, n }.
Step S33, find the set I with the smallest weighted ratio (i.e., y i /W i By V 1 Represented), noted as a subset of tasks
Figure BDA00034385961100001410
Step S34, increasing the weighted ratio of the tasks in I' until either: (1) the remaining capacity is exhausted; (2) the weighted ratio reaches a second small value in I. In case (1), the weighted ratio of tasks can reach a value of
Figure BDA00034385961100001411
In case (2), the weighted ratio of tasks can reach the second smallest weight in IRatio of V 2 And (3) representing. When I' =i, V 2 Is not present. Thus, the target weighted ratio (denoted by V) that a task can reach is the minimum of the values that can be reached in both cases.
The weighting ratio y of each task in step S35, I i Become VW i And upper limit U i And a minimum value therebetween.
Step S36, updating the residual capacity C' to be
Figure BDA00034385961100001412
And delete from I up to its upper limit U i Is a task of (a). Steps S33-S36 are repeated until the remaining capacity C' is not greater than 0 or the set I is empty.
Step S37, for each task, get y i After that, x can be obtained i =y i /t i And f is obtained according to the formula (11) i
Step S38, the scheduling frequency vector f is returned.
7. Scheduling sequence problem modeling and algorithm
Modeling about scheduling sequence problems is specifically: given m instructions executed in one cycle, which belong to task s i The instruction of (1) has m i And one period has a duration of t= Σ i m i t i Wherein t is i Is task s i Average time per instruction is processed. The ordering problem is in period [0, T]M instructions are arranged internally such that the penalty of frame interval variation is minimized. The targets are:
m i nim i ze max i=1,...,n v i (18)
wherein v is i Is a task s defined in formula (10) i Is a relative standard deviation of the frame interval of (a).
In the task scheduling modeling described in the second section above, the frame interval is measured at the user side. However, in the scheduling sequence problem, execution of an instruction is planned instead of realizing it, and thus a frame interval cannot be obtained in advance. Instead, the interval between the start times planned by the two instructions is used to approximate the frame interval.
The problem is a combinatorial optimization. In one embodiment, a heuristic algorithm is presented to solve it. The main idea of the algorithm is to disperse m as evenly as possible within a period i Instructions to smooth the variation of the frame interval. Specifically, for task s i Attempting to arrange its m i The start times of the instructions being such that the interval between two successive starts is close to
Figure BDA0003438596110000151
Let o ij Representing tasks s i Is the jth instruction, τ ij Indicating its start time. Then, using τ ij -τi ,j-1 To approximate the frame interval h ij . For instruction o ij At the beginning time tau of the arrangement ij After that, the end time can be approximated as τ ij +t i . Thus, [ tau ] ijij +t i ]Becomes a busy interval and must be divided from interval [0, T]And deleted. Note that the section mentioned in this section is left-closed and right-open. When the instruction is arranged, interval [0, T]Become a set of ordered idle intervals. Wherein the idle intervals are separated by a series of scheduled busy intervals. By using
Figure BDA0003438596110000152
Representing the group of free intervals, wherein->
Figure BDA0003438596110000153
And->
Figure BDA0003438596110000154
The start time and the completion time of the kth idle interval, respectively.
Given an idle interval set E, as instruction o ij Determining a start time τ ij . First, ensure that from the last instruction o i,j-1 At least a time period g has elapsed since the start i The method comprises the following steps:
τ ij ≥τi ,j-1 +g i (20)
next, an attempt is made to schedule instructions in idle intervals instead of busy intervals to reduce changes to the scheduled instructions. In the following two cases, instruction o ij Can be arranged in idle intervals
Figure BDA0003438596110000155
Inner: 1) When τ is i,j-1 +g i When included in the idle interval, instructions may be arranged in the interval and τ may be set ij Let τ be i,j-1 +g i The method comprises the steps of carrying out a first treatment on the surface of the 2) When the start time of the idle interval is later than tau i,j-1 +g i In this case, the instruction may be arranged in this section and τ may be set ij Set to->
Figure BDA0003438596110000156
Thus, expressed as:
Figure BDA0003438596110000157
for an instruction, there may be several free intervals available for scheduling, an optional number being O (m). An interesting issue is which one should be selected. Different choices may yield different target values (18). The target value obtained for the earliest interval is usually highest because it minimizes the variation of the current task over the frame interval. Therefore, the earliest interval can be directly selected. Alternatively, each interval may be tried and an interval that optimizes the target value may be selected, but this is time consuming. These two schemes were compared by simulation experiments and their performance was found to be very similar.
A new instruction arrangement may affect an existing arrangement. Suppose an instruction o ij Is inserted into the idle interval
Figure BDA0003438596110000161
In which the busy interval is [ tau ] ijij +t i ]. If the busy interval exceedsIdle interval, i.e.)>
Figure BDA0003438596110000162
Then the new busy interval must overlap with other existing busy intervals and therefore some existing arrangements must be adjusted to avoid such overlap. Specifically, as shown in FIG. 2 (a), the start time is later than +. >
Figure BDA0003438596110000163
The interval (busy interval and idle interval) offset delta, wherein:
Figure BDA0003438596110000164
therefore, there are:
Figure BDA0003438596110000165
similarly, the idle interval is shifted
Figure BDA0003438596110000166
The following is shown:
Figure BDA0003438596110000167
once an instruction is scheduled, the idle interval set E must be updated accordingly. In addition to the above-described offset, the idle interval is arranged
Figure BDA0003438596110000168
The process is as follows: />
Figure BDA0003438596110000169
As shown in fig. 2 (b), if a new busy interval [ tau ] ijij +t i ]Completely contained within the idle interval, i.e.
Figure BDA00034385961100001610
Then the idle interval is divided into +.>
Figure BDA00034385961100001611
And->
Figure BDA00034385961100001612
Two parts; otherwise, as shown in FIG. 2 (a), the original idle interval is truncated to +.>
Figure BDA00034385961100001613
Specifically, the optimized scheduling sequence algorithm includes the following steps:
in step S41, the inputs of the algorithm include m, t and τ 0 They are each represented by m i 、t i And τ i0 A component vector. τ i0 Is task s i The start time (relative to the current time) of the last instruction executed (instruction preceding the first instruction of the plan) is a negative value. From these inputs, one period of duration t= Σcan be obtained i m i t i Adding intervals [0, T ] into the idle interval set E]Each task s is calculated by equation (19) i Target average frame interval g of (2) i
Step S42, according to the instruction number of the task (i.e. m i ) The tasks are ordered in descending order. Each task will then be processed in turn according to this order. This is because the more instructions a task has, the more its target average frame interval g i The lower the frame interval is, the less stable the frame interval is.
Step S43, according to the task sequence in step S42, for each task S in the sequence i Sequentially determining m thereof i Start time of the instruction.
Step S44, for task S i Is not equal to the instruction o ij Acquiring the earliest idle interval available for arranging the instruction from the idle interval set E, which is recorded as
Figure BDA0003438596110000171
Step S45, calculating instruction o by equation (21) ij Start time τ of ij . Let τ denote by τ i j is a start time matrix. τ is updated by equation (23), i.e., the start time of the previously scheduled instruction is updated.
Step S46, the idle interval is shifted according to formula (24), and the new busy interval is removed according to formula (25), i.e. the idle interval set E is updated.
In step S47, after all instructions of all tasks are scheduled, the scheduling sequence S is obtained according to the latest τ and returned.
In order to further verify the effect of the invention, a simulation experiment is performed, and in order to make the simulation experiment more realistic, tracking data is used to generate a simulation environment. The specific arrangement is as follows.
1) Collection of tracking data
A game engine named Unity is used to render three-dimensional animated scenes at different resolutions and track processing time. Run using Nvidia GeForce GTX 1060. Higher performance GPUs are not used because Unity does not provide enough precision to track very short processing times. Instead, a medium-performance GPU is used to collect data, and then the processing time is reduced by some factor, thereby simulating rendering with a high-performance GPU. The multiple used was 0.3.
Ideally, each frame should be rendered using multiple resolutions and each rendering operation timed. However, it has been found empirically that this approach makes it difficult to obtain the exact time for each rendering operation, as Unity has many caching and threading mechanisms built in. Instead, it is empirically found that the time required to render a frame is approximately linearly related to resolution, so first rendering a scene using a selected one of the resolutions, referred to as the base resolution, and then obtaining the rendering time of the other resolution by scaling its rendering time. In the simulation experiments below, the resolution candidate set is {1920× 1080,2560 × 1440,3072 × 1728,3840 ×2160}, of which 2560×1440 is selected as the reference resolution. The scaling factors of the four resolutions were set to 0.73, 1.0, 1.37, and 2.18, respectively. The scaling factors are empirically obtained by first rendering the scene independently using different resolutions, so that the generated data is referred to as raw data, and then dividing the median of the rendering time for each resolution by the median of the reference resolution to obtain the corresponding scaling factor. Fig. 3 shows an empirical Cumulative Distribution Function (CDF) of processing time, where the generated data is shown in solid lines and the raw data is shown in dashed lines. It can be seen that for each resolution except the reference resolution (2560 x 1440), the generated data has similar statistical characteristics to the original data.
2. Quality of service requirements
A tradeoff should be considered in determining quality of service requirements. Here, a simple method is introduced. First, the trade-off between modeling resolution and delay is expressed as:
d max ≥t p (r min )+t x (r min ) (26)
wherein t is p (r) and t x (r) represents the average processing time and the transmission time when the resolution r is used, respectively. Otherwise, delay limit d max Will not be satisfied. Modeling
Figure BDA0003438596110000181
Where B is the number of bits per pixel, c is the compression rate, and B is the bandwidth. Second, the tradeoff between the modeling frame rate and delay is expressed as:
Figure BDA0003438596110000182
in such conservative estimation, parallelism of processing and transmission is omitted for simplicity.
The quality of service requirements are generated as follows. First, randomly selecting a bandwidth value B from a corresponding candidate set subject to uniform distribution, and obtaining a frame rate requirement f min Resolution requirement r min . These candidate sets are shown in table 1. Second, not to d max (in milliseconds)Unit) is set to a single value, but is set to:
Figure BDA0003438596110000183
d max the higher the value of (c), the greater the chance of improving resolution. Fig. 4 shows statistics of delay constraints in simulation experiments for a total of 1349 samples, with a median of 40 ms and an average of 46.3 ms. Thirdly, screening the service quality requirements satisfying the above conditions (26) and (27). The settings of parameters b and c are shown in table 1. Finally, h max Set to 1/f min Second.
Table 1 parameters settings of the simulation environment.
Figure BDA0003438596110000184
/>
Figure BDA0003438596110000191
In Table 1, unif { a, b } represents a discrete uniform distribution between a and b.
3. Task allocation
The task allocation is simulated to generate a group of tasks allocated on a server, called a task group. The computational load of a task is defined as the specific weight of time per second for processing. For a task, give f min And r min Let L denote the computational load, then there are:
L=f min ·t p (r min ) (29)
the load is in fact the minimum computational power required for a preset quality of service. Assuming that n tasks are allocated on a server, each task has a bandwidth B i Quality of service requirements
Figure BDA0003438596110000192
And a load L i Then there are two constraints on bandwidth and load:
Figure BDA0003438596110000193
Wherein B is max And L max The bandwidth limit (set to 100 megabits per second in the simulation experiment) and the load limit (set to 1 in the simulation experiment) are respectively. Other resources may be modeled in the same manner. For simplicity, an isomorphic setting is assumed, so other resource constraints can translate into a limit on the number of tasks. For example limiting the number of tasks to between 2 and 4. Because scheduling a single task is trivial, and the total load of 5 tasks is far beyond the load limit.
The task group is generated as follows. First, the possible quality of service requirements described above are generated (along with bandwidth). Second, a combination of these quality of service requirements is generated and the combination is screened for where equation (30) is satisfied. Here, each combination corresponds to one task group. Third, from these task groups, some were selected for simulation experiments based on their total load. Specifically, given a set of loads, {30%,..100% }, for each load, a task group (allowing ±1.5% fluctuation) to which the load is close is randomly selected. Here 30% is the lowest load possible.
4. Generating instructions
For a task, a series of instructions is generated, the arrival rate of which is higher than the frame rate it requires. Given a required frame rate f min Inter-arrival compliance at
Figure BDA0003438596110000201
Second and->
Figure BDA0003438596110000202
Even distribution between seconds. The arrival of the instruction was simulated in 120 seconds. The processing time of each instruction is sequentially read from a trace data stream formed by concatenating a plurality of randomly selected data segments (5000 samples each) of original trace data generated according to the method described above. Random combinations of trace data segments allow more variations to be tested.
Furthermore, dynamic bandwidth is simulated. 3 sets of bandwidth tracking data are collected using a continuous speed test tool, one set of data for each of the candidate bandwidths (10, 20, and 30 megabits per second). For each set of data, it is first divided into 50 segments, each segment consisting of bandwidth samples lasting 120 seconds, and then an offset is added to each data segment such that its average value is equal to the specified bandwidth (10, 20, and 30 megabits per second). The instantaneous bandwidth of each frame as it is transmitted is sequentially read from the randomly selected data segments.
In addition, video coding is reduced to a short process. The encoding time of each frame is randomly chosen based on a uniform distribution of between 2 and 6 milliseconds. The length of the group of pictures is 64 frames. The compression ratio is 1:x, where x is an integer value, and x is subject to a uniform distribution over [400, 600] for intra-coded frames and over [800, 1200] for inter-coded frames. Other parameter settings of the simulation environment are as in table 1.
5) Performance assessment
The method of the invention is evaluated by simulation experiments: frame rate fair scheduling (FRF-RA for short) in combination with resolution adjustment algorithms. The settings of the relevant parameters are shown in table 2, unless otherwise specified.
The method provided by the invention is compared with the following classical scheduling method:
1) Round robin scheduling (RR): it traverses the task in a round-robin fashion.
2) First come first served schedule (FCFS): it tends to run the earliest arriving instruction preferentially.
3) Shortest remaining time first Scheduling (SRTF): it prioritizes the most urgent tasks. For a task, its urgency is evaluated using a deadline, which is the maximum tolerable frame interval of the task after the last schedule.
In the following evaluations, each value was averaged from 50 different simulation instances. Each instance uses a task allocation, a trace data segment of processing time and a trace data segment of bandwidth, which are independently randomly selected.
Table 2 parameter settings of the algorithm
Figure BDA0003438596110000211
6. Frame rate fair scheduling algorithm
Frame rate fair scheduling without combining resolution adjustment algorithms is first evaluated.
1) Enhancement of utility
The aim of the present invention is to minimize the utility of containing penalty terms, i.e
Figure BDA0003438596110000212
Fig. 5 shows the values of this effect at various computational loads, with fig. 5 (a) corresponding to low load and fig. 5 (b) corresponding to high load. It can be observed that frame rate fair scheduling (FRF) achieves the highest utility under almost all loads, while the shortest remaining time first Scheduling (SRTF) performs slightly lower than frame rate fair scheduling (FRF). The round robin scheduling (RR) and first come first served scheduling (FCFS) perform poorly, especially under high load conditions. FIG. 6 demonstrates the minimal utility of not including penalty terms, i.e., min i=1…n u i Fig. 6 (a) corresponds to a low load, and fig. 6 (b) corresponds to a high load. It can be seen that frame rate fair scheduling (FRF) achieves the highest value under all loads. In addition, FIG. 7 shows the penalty for frame interval variation, i.e., max i=1…n v i . It can be seen that the method (FRF) of the present invention performs almost identically to the shortest remaining time first Schedule (SRTF), which is superior to the first come first served schedule (FCFS), but worse than the round robin schedule (RR).
2) Improvement of instance ratio meeting service quality
For one problem instance, if all constraints (4 b) - (4 d) in modeling (4) are satisfied, it is said that quality of service is satisfied; otherwise, it is called a violation of quality of service. The percentage of instances of 50 simulation instances that satisfy quality of service (QoS-SAT for short) was evaluated.
It is noted that each method may satisfy the resolution constraint (4 b), but may violate other constraints. Fig. 8 shows the percentages of examples that meet the quality of service. It can be seen that the method of the present invention (FRF) gives the highest value. In contrast, all other approaches have a large number of examples that violate the quality of service. Frame rate fair scheduling (FRF) allows all instances to meet quality of service requirements even at 90% high load.
Further, from the simulation results, it was found that all methods can satisfy the delay constraint (4 d) when the delay constraint is set according to the formula (28). In this case, all instances of violating the quality of service violate the frame interval constraint (4 c).
7. Resolution adjustment algorithm
The resolution adjustment algorithm may be combined with any scheduling algorithm. The impact of the resolution adjustment algorithm on all methods was evaluated.
1) Enhancement of utility
A resolution adjustment algorithm is combined with each method and the effect on the utility is evaluated. As shown in fig. 9, the method of the present invention (FRF-RA) performs best at all loads. Fig. 10 shows the utility gain of each method compared to the original method. It can be observed that at loads below 50%, the utility of almost every method is increased. Roughly speaking, the lower the load, the higher the gain due to more free computing power.
2) Influence on the instance duty cycle to meet quality of service
Next, the impact of the resolution adjustment algorithm on meeting the quality of service is evaluated. Fig. 11 shows the percentage of examples where each method meets the quality of service with and without the resolution adjustment algorithm. It can be seen that the resolution adjustment algorithm slightly reduces the performance to meet the quality of service at high load. This drop is at the cost of increased utility at low loads, as shown in fig. 10. This is mainly due to attempts at resolution scheduling in resolution adjustment algorithms.
In summary, compared with the prior art, the invention has at least the following technical advantages:
1) Compared with the scheduling method for sharing the GPU in the prior art method, the scheduling method provided by the invention considers the performance of the interactive application, including resolution, frame rate, delay and the like, aiming at the interactive application.
2) Compared with the scheduling method for sharing the GPU in the prior art, the method provided by the invention has the advantages that the task scheduling is decided, and the resolution is also decided.
3) For edge-assisted or cloud-assisted interactive applications, the prior art improves user quality of experience or reduces latency in terms of rendering mechanisms, rendering instruction compression, and compression parameter selection, but does not optimize performance through scheduling of multiple rendering tasks. The invention realizes the performance optimization through the frame-by-frame scheduling of a plurality of rendering tasks.
4) Compared with a scheduling method based on polling and using fixed resolution, the method can fully improve the resolution and the frame rate of the task under the conditions of low load and abundant computing resources, and improves the performance of the task.
5) Compared with a scheduling method based on polling and using fixed resolution, the scheduling method considers the minimum frame rate requirement, and improves the probability of meeting the minimum frame rate requirement through reasonable modeling and method design.
6) Compared with a scheduling method based on polling and using fixed resolution, the scheduling method based on the polling and the scheduling method based on the fixed resolution fully balances conflict among performances by designing the utility function u (x) and an effective method, so that various performances (resolution, frame rate/frame interval and delay) can meet requirements as much as possible, and the probability of meeting all service qualities is improved.
The present invention may be a system, method, and/or computer program product. The computer program product may include a computer readable storage medium having computer readable program instructions embodied thereon for causing a processor to implement aspects of the present invention.
The computer readable storage medium may be a tangible device that can hold and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: portable computer disks, hard disks, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static Random Access Memory (SRAM), portable compact disk read-only memory (CD-ROM), digital Versatile Disks (DVD), memory sticks, floppy disks, mechanical coding devices, punch cards or in-groove structures such as punch cards or grooves having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media, as used herein, are not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., optical pulses through fiber optic cables), or electrical signals transmitted through wires.
The foregoing description of embodiments of the invention has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the various embodiments described. The terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or the technical improvements in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the invention is defined by the appended claims.

Claims (10)

1. A quality of service aware multi-rendering task scheduling method for interactive applications, comprising the steps of:
modeling a multi-rendering task as a task scheduling problem for selecting the task to be rendered and the resolution it uses to meet quality of service requirements and maximize the minimum utility among all tasks, expressed as:
Figure FDA0003438596100000011
Figure FDA0003438596100000012
Figure FDA0003438596100000013
Figure FDA0003438596100000014
solving the task scheduling problem through multiple rounds of interaction between a resolution adjustment algorithm and a frame rate fair scheduling algorithm, wherein the resolution adjustment algorithm is used for selecting resolution for tasks, and the frame rate fair scheduling algorithm is used for deciding the tasks to be processed;
Wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure FDA0003438596100000015
is a set utility function, +.>
Figure FDA0003438596100000016
And->
Figure FDA0003438596100000017
Respectively represent tasks s i Required resolution, maximum tolerable frame interval and maximum tolerable delay, m i Representing tasks s i The number of instructions executed in r ij Indicating a resolution, h, selected for execution of the j-th instruction ij And d ij Representing the frame interval and delay resulting from the instruction being executed.
2. The method of claim 1, wherein for a given task, the utility function is set to:
Figure FDA0003438596100000018
Figure FDA0003438596100000019
wherein u (r) ij ,h ij ,d ij ) Is the overall performance, defined as:
Figure FDA00034385961000000110
r min is the minimum resolution required, r is the resolution obtained, d max Is the maximum tolerable delay, f min Is the minimum frame rate required and,
Figure FDA00034385961000000111
h is the measured frame interval, v i Is a punishment term for frame interval change, phi is a weight parameter, theta r ,θ h And theta d Is the weight of the corresponding term.
3. The method of claim 1, wherein the resolution adjustment algorithm performs the steps of:
step S10: let vector r represent the current set of resolution schedules, where each element represents the resolution of a task, which is initialized to the resolution r required by the user min Let r * Representing the best resolution arrangement currently found, its corresponding overall utility
Figure FDA0003438596100000021
The highest;
step S20: if there is one task s among all the tasks k Simultaneously satisfying the following two conditions, task s k One-time resolution adjustment is initiated: the last resolution adjustment has passed the set time threshold; task s k The encoding of one picture group is completed;
step S30: calculate each taskAverage utility from last resolution adjustment
Figure FDA0003438596100000022
Will->
Figure FDA0003438596100000023
The minimum value of (2) as the overall utility->
Figure FDA0003438596100000024
For evaluating the performance of the current resolution schedule r;
step S40: if the algorithm meets the set convergence condition, r is arranged according to the best resolution found at present * Tasks s k The resolution of (2) is adjusted to an optimal value;
step S50: if task s of resolution adjustment is started k Is not the lowest utility, returning to step S20;
step S60: recording optimal performance information: if it is
Figure FDA0003438596100000025
Ratio->
Figure FDA0003438596100000026
Big, then->
Figure FDA0003438596100000027
Become->
Figure FDA0003438596100000028
Optimal resolution arrangement r * Becomes r;
step S70: by passing the task s if the following three conditions are satisfied simultaneously k Is increased by one level to increase r:
Figure FDA0003438596100000029
wherein, xi is more than or equal to 0; average performance using current resolution schedule r satisfies task scheduling problemAll constraint conditions; task s k Has room for improvement in resolution;
Step S80, if the three conditions cannot be satisfied at the same time, determining that the algorithm converges, and arranging r according to the currently found optimal resolution * Tasks s k Is adjusted to an optimal value.
4. The method of claim 1, wherein the frame rate fair scheduling algorithm performs the steps of:
step S100, for each task S i Order D i The method comprises the steps of representing a red word value, initializing to 0, initializing iteration next of a scheduling sequence vector to 1, and initializing the total planned execution instruction number m in a current period to 0;
step S200, when the processor is idle and at least one task queue has instructions, the following steps S300, S400 and S500 are executed to schedule one task;
step S300, if the iteration next is larger than m, one traversal of the scheduling sequence vector is completed, a new cycle is started, and the following steps are executed to obtain a new scheduling sequence vector:
solving a weighted maximum and minimum frame rate problem to obtain a scheduling frequency vector f;
based on f, for each task s i Calculate the scheduling times Q of the next period i At its value of red D i Middle accumulation Q i And rounding down D i Obtaining m i The number of instructions scheduled to be executed is obtained, and the total number of instructions scheduled to be executed m= Σin the current cycle i m i
The ith element m of the vector m i As input, solving a scheduling sequence problem to obtain a scheduling sequence vector S;
resetting the iteration next of the vector S to 0;
step S400, traversing an element each time by iterating the next traversing vector S to obtain a corresponding task S idx Iterating the child next self-increment 1 until task s idx Has instructions in its queue and its bare wordValue D idx Ending the traversal with the value not smaller than 1;
step S500, scheduling task S idx The corresponding red word value D idx Minus 1, and returning to step S200.
5. The method of claim 4, wherein the weighted maximum and minimum frame rate problem is modeled according to the steps of:
modeling a feasible set of x, short-term frame rate f i Is non-negative and is not greater than the arrival rate lambda of the instruction i Expressed as 0.ltoreq.f i ≤λ i The following formula is satisfied:
Figure FDA0003438596100000031
the arrival rate of instructions is estimated by statistical analysis, and the time consumed for running all instructions is Σ i t i f i Wherein t is i Is task s i The average time to process each instruction, let the duration of one cycle be 1 second, results in:
Figure FDA0003438596100000032
based on the formula
Figure FDA0003438596100000033
The method comprises the following steps:
Figure FDA0003438596100000034
thus, the feasible set of x is:
Figure FDA0003438596100000035
Figure FDA0003438596100000036
the goal of the weighted maximum minimum frame rate problem is to obtain a weighted maximum minimum fairness allocation x, where x i Is given by the weight of
Figure FDA0003438596100000037
Let y i =t i x i This problem is equivalent to finding a weighted maximum-minimum fairness allocation y among the following possible sets:
Figure FDA0003438596100000041
wherein the capacity is
Figure FDA0003438596100000042
Lower limit->
Figure FDA0003438596100000043
Upper limit of
Figure FDA0003438596100000044
y i The weight of (2) is +.>
Figure FDA0003438596100000045
Beta is a constant parameter, ">
Figure FDA0003438596100000046
Is the average frame rate.
6. A method according to claim 5, wherein the scheduling sequence is used to optimise the order of task scheduling, the scheduling sequence problem being modelled according to the steps of:
given m instructions executed in one cycle, which belong to task s i The instruction of (1) has m i And one period has a duration of t= Σ i m i t i Wherein t is i Is task s i Average time to process each instruction;
m instructions are arranged in cycles [0, t ] such that the penalty for frame interval variation is minimized, expressed as:
minimize max i=1,...,n v i
wherein v is i Is task s i And approximates the frame interval using the interval between the start times planned by the two instructions.
7. The method of claim 2, wherein,
Figure FDA0003438596100000047
and->
Figure FDA0003438596100000048
The same utility function definition is used, expressed as:
Figure FDA0003438596100000049
and is three functions
Figure FDA00034385961000000410
And->
Figure FDA00034385961000000411
Respectively set alpha, respectively expressed as alpha r 、α h And alpha d And has the following steps:
α r =σ(θ r ),α h =σ(θ h ),α d =σ(θ d )
wherein:
Figure FDA00034385961000000412
wherein α is a non-negative constant for adjusting penalty.
8. The method of claim 6, wherein for task s i J-th instruction o ij Its start time τ is arranged according to the following formula ij
Figure FDA00034385961000000413
Wherein g i Interval representing the start time of two consecutive instructions, interval [0, T ] when the instructions are arranged]Become an ordered set of idle intervals, and the idle intervals are separated by a series of scheduled busy intervals, using
Figure FDA0003438596100000051
Representing the group of free intervals +.>
Figure FDA0003438596100000052
And->
Figure FDA0003438596100000053
The start time and the completion time of the kth idle interval, respectively;
for an instruction o ij Is inserted into the idle interval
Figure FDA0003438596100000054
In the internal case, the busy interval is [ τ ] ij ,τ ij +t i ]If the busy interval exceeds the idle interval, i.e. +.>
Figure FDA0003438596100000055
The start time is later than +.>
Figure FDA0003438596100000056
The interval offset delta of (2) is expressed as:
Figure FDA0003438596100000057
9. a computer readable storage medium having stored thereon a computer program, wherein the program when executed by a processor realizes the steps of the method according to any of claims 1 to 8.
10. A computer device comprising a memory and a processor, on which memory a computer program is stored which can be run on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 8 when the program is executed.
CN202111625247.9A 2021-12-28 2021-12-28 Multi-rendering task scheduling method for service quality perception of interactive application Pending CN116360929A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111625247.9A CN116360929A (en) 2021-12-28 2021-12-28 Multi-rendering task scheduling method for service quality perception of interactive application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111625247.9A CN116360929A (en) 2021-12-28 2021-12-28 Multi-rendering task scheduling method for service quality perception of interactive application

Publications (1)

Publication Number Publication Date
CN116360929A true CN116360929A (en) 2023-06-30

Family

ID=86928917

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111625247.9A Pending CN116360929A (en) 2021-12-28 2021-12-28 Multi-rendering task scheduling method for service quality perception of interactive application

Country Status (1)

Country Link
CN (1) CN116360929A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117116200A (en) * 2023-10-23 2023-11-24 广州市惠正信息科技有限公司 Method and system for adjusting resolution of LED display screen

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117116200A (en) * 2023-10-23 2023-11-24 广州市惠正信息科技有限公司 Method and system for adjusting resolution of LED display screen
CN117116200B (en) * 2023-10-23 2023-12-29 广州市惠正信息科技有限公司 Method and system for adjusting resolution of LED display screen

Similar Documents

Publication Publication Date Title
CN113950066B (en) Single server part calculation unloading method, system and equipment under mobile edge environment
Ranadheera et al. Mobile edge computation offloading using game theory and reinforcement learning
US9386086B2 (en) Dynamic scaling for multi-tiered distributed systems using payoff optimization of application classes
CN110662238B (en) Reinforced learning scheduling method and device for burst request under edge network
Li et al. CVSS: A cost-efficient and QoS-aware video streaming using cloud services
CN109788046B (en) Multi-strategy edge computing resource scheduling method based on improved bee colony algorithm
WO2023122954A1 (en) Multi-rendering task scheduling method for quality of service perception of interactive application
Ahn et al. Competitive partial computation offloading for maximizing energy efficiency in mobile cloud computing
CN112799823B (en) Online dispatching and scheduling method and system for edge computing tasks
Duong et al. QoS-aware revenue-cost optimization for latency-sensitive services in IaaS clouds
CN113254192B (en) Resource allocation method, resource allocation device, electronic device and storage medium
Gentry et al. Robust dynamic resource allocation via probabilistic task pruning in heterogeneous computing systems
CN111143036A (en) Virtual machine resource scheduling method based on reinforcement learning
US7240115B2 (en) Programmatically allocating memory among competing services in a distributed computing environment
Mogouie et al. A novel approach for optimization auto-scaling in cloud computing environment
CN113867843A (en) Mobile edge computing task unloading method based on deep reinforcement learning
Swarup et al. Energy efficient task scheduling in fog environment using deep reinforcement learning approach
CN116360929A (en) Multi-rendering task scheduling method for service quality perception of interactive application
CN113641445B (en) Cloud resource self-adaptive configuration method and system based on depth deterministic strategy
CN113190342B (en) Method and system architecture for multi-application fine-grained offloading of cloud-edge collaborative networks
CN110743164B (en) Dynamic resource partitioning method for reducing response delay in cloud game
WO2023116460A1 (en) Multi-user multi-task computing offloading method and system in mobile edge computing environment
CN116880968A (en) Job scheduling method and scheduling system
Xie et al. Qos-aware scheduling of remote rendering for interactive multimedia applications in edge computing
CN113176936B (en) QoE-aware distributed edge task scheduling and resource management method and 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