GPU (Graphics Processing Unit) scheduling management method oriented to multiple partitions and multiple tasks

By adopting multi-core mode and partition management functions in a multi-partition operating system, efficient GPU scheduling management is achieved, and the problem of multi-task independent GPU scheduling in the existing technology is solved, improving system performance and security.

CN119987957APending Publication Date: 2025-05-13西安翔腾微电子科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411749124.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The prior art is difficult to implement multi-tasking independent GPU scheduling management of multi-partition operating systems in the onboard display and control system, resulting in insufficient system performance, poor independence and low graphics processing security.

Method used

Through the multi-core mode and partition management functions of the multi-partition operating system, efficient context switching, independent graphics instruction generation and cache management are realized, ensuring that each task independently records the graphics drawing status, and access GPU management and partition double-fast switching management through the core operating system, realizing frame synchronization and resource isolation.

Benefits of technology

It improves the performance and independence of the onboard display and control system, ensures the security of graphics processing through fault isolation and resource isolation, and meets the GPU scheduling needs of multi-partition and multi-tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119987957A_ABST
    Figure CN119987957A_ABST
Patent Text Reader

Abstract

The invention relates to a multi-partition and multi-task-oriented GPU (Graphics Processing Unit) scheduling management method. The method comprises the following steps: 1) partition operation management: 1.1) efficient context switching; 1.2) generating a graphic instruction and putting the graphic instruction into a command cache; 1.3) recording an independent graph drawing state; 2) command cache management; 3) accessing GPU management by the core operating system; and 4) performing partition double-slow exchange management. The performance of the airborne display control system can be improved, the independence of the system is met, and the security of graphic processing can be met through fault isolation and resource isolation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of computer application and relates to a multi-partition and multi-task oriented GPU scheduling management method. Background Art

[0002] The development of graphics processing units (GPUs) faces the requirements of multi-task independence, security, and efficiency. The ACoreOS operating system commonly used in airborne display and control systems provides a partitioning function. Partitions are isolated from each other, and each partition is scheduled by controlling semaphores. At present, it is urgent to develop a multi-task independent GPU scheduling and management system based on a multi-partition operating system, which is a key technology for airborne display and control systems. Summary of the invention

[0003] In order to solve the problems in the prior art, the present invention implements a GPU scheduling management method for multi-partitions and multi-tasking through multi-core mode of a multi-partition operating system, partition management and other functions; improves the performance of the onboard display and control system, meets the independence of the system, and meets the security of graphics processing through fault isolation and resource isolation.

[0004] The technical solution of the present invention is: the present invention is a multi-partition multi-task GPU scheduling management method, which is special in that the method comprises the following steps:

[0005] 1) Partition operation management:

[0006] 1.1) Efficient context switching;

[0007] 1.2) Generate graphics instructions and put them into the command buffer;

[0008] 1.3) Independent graphics drawing state record;

[0009] Partition operation management (1), including efficient context switching, generating graphics instructions and placing them in the command cache, and independent graphics drawing state recording.

[0010] Efficient context switching: When switching between multiple tasks, the graphics context needs to be updated, and the data recorded in the independent graphics drawing states of the switching tasks needs to be compared. Different attributes need to be regenerated and issued;

[0011] Generate graphics commands and put them into the command cache: Each partition has an independent command cache, which is uniformly scheduled by the command cache management (2);

[0012] Independent graphics drawing state recording: Each task records its own graphics drawing state to prepare for efficient graphics context switching;

[0013] 2) Command cache management;

[0014] 3) Core operating system access to GPU management;

[0015] 4) Partition dual-buffer swap management.

[0016] Further, the specific steps of step 1) are as follows:

[0017] 1.1) Efficient context switching: When switching between multiple tasks, the graphics context needs to be updated, and the data recorded in the independent graphics drawing states of the switching tasks needs to be compared. Different attributes need to be regenerated and issued;

[0018] 1.2) Generate graphics commands and put them into the command cache: Each partition has an independent command cache, which is uniformly scheduled by the command cache management;

[0019] 1.3) Independent graphics drawing state recording: Each task records its own graphics drawing state to prepare for efficient graphics context switching;

[0020] Furthermore, in step 2), when the graphics instructions and data generated by the graphics processor partition driver reach the instructions and data required to submit graphics processing to the GPU, it is necessary to access the GPU to continue graphics processing or continue to generate graphics instructions. At this time, it is necessary to apply for GPU access rights through partition access GPU management.

[0021] Furthermore, in step 3), a control semaphore corresponding to the partition number is created and initialized, and the core operating system obtains the GPU access permission semaphore corresponding to partition i, and waits for permission to access the GPU. Due to the limitations of the GPU graphics pipeline, the execution frame of a partition must end before responding to the application of the next partition number. When the GPU access permission is obtained, the core operating system accesses the GPU to send graphics instructions and data for partition i.

[0022] Further, the specific steps of step 3) are as follows:

[0023] 3.1) The core operating system obtains the corresponding GPU access permission semaphore of partition i: the access permission of each partition is the same, and the partition can access the GPU only when it has the access permission;

[0024] 3.2) The core operating system accesses the GPU to send the graphics instructions and data of partition i: partition i obtains the GPU access permission and sends the graphics instructions and data generated by partition i to the GPU;

[0025] 3.3) Determine whether partition i has completed a frame: if the current frame is completed, the semaphore of the next waiting partition is released, and the next waiting partition obtains GPU access rights and repeats the above steps; if the current frame is not completed, the semaphore of the partition is released, and the remaining graphics instructions and data of the current frame continue to be sent to the GPU to ensure drawing integrity;

[0026] 3.4) Is partition i equal to the total number of partitions n: If i is equal to n, the next waiting partition is 1; if i is not equal to n, the next waiting partition is n+1. To ensure frame synchronization, each partition must obtain GPU access rights in one frame.

[0027] Furthermore, in step 4), in order to ensure frame synchronization, the data of one partition cannot be displayed after one partition is executed, and the buffers will not be exchanged until all commands of the current frame of multiple partitions are executed.

[0028] The advantages of the present invention are: the present invention realizes a multi-partition multi-tasking GPU scheduling management method through a multi-partition operating system multi-core mode, partition management and other functions, improves the performance of the onboard display and control system, meets the independence of the system, and can meet the security of graphics processing through fault isolation and resource isolation. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 is a flow chart of the method of the present invention; DETAILED DESCRIPTION

[0030] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0031] See also Figure 1 The steps of a specific embodiment of a multi-partition multi-task GPU scheduling management method of the present invention include 1) partition operation management, 2) command cache management, 3) core operating system access GPU management, and 4) partition dual-buffer exchange management.

[0032] 1) Partition operation management, including efficient context switching, generating graphics instructions and placing them in the command cache, and independent graphics drawing state recording.

[0033] Efficient context switching: When switching between multiple tasks, the graphics context needs to be updated, and the data recorded in the independent graphics drawing states of the switching tasks needs to be compared. Different attributes need to be regenerated and issued;

[0034] Generate graphics instructions and put them into the command cache: Each partition has an independent command cache, which is uniformly scheduled by the command cache management;

[0035] Independent graphics drawing state recording: Each task records its own graphics drawing state to prepare for efficient graphics context switching;

[0036] 2) Command cache management: When the graphics instructions and data generated by the GPU partition driver reach the level required to submit graphics processing instructions to the GPU, the GPU must be accessed to continue graphics processing or continue to generate graphics instructions. At this time, it is necessary to apply for GPU access rights through the partition access GPU management;

[0037] 3) The core operating system accesses the GPU management, creates and initializes the control semaphore corresponding to the partition number, obtains the GPU access permission semaphore corresponding to partition i, and waits for the permission to access the GPU. Due to the limitation of the GPU graphics pipeline, the execution frame of a partition must be completed before responding to the application of the next partition number. When the GPU access permission is obtained, the core operating system accesses the GPU to send the graphics instructions and data of partition i; specifically:

[0038] 3.1) The core operating system obtains the corresponding GPU access permission semaphore of partition i: the access permission of each partition is the same, and the partition can access the GPU only when it has the access permission;

[0039] 3.2) The core operating system accesses the GPU to send the graphics instructions and data of partition i: partition i obtains the GPU access permission and sends the graphics instructions and data generated by partition i to the GPU;

[0040] 3.3) Determine whether partition i has completed a frame: if the current frame is completed, the semaphore of the next waiting partition is released, and the next waiting partition obtains GPU access rights and repeats the above steps; if the current frame is not completed, the semaphore of the partition is released, and the remaining graphics instructions and data of the current frame continue to be sent to the GPU to ensure drawing integrity;

[0041] 3.4) Is partition i equal to the total number of partitions n: If i is equal to n, the next waiting partition is 1; if i is not equal to n, the next waiting partition is n+1. To ensure frame synchronization, each partition must obtain GPU access rights in one frame.

[0042] 4) Partition dual-buffer exchange management. In order to ensure frame synchronization, the data of one partition cannot be displayed after one partition is executed. The buffers will be exchanged only after all commands of the current frame of multiple partitions are executed.

[0043] The content of the present invention and the technical content not specifically described in the above embodiments are the same as the prior art.

[0044] The above are only specific embodiments disclosed in the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A multi-partition and multi-task GPU scheduling management method, characterized by: The method comprises the following steps: 1) Partition operation management: 1.1) Efficient context switching; 1.2) Generate graphics instructions and put them into the command buffer; 1.3) Independent graphics drawing state record; 2) Command cache management; 3) Core operating system access to GPU management; 4) Partition dual-buffer swap management.

2. The multi-partition and multi-task GPU scheduling management method according to claim 1, characterized in that: The specific steps of step 1) are as follows: 1.1) Efficient context switching: When switching between multiple tasks, the graphics context needs to be updated, and the data recorded in the independent graphics drawing states of the switching tasks needs to be compared. Different attributes need to be regenerated and issued; 1.2) Generate graphics commands and put them into the command cache: Each partition has an independent command cache, which is uniformly scheduled by the command cache management; 1.3) Independent graphics drawing state recording: Each task records its own graphics drawing state to prepare for efficient graphics context switching.

3. The multi-partition and multi-task GPU scheduling management method according to claim 2, characterized in that: In step 2), when the graphics instructions and data generated by the graphics processor partition driver reach the level required to submit graphics processing instructions and data to the GPU, it is necessary to access the GPU to continue graphics processing or continue generating graphics instructions. At this time, it is necessary to apply for GPU access rights through partition access GPU management.

4. The multi-partition and multi-task GPU scheduling management method according to claim 3, characterized in that: In the step 3), a control semaphore corresponding to the partition number is created and initialized, and the core operating system obtains the GPU access permission semaphore corresponding to partition i, and waits for permission to access the GPU. Due to the limitation of the GPU graphics pipeline, the execution frame of a partition must be completed before responding to the application of the next partition number. When the GPU access permission is obtained, the core operating system accesses the GPU to send graphics instructions and data for partition i.

5. The multi-partition and multi-task GPU scheduling management method according to claim 4, characterized in that: The specific steps of step 3) are as follows: 3.1) The core operating system obtains the corresponding GPU access permission semaphore of partition i: the access permission of each partition is the same, and the partition can access the GPU only when it has the access permission; 3.2) The core operating system accesses the GPU to send the graphics instructions and data of partition i: partition i obtains the GPU access permission and sends the graphics instructions and data generated by partition i to the GPU; 3.3) Determine whether partition i has completed a frame: if the current frame is completed, the semaphore of the next waiting partition is released, and the next waiting partition obtains GPU access rights and repeats the above steps; if the current frame is not completed, the semaphore of the partition is released, and the remaining graphics instructions and data of the current frame continue to be sent to the GPU to ensure drawing integrity; 3.4) Is partition i equal to the total number of partitions n: If i is equal to n, the next waiting partition is 1; if i is not equal to n, the next waiting partition is n+1. To ensure frame synchronization, each partition must obtain GPU access rights in one frame.

6. The multi-partition and multi-task GPU scheduling management method according to claim 5, characterized in that: In step 4), in order to ensure frame synchronization, data of one partition cannot be displayed after one partition is executed, and the buffers will be exchanged only after all commands of the current frame of multiple partitions are executed.