A graphics processor multi-task based management system and method

CN115393170BActive Publication Date: 2026-09-25西安翔腾微电子科技有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211002021.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-20
Publication Date
2026-09-25
Estimated Expiration
2042-08-20

AI Technical Summary

Benefits of technology

[0017]本发明提供的一种基于图形处理器多任务的管理系统及方法,将图形处理的驱动软件进行分层,在核心层完成了对多任务调度管理和空间管理的功能,对应用层屏蔽了多任务切换和地址空间地址转换的实现过程,图形应用可以无缝移植到多任务场景。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115393170B_ABST
    Figure CN115393170B_ABST
Patent Text Reader

Abstract

The application relates to a graphics processor multitasking-based management system and method. The system of the application comprises a graphics instruction generation module, a space management module, a context management module and an interrupt management module. The graphics instruction generation module is connected with the space management module, the space management module is connected with the context management module, and the context management module is connected with the interrupt management module. The application can guarantee the correctness of GPU when performing multitasking drawing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer graphics, and particularly relates to a management system and method based on multitasking of a graphics processor. Background Technology

[0002] With the development of CPU processing performance and multi-core technology, multi-tasking and multi-threading can fully utilize the CPU's performance. The demand for multi-graphics rendering tasks on GPUs is constantly increasing, and there is an urgent need for a multi-tasking management method based on graphics processors to ensure the correctness of graphics rendering under multi-tasking. Summary of the Invention

[0003] To address the technical problems existing in the background art, the present invention provides a management system and method based on multi-tasking of a graphics processor, which can ensure the correctness of the GPU when performing multi-tasking drawing.

[0004] The technical solution of the present invention is as follows: The present invention is a multi-tasking management system based on a graphics processor, which is special in that: the management system includes a graphics instruction generation module, a space management module, a context management module and an interrupt management module, the graphics instruction generation module is connected to the space management module, the space management module is connected to the context management module, and the context management module is connected to the interrupt management module.

[0005] Furthermore, the graphics instruction generation module provides standard API applications for graphics applications, generating graphics drawing instructions.

[0006] Furthermore, the space management module provides storage space management and transportation of multi-task graphics drawing instructions, and manages the storage address of graphics instructions generated by the graphics instruction generation module to avoid conflicts in the storage address of multi-task generated graphics instructions.

[0007] Furthermore, the context management module completes context recording and context recovery for each graphics application task.

[0008] Furthermore, the interrupt management module completes interrupt management and multi-task scheduling for hardware graphics drawing instructions.

[0009] A method for implementing the above-described graphics processor-based multitasking management system is characterized by the following steps:

[0010] 1) Provide a standard API interface for graphics applications, generate graphics drawing instructions, and specify task numbers;

[0011] 2) Provides multi-task graphics drawing instruction storage space management and graphics instruction transfer, and stores the graphics instructions generated by the graphics instruction generation module in segments according to the task number to avoid storage address conflicts of graphics instructions generated by multiple tasks;

[0012] 3) Complete context recording and context recovery for each graphics application task;

[0013] 4) After the graphics drawing instruction for the task is issued, the hardware completes the graphics drawing and reports an interrupt. The interrupt management module only allows the issuance of the next task's graphics instruction after receiving the interrupt, thus ensuring the integrity of the graphics drawing.

[0014] Furthermore, the specific steps of step 3) are as follows:

[0015] 3.1) Record the context of each task.

[0016] 3.2) When switching to different tasks, find the context of the corresponding task according to the task number that needs to be issued to the hardware, and send a restore up / down command to restore the context of the task to be executed.

[0017] This invention provides a management system and method for multitasking based on a graphics processor. The driver software for graphics processing is layered. The core layer completes the functions of multitasking scheduling and space management, while shielding the application layer from the implementation process of multitasking switching and address space address translation. Graphics applications can be seamlessly ported to multitasking scenarios. Attached Figure Description

[0018] Figure 1 This is a structural block diagram of the present invention.

[0019] The attached figures are labeled as follows:

[0020] 1. Graphics instruction generation module; 2. Space management module; 3. Context management module; 4. Interrupt management module. Detailed Implementation

[0021] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0022] See Figure 1 In a specific embodiment of the graphics processor-based multitasking management system of the present invention, the driver software is layered into an application layer and a core layer. The application layer mainly completes the generation of graphics instructions, while the core layer software mainly completes space management, context recovery, and interrupt management.

[0023] The application layer includes a graphics instruction generation module 1; the core layer includes a space management module 2, a context management module 3, and an interrupt management module 4. The graphics instruction generation module 1 is connected to the space management module 2, the space management module 2 is connected to the context management module 3, and the context management module 3 is connected to the interrupt management module 4.

[0024] The graphics instruction generation module 1 provides standard API applications for graphics applications and generates graphics drawing instructions.

[0025] Space management module 2 provides storage space management and transportation of multi-task graphics drawing instructions, and manages the storage address of graphics instructions generated by graphics instruction generation module 1 to avoid conflicts in the storage address of multi-task generated graphics instructions.

[0026] Context management module 3 completes context recording and context recovery for each graphics application task.

[0027] Interrupt management module 4 completes hardware graphics drawing instructions, interrupt management, and multi-task scheduling.

[0028] This invention also provides a management method for multitasking based on a graphics processor, the specific steps of which are as follows:

[0029] 1) The graphics instruction generation module 1 provides a standard API interface for graphics applications, generates graphics drawing instructions, and specifies task numbers;

[0030] 2) The space management module 2 provides storage space management and transportation of multi-task graphics drawing instructions. It stores the graphics instructions generated by the graphics instruction generation module 1 in segments according to the task number to avoid storage address conflicts of graphics instructions generated by multiple tasks.

[0031] 3) Context management module 3 completes context recording and context recovery for each graphics application task;

[0032] 3.1) Record the context of each task.

[0033] 3.2) When switching to different tasks, based on the task number that needs to be issued to the hardware, find the context of the corresponding task, and send a restore up / down command to restore the context of the task to be executed.

[0034] 4) After the graphics drawing instruction for the task is issued, the hardware completes the graphics drawing and reports an interrupt. The interrupt management module 4 only allows the issuance of the next task's graphics instruction after receiving the interrupt, thus ensuring the integrity of the graphics drawing.

[0035] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A multi-tasking management system based on a graphics processor, characterized in that: The management system includes an application layer and a core layer. The application layer includes a graphics instruction generation module. The core layer includes a space management module, a context management module, and an interrupt management module. The graphics instruction generation module is connected to the space management module, the space management module is connected to the context management module, and the context management module is connected to the interrupt management module. The graphics instruction generation module provides a standard API interface for graphics applications, generates graphics drawing instructions, and specifies task numbers. The space management module provides storage space management and transportation of multi-task graphics drawing instructions. It stores the graphics instructions generated by the graphics instruction generation module in segments according to the task number to avoid conflicts in the storage address of graphics instructions generated by multiple tasks. The context management module completes context recording and context recovery for each graphics application task; After the interrupt management module completes the hardware graphics drawing instruction, it performs interrupt management and multi-task scheduling. After the graphics drawing instruction for a task is issued, the hardware completes the graphics drawing and reports an interrupt. Only after the interrupt management module receives the interrupt can it allow the issuance of the graphics instruction for the next task, thus ensuring the integrity of the graphics drawing.

2. A method for implementing the multitasking management system based on a graphics processor as described in claim 1, characterized in that: The method includes the following steps: 1) Provide a standard API interface for graphics applications, generate graphics drawing instructions, and specify task numbers; 2) Provides storage space management and transportation of multi-task graphics drawing instructions, and stores the graphics instructions generated by the graphics instruction generation module in segments according to the task number to avoid storage address conflicts of graphics instructions generated by multiple tasks; 3) Complete context recording and context recovery for each graphics application task; 4) After the graphics drawing instruction for the task is issued, the hardware completes the graphics drawing and reports an interrupt. Only after the interrupt management module receives the interrupt can it allow the issuance of the graphics instruction for the next task, thus ensuring the integrity of the graphics drawing.

3. The management method for multitasking based on a graphics processor according to claim 2, characterized in that: The specific steps of step 3) are as follows: 3.1) Record the context of each task; 3.2) When switching to different tasks, the task number issued to the hardware as needed is used to find the context of the corresponding task and send a restore up / down command to restore the context of the task to be executed.

Citation Information

Patent Citations

  • Method and device storing and back-storing state context in graphic processing unit

    CN1916962A