METHOD FOR ALLOCATING PROCESSOR RESOURCE, COMPUTING UNIT AND VIDEO SURVEILLANCE ARRANGEMENT

20230035129 ยท 2023-02-02

    Inventors

    Cpc classification

    International classification

    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] FIG. 1 schematic flow chart for an example of the method;

    [0036] FIG. 2 decision tree for an adaptive resource allocation;

    [0037] FIG. 3 processor resource back pressure;

    [0038] FIG. 4 schematic diagram of processor resource reservation

    [0039] FIG. 5 schematic diagram of resource management components;

    [0040] FIG. 6a example of a time critical task;

    [0041] FIG. 6b event driven workloads and timing constrains;

    [0042] FIG. 7a earliest deadline first without temporal isolation;

    [0043] FIG. 7b earliest deadline first with temporal isolation;

    [0044] FIG. 8 flow chart for an example of the method.

    DETAILED DESCRIPTION

    [0045] FIG. 1 shows an example of a flow chart for an example of the method according to the invention. The method is carried out with an allocation unit 1. The allocation Unit is for example a program. The allocation Unit is adapted to allocate processor resource of a processor 2 of a computing unit to functions F, for example F1, F2, F3 . . . . The processor 2 is for example a CPU and the allocation unit is allocating CPU times and/or CPU resources to the functions F1, F2, F3. The functions F1, F2, F3 are for example programs or smart devices, that are using or need CPU resource. Each of the functions F1, F2, F3 comprises a quality of function. The quality of function is for example a data set that contains a description of the functions, a priority of the functions, a nice-level or deadline requirements. The functions that want to use processor recourse of the processor 2 are provided to the allocation unit 1. For example, a function F is calling the allocation unit 1 when the function F needs processor resource. The processor 2 has a limited processor resource. Especially, the limited processor resource should not be reached or exceeded, since this could freeze, crash or lead to errors of the function F, processor 2 or computing unit. The allocation unit 1 is provided with the maximum processor resource 3. For example, the maximum processor resource 3 is the real maximum processor resource minus a global processor resource threshold.

    [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] FIG. 2 shows a decision tree of an example of the method. In a step 100 the method is started. For example starting of the method can be implemented by starting the computing unit or starting a program. In the step 150 the actual used and/or utilized processor resource is measured and compared to the program's associated local function thresholds, defined for example as the maximum CPU resource utilization for executing the said function (rounded-up or plus some tolerance . . . ). If the measured used processor resource is larger than a set threshold, it is checked in a step 300, if this function or any of the functions using the processor resource is a time-critical task. If it is not a time-critical function, in a step 400a the quality of a function of the not time-critical function is changed. Whereby the quality of a function is changed in the way that its nice-number is increased and/or its priority is reduced. Furthermore, for example in the step 400a the quality of a function can be changed that the scheduling policy of this function should be a CFS-scheduling (complete fair scheduling).

    [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] FIG. 3 shows a flow chart of an example for processor resource back pressure semantics. This is especially part of an example of the method. The flow chart and/or this method part starts with the step 100, which is the beginning. In this beginning a new function for example F2 wants to use processor resource and wants to be allocated to the processor 2. A function F1 is already running and allocated to the processor resource. In the step 500 it is checked, if the sum of the needed processor resources of F1 and F2 are larger or equal than the critical and/or maximum processor resource 3. If the sum is less than the maximum resource 3, the function will be allocated to the processor resource and/or the function F2 can successful register at the processor resource. This is done in the step 600a. Furthermore, in the step 600a the scheduling for the function 2 is set to complete fair scheduling.

    [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] FIG. 4 shows a flow chart of an example method and/or method part. In the step 100 the flow chart and/or method part starts. In the step 700 it is checked, if the actual processor resource load is larger or equal than the maximum processor resource 3. If it is not larger or equal, the method will start again at 100.

    [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] FIG. 5 shows schematically interactions between components of a computing unit. In the application layer framework 6 applications are located and interacting. For example here a video analytics user app 7 with a low priority, a video analytics user app with high priority 8, a video pipeline realtime app 9, a high performance CPU-app 10 and an application manager 11 are located. The application manager 11 starts and stops the applications 7-9. The application framework layer 6 is interconnected with the system layer 12. The system layer 12 is especially connected and/or interacting with the application manager 11. In the system service layer 12 application deployment service 13 is located. The system service layer 12 is interconnected with the hardware abstraction layer 14, where the high-level scheduler 15 is located. The high-level scheduler 15 is especially adapted to run the method of the invention. For example the high-level scheduler 15 is adapted as the allocation unit 1. The hardware abstraction layer 14 is interconnected with a linux Kernel 16 where the CPU-scheduler 17 lies.

    [0057] FIG. 6a shows an example of how a time-critical task impacts a video pipeline temporal response. In the app space 18 applications 19 are located. Furthermore, in the app space 18 the video pipeline 20 is located.

    [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 FIG. 6b.

    [0063] FIG. 6b shows an example of a section of a timeline. At the access 24 the time T is used as a scale. For running the video pipeline 20 the allocation unit 1 allocates a time interval 25 to it. The time interval 25 is also called time period. This is the expected and/or allocated time for expecting to finish it. Furthermore, the figure shows the time interval 26, which is called time deadline. Time deadline means that this is the expected completion time. The computation of the expected completion depends not only on functional and/or algorithmic correctness, but is also crucial as a function of time. The time period 27 is called runtime and is the amount of time for executing the video pipe required over the next realtime interval. The bars 28a, 28b, 28c and 28d indicates time that is need for running the functions that are needed for the video pipe for example 28a is time for the hardware applications 23, 28b are the times for Kernel apps 22 and 28c is time for the hardware abstraction layer applications 21.

    [0064] FIG. 7a shows two functions F1 and F2 scheduled for time 24 as processor resource time. The functions F1 and F2 are scheduled as earliest deadline first without a temporal isolation.

    [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] FIG. 7b shows an example of an embodiment of the method, whereby the earliest deadline first scheduling is mixed and/or used with constant bandwidth server mechanism. This guarantees that the task does not eat all available processor resource time and hance cross task interference is minimized. This solution to the problem of FIG. 7a is avoided by suspending the offending task until the next period. By suspending the function part 29 of FIG. 7a into the parts 29 and 31 of FIG. 7b, the function bar 30 of function F2 in FIG. 7a does not miss its deadline like in FIG. 7a.

    [0067] FIG. 8 shows a flow diagram of an example of the method. In step 1000 the method starts. For example the start is triggered by running the processor, the computing unit and/or the surveillance arrangement. In the step 1100 it is checked if the CPU load is larger than a maximum CPU load. The CPU load is the processor resource that is allocated by the method. If the result of step 1100 is that the CPU load is larger than the limited CPU load for example 90 percent, the step 1200a is executed. If the result of step 1100 is that the CPU load is not larger than this 90 percent or limited CPU load, the step 1200b is running.

    [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.