METHOD FOR ALLOCATING PROCESSOR RESOURCE, COMPUTING UNIT AND VIDEO SURVEILLANCE ARRANGEMENT
20230035129 ยท 2023-02-02
Inventors
Cpc classification
H04N7/18
ELECTRICITY
International classification
G06F9/50
PHYSICS
Abstract
Method for allocating processor resource of a processor of a computing unit to at least two functions F, F1, F2, F3, wherein each of the at least two functions F, F1, F2, F3 has a quality-of-function, wherein the allocation of the processor resource to the at least two functions F, F1, F2, F3 is based on the quality-of-function, wherein the allocation of the processor resource is an adaptive allocation under runtime feedback 4.
Claims
1. A method for allocating a processor resource of a processor of a computer to at least two functions (F, F1, F2, F3), wherein each of the at least two functions (F, F1, F2, F3) has a quality-of-function, the method comprising: allocating the processor resource to the at least two functions (F, F1, F2, F3) based on the quality-of-function, wherein the allocation of the processor resource is an adaptive allocation under runtime feedback (4).
2. The method according to claim 1, wherein the adaptive allocation considers a workload of the processor.
3. The method according to claim 1, wherein the quality-of-function is a least one selected from the group consisting of a priority, nice-number, time-criticality-information, interruptability, function characterization, performance level, average framerate, probability distribution of frame finish times, and a probability of meeting deadlines.
4. The method according to claim 1, wherein the allocation comprises an interruption of a function (F, F1, F2, F3) and/or an unregister of a function (F, F1, F2, F3) of an allocated processor resource.
5. The method according to claim 4, wherein the interruption is adapted as a hard constraint.
6. The method according to claim 4, wherein the interruption is adapted as a graceful degradation.
7. The method according to claim 1, wherein the allocation is based on an earliest deadline first and/or constant bandwidth server.
8. The method according to claim 1, wherein the allocation takes a global processor resource threshold and/or a local function threshold into account.
9. The method according to claim 1, wherein at least one of the functions (F, F1, F2, F3) is a software application.
10. The method according to claim 1, wherein at least one of the functions (F, F1, F2, F3) is an event driven software application and/or a video pipeline.
11. The method according to claim 1, wherein some or all of the functions (F, F1, F2, F3) are grouped.
12. The method according to claim 1, wherein at least one of the functions (F, F1, F2, F3) is a video surveillance application.
13. A computing unit having processor (2) and an allocation unit (1), wherein the computing unit is adapted to run at least one function (F, F1, F2, F3), wherein each function has a quality-of-function, wherein the processor (2) has a processor resource, wherein the allocation unit (1) is adapted to allocate the processor resource to the functions based on the quality-of-function of the functions, wherein the allocation unit is adapted to perform an adaptive allocation under runtime feedback (4).
14. The computing unit according to claim 13, with an interface for connecting with devices, wherein at least one of the functions (F, F1, F2, F3) is based on at least one of the devices.
15. (canceled)
16. A video surveillance arrangement comprising the computing unit according to claim 13, wherein at least one function (F, F1, F2, F3) is a video surveillance application.
17. (canceled)
18. A non-transitory, computer-readable storage medium containing instructions that when executed on a computer cause the computer to allocate a processor resource of a processor of the computer to at least two functions (F, F1, F2, F3), wherein each of the at least two functions (F, F1, F2, F3) has a quality-of-function, and wherein the allocation of the processor resource is based on the quality-of-function and is an adaptive allocation under runtime feedback (4).
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Further embodiments and advantages are disclosed in the figures and its description.
[0035]
[0036]
[0037]
[0038]
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
DETAILED DESCRIPTION
[0045]
[0046] Each function F needs a specific processor resource. The needed processor resource of each function F is provided to the allocation unit 1. The allocation unit 1 is adapted to allocate processor resource of the processor 2 to the functions F1, F2, F3. This allocation is done based on the quality of function of each function F. The allocation unit 1 for example allocates the processor resource based on the priority and/or time-criticality of each function F.
[0047] The allocation is done under runtime feedback 4. Therefore after allocation the processor resource utilization is measured and provided to the allocation unit 1. Based on the measured processor resource the allocation unit 1 does the allocation for the functions F, here F1, F2, F3 again. By using the runtime feedback 4 it can be ensured that the processor resource of the processor 2 will not be exceeded or reached. For example, if the processor resource, which is utilized by the functions F, is approximating the processor resource limit, the allocation unit 1 can react on this by stopping, pausing or interrupting one of the functions F, F1, F2, F3 so that the processor 2 will not crash. The allocation unit 1 can interrupt one of the functions F, F1, F2, F3, especially based on the quality of a function of these functions, for example interrupt the function with the lowest priority or time-criticality.
[0048]
[0049] If the function F is a time-critical function in a step 400b its quality of function is changed. Hereby the change of the quality of function is done in the way that its scheduling is set to earliest deadline first and/or its runtime is reduced.
[0050] After the steps 400a, 400b and also after step 200 if processor resource is not critical, the cycle of the method ends in a step 200. After this step 200 the method can start again at 100.
[0051]
[0052] If in the step 500 it is detected that the sum of the needed resources of F1 and F2 will be larger or equal than the maximum resource 3, in the step 600b it will be denied to the function F2 to register on the processor 2.
[0053] Both steps 600a and 600b will be leading to the step 200, which is the end of this allocation. After the end 200 this could start again at step 100.
[0054]
[0055] If the actual processor resource load is larger or equal than this limited resource 3, the step 800 will be executed. In the step 800 the functions are analyzed if they are time-critical or not and/or how large their priority is. In the step 800 the priority of a low priority function and/or the priority of a non-time-critical function is reduced. This leads to the step 900, where it is checked, if after this degradation the actual processor resource is still larger than the critical and/or maximum processor resource 3. If it is still larger, than step 800 is executed again. If the actual processor resource load is smaller than this maximum processor resource 3, the method ends at step 200. After step 200 the method can start again at 100.
[0056]
[0057]
[0058] Time-critical functions F are defined as workloads that have built in time constrains. This means that not only the result of computation is important, but also the time in which this result is computed is important. Therefore, computation timing constrains for example deadlines, must be taken into a count when deploying time-critical functions.
[0059] Such a time-critical function F is for example the video pipeline 20. In the video pipeline 20 not only video stream acquisition, processing and streaming has to be performed, since also the streaming must need a desired average framerate to avoid any frame drop. Capturing and processing a realtime data stream is an event driven workload. So the video pipeline 20 is also an event driven function F. Therefore, the CPU load and/or the processor resource is proportional to the processing rate. The processing rate is dictated by the cameras framerate capturing rate. Therefore, video frame drops can be avoided if the frames processing time for each state in the video pipeline is lower than the video streams time period, for example 33.33 milliseconds for a 30 frames per second camera.
[0060] To sustain such a constant rate of computation the method uses low interframe timing variation. This is based on the idea that variation is bad for deterministic scheduling. The delay needs to be minimized. Therefore, support for realtime pre-emptive policies are exposed and supported in the app space 18.
[0061] The quality of function of the video pipeline may define its own priority, especially define a high priority. Furthermore, the quality of function of the video pipeline comprises latency constrains for an enabling a more predictable scheduling pattern.
[0062] For running the video pipeline 20 not only this has to be executed, also steps and/or processor resource is used concurrently for the hardware abstraction layer applications 21, the kernel space applications 22, for example camera drivers, video codex, and for hardware functions 23 like GPU and imaging pipe. This results in the timeline constrained of
[0063]
[0064]
[0065] The function F1 causes F2 to miss its deadline. The function part 29 has the shown reserved time. If this function consumes more time than allocated it could cause a deadline miss of another task, here task for function F2.
[0066]
[0067]
[0068] In step 1200a it is checked, if the function F for example a new and/or new started function or if any of the running functions is a real-time function or not. If it is not a real-time function, the functions or the function is scheduled with CFS policy with a neutral nice value. If the result in step 1200a is that the program is a realtime program, the step 1300a is executed. In step 1300a it is checked if what kind of scheduling policy for example CFS or EDF is carried out. In case 1400a the function is set to CFS with a nice value set to zero. In case 1400b the scheduling of the function is set to earliest deadline first with a maximum threshold.
[0069] If in step 1200b it is detected that a scheduling mode is CFS, the step 1300c is executed, whereby if it is detected that the scheduling mode of the function is not CFS, the step 1300b as described before is executed.
[0070] In the step 1300c, which means that the CPU load is not larger than 90 percent and the scheduling mode is CFS, it is checked if the maximum threshold is already exceeded. If the result is that the maximum threshold is not exceeded, an average CPU load is computed in step 1400d. If the result is that the maximum threshold is exceeded, than the CFS is reconfigured to a high nice value, thus decreasing the allocated CPU resource scheduling time.