Data processing system, data processing method and computer program
The data processing system improves efficiency by using a frame buffer and staggered processing times for multiple applications, reducing overheads and hardware costs in image generation and distribution.
Patent Information
- Application Number
- JP2021551119
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-10-02
- Filing Date
- 2020-04-07
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2040-04-07
AI Technical Summary
Existing server configurations for generating and distributing images to multiple clients are inefficient, particularly when handling multiple applications simultaneously, leading to increased hardware costs and performance overheads.
A data processing system that utilizes a frame buffer to store images generated by multiple applications, with a GPU executing these images at different timings and a compression encoder processing these images at staggered times to reduce overhead and hardware requirements.
The system enhances efficiency by reducing context switch overheads and hardware costs while maintaining low latency in image processing and distribution to clients.
Smart Images

Figure 0007555345000006 
Figure 0007555345000012 
Figure 0007555345000009
Abstract
Description
[Technical field]
[0001] The present invention relates to a data processing technology, and more particularly to a data processing system, a data processing method, and a computer program. [Background technology]
[0002] A server on the cloud may generate images for multiple clients in parallel, corresponding to multiple applications (games, etc.) running on multiple clients, and distribute the generated images for each client to each client for display. Summary of the Invention [Problem to be solved by the invention]
[0003] The present inventors have considered that there is room for improvement in the configuration of a server that generates a plurality of images corresponding to a plurality of applications and distributes each of the generated images to a client, from the viewpoint of efficiency.
[0004] The present invention has been made based on the above-mentioned idea of the inventor, and one object of the present invention is to provide a technology that improves the efficiency of the process of generating multiple images corresponding to multiple applications, or the process of delivering each of the generated images to a client. [Means for solving the problem]
[0005] In order to solve the above problem, a data processing system according to one aspect of the present invention includes an image generating unit that generates a plurality of images corresponding to a plurality of applications executed in parallel and stores the plurality of images in a frame buffer, and an encoding unit that reads and encodes the images stored in the frame buffer. The encoding unit is configured to read the plurality of images corresponding to the plurality of applications from the frame buffer at different timings for each application.
[0006] Another aspect of the present invention is a data processing method, which is executed by a data processing system including an image generation unit and one encoding unit, and includes the steps of the image generation unit generating a plurality of images corresponding to a plurality of applications executed in parallel and storing the plurality of images in a frame buffer, and the encoding unit reading the plurality of images corresponding to the plurality of applications from the frame buffer at different timings for each application and encoding the read images.
[0007] Any combination of the above-mentioned components, and any conversion of the present invention between an apparatus, a program, a recording medium storing a program, etc. are also valid as aspects of the present invention. Effect of the Invention
[0008] According to the present invention, it is possible to improve the efficiency of a process for generating a plurality of images corresponding to a plurality of applications, or a process for delivering each of the generated images to a client. [Brief description of the drawings]
[0009] [Figure 1] FIG. 1 illustrates a method for executing multiple applications. [Diagram 2] FIG. 1 is a diagram illustrating an example in which multiple applications share one GPU. [Diagram 3] FIG. 1 is a diagram illustrating an example in which multiple applications share one GPU. [Figure 4] FIG. 11 is a diagram showing the relationship between the operation timing of compression encoding and the required performance. [Diagram 5] 1 is a block diagram showing functional blocks of a data processing system according to an embodiment; [Figure 6] FIG. 1 is a diagram illustrating parallel processing of multiple applications in a data processing system. [Figure 7] FIG. 1 is a diagram showing a handshake flow between a CPU and a GPU in processing one application. [Figure 8]FIG. 11 is a diagram showing frame buffer switching timing in processing one application. [Figure 9] FIG. 13 is a diagram illustrating an example of sharing a GPU in a time-sharing manner. [Figure 10] FIG. 13 is a diagram illustrating an example of sharing a GPU in a time-sharing manner. [Figure 11] FIG. 13 is a diagram illustrating an example of sharing a GPU in a time-sharing manner. [Figure 12] FIG. 2 is a diagram illustrating the operation of a compression encoder when multiple applications are processed in parallel. [Figure 13] FIG. 2 is a diagram showing an example of time-sharing allocation of a CPU and a GPU in the system A of FIG. [Figure 14] FIG. 2 is a diagram showing an example of time-sharing allocation of a CPU and a GPU in the system A of FIG. [Figure 15] FIG. 10 is a diagram illustrating parallel processing of a plurality of applications in a data processing system according to a modified example. [Figure 16] FIG. 10 is a diagram illustrating parallel processing of a plurality of applications in a data processing system according to a modified example. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] <Background> Figure 1 shows a method for executing multiple applications. Let us assume that there are two systems: System A, equipped with a relatively high-performance CPU (Central Processing Unit) and GPU (Graphics Processing Unit) capable of processing game applications (hereinafter also referred to as "game apps") at up to 60 fps (frames per second) at 4K resolution (3840 x 2160), and System B, capable of processing game apps at up to 60 fps at FHD resolution (1920 x 1080). System A has approximately four times the performance of System B. System A is assumed to have upward compatibility with System B.
[0011] Here, when there is a need to simultaneously execute multiple game apps with FHD resolution and 60 fps quality, a first method is to provide multiple systems B and use the multiple systems B simultaneously, as shown in the upper part of Fig. 1. A second method is to process multiple game apps in parallel (e.g., 4-way parallel processing) on one system A, as shown in the lower part of Fig. 1. This embodiment relates to the second method, and proposes a technology that reduces the number of systems physically installed and improves the operating rate per system.
[0012] In this embodiment, a data processing system is proposed that simultaneously achieves parallel processing of multiple applications, i.e., multi-context parallel processing, reduction in processing delay, and reduction in peak performance in the compression encoding unit. First, the technical concept of this embodiment will be outlined.
[0013] <Technical concept of the embodiment 1> As a first technical concept of the embodiment, a method for efficiently processing multiple game apps using one GPU of a server provided on the cloud (also called a "cloud server") will be described.
[0014] (1)Challenge: Methods of running multiple applications on one CPU are becoming common. For example, the CPU's arithmetic unit can be divided in the spatial direction (also called "space division") to run multiple applications in parallel. Or, the CPU's arithmetic unit can be divided in the time direction (also called "time division") to run multiple applications in parallel. Spatial division of the arithmetic unit means assigning each application to multiple CPUs or multiple threads of one CPU. Time division of the arithmetic unit means sharing one CPU by time division among multiple applications.
[0015] Here, when multiple applications are processed on one GPU, it is possible to consider space division or time division of the arithmetic unit, but there are problems specific to GPUs. Figures 2 and 3 show an example in which multiple applications share one GPU. Figures 2A and 3A show an example in which the GPU is shared by time division, and Figures 2B and 3B show an example in which the GPU is shared by space division. In each figure, the "CP" in the GPU is a command processor that processes commands received from the CPU. "SE" is a shader engine that executes shader processing. "TU" is a texture unit that executes texture processing. "RB" is a rendering backend that executes rendering processing. "L2" and "L3" are the level 2 cache and level 3 cache.
[0016] (1-1) Challenges when spatially partitioning a GPU: GPUs generally contain many parallel processors that perform shader processing and general-purpose computing processing. It is possible to physically divide these processors and assign each processor to each application. For example, if one GPU has 2048 shader processor pipelines, it is possible to assign 512 processors each to four applications. However, functional blocks that process tessellation, rasterization, etc. are generally built on the premise that serialized processing is executed by one GPU. Therefore, in order to spatially divide the GPU, it is necessary to set up these functional blocks in parallel within one GPU, which increases costs.
[0017] (1-2) Issues with GPU time-sharing: (1-2-1) Context switch overhead Since multiple applications use the same processor in turn, the internal state must be saved and read every time the transition (also called a "context switch") occurs. GPUs generally contain many parallel processors (also called "unified shaders") that process pixel / vertex shaders and general-purpose computing. These processors are originally designed to preemptively execute multiple processes in parallel in a time-division manner, and have mechanisms to reduce the overhead of context switches by multiplexing the internal state storage locations. However, time-division considerations are limited for fixed functions other than unified shaders. There are also methods to shorten the transition time by multiplexing the registers that hold the internal state, but the amount of internal data held by the entire GPU is enormous, and the deterioration of chip area efficiency due to the increase in circuit size cannot be ignored.
[0018] Also, within one application, there is no problem if context information and accessed data are shared among multiple processes that are preemptively executed within the application. However, in multiple applications, these cannot be shared, and this data must be saved and read repeatedly at each context switch.
[0019] In addition, the processing pipeline of a GPU is much longer than that of a CPU, and there is a large delay between fetching the command buffer and completing the processing based on the command. In a context switch, after stopping the supply to the pipeline, it is necessary to wait until all processing in the pipeline is completed, and this time becomes long.
[0020] In addition, GPUs use much more internal state information than CPUs, and the multiple types of overhead required for context switching cannot be ignored. These multiple types of overhead include the processing time required to save and read the internal state, the circuitry required for multiplexing to avoid this, and the waiting time for the internal pipeline processing to finish.
[0021] (1-2-2) Game application processing configuration: In game apps, a series of preemptive processes using unified shaders are bundled together, and as a whole, a single process is serialized to generate drawing results in the frame buffer in accordance with the display timing. In other words, there are parts between multiple internal processes that are highly serialized using means such as synchronization wait, and unlike applications that only use general-purpose computing (also called "GPGPU"), there may be game apps for which time-sharing execution is not possible. Even if the overhead of context switching could be ignored, it may not be possible to handle it given the processing structure of game apps.
[0022] (2) Solution technology: (2-1) The granularity of time-sharing the processing of one GPU is set to the timing when the game app finishes drawing processing on the frame buffer. The GPU in the data processing system of the embodiment executes, in a time-sharing manner, generation processing of multiple pieces of data corresponding to multiple applications executed in parallel. Then, an instruction unit (switching instruction unit 44 described below) in the data processing system of the embodiment instructs switching to generation processing of data corresponding to a second application different from the first application when the GPU completes generation processing of one unit of data corresponding to a first application to be passed to a subsequent processing unit. One unit of data is the final product to be passed to the subsequent processing unit, and may be, for example, one frame (image) to be stored in a frame buffer.
[0023] In this embodiment, the granularity of time-sharing the processing of one GPU is the timing to flip the frame buffer. Typically, two or more frame buffers are allocated per game app, and they are used while switching between the drawing target and the display target, and this switching is called a "flip."
[0024] The GPU fetches command buffers generated by the CPU and other devices and proceeds with processing. Once the GPU has fetched commands related to drawing one frame of a game app, it stops subsequent fetches, and when a flip occurs, it understands that the GPU's internal processing has ended, and begins saving the context of that game app. If an asynchronous compute process that is not synchronized with the frame is running, it is also stopped and the context is saved in the same way. After that, the saved context of the next game app to be run is loaded, and the game app resumes execution. The context includes the GPU's internal state and the contents of the command buffer. Note that if it can be guaranteed that there will be no timing conflicts between the drawing and display processes, a single frame buffer is sufficient, but a flip notification is sent as a signal to notify that the frame buffer is accessible.
[0025] In a GPU, immediately after rendering is completed (i.e., when flipping), the amount of internal state and intermediate data that needs to be saved by context switching is reduced compared to when rendering processing is in progress. This is because when rendering processing is in progress, a large amount of small-grained internal state and intermediate data related to the rendering processing being executed on the fly exists in parallel computing units (such as shader pipelines) and fixed functions (such as rasterizers). Also, in rendering processing, there are some parts that are highly serialized by means of synchronization waits, which are difficult to time-share. Furthermore, after flipping, a blanking period of the display timing may be inserted, and at that time GPU processing may not be required. Therefore, performing a context switch at the time of flipping is advantageous in terms of reducing and concealing overhead.
[0026] (2-2) Context switching is performed during the blanking period of the display timing. In addition, in a cloud gaming server, a display output device is often not connected, but the timing of passing the frame buffer to the compression encoding circuit may be treated as a virtual blanking period.
[0027] (2-3) Each GPU must have at least the combined computing power required by each application to be executed in parallel. For example, a game app that generates FHD (1980 x 1080) images at 60 fps requires a GPU computing power of 2 TFLOPS (Tera Floating-point Operations Per Second), and four such game apps are run in parallel, a GPU with a computing power of at least 8 TFLOPS is required.
[0028] (2-4) Operate the GPU at a frame rate that is the sum of the planned processing frame rates of each application executed in parallel using time sharing. For example, if four game apps that generate 60 fps are run in parallel, the GPU frame rate, i.e., context switching, will be performed at 240 Hz.
[0029] (2-4-1) When an application to be executed in parallel by time sharing occupies the GPU for more than the allocated time (time slice) in 2-4, the context switch is delayed. The next time allocation for the application that has occupied the GPU for more than the allocated time is skipped, or the next time allocation for the application is reduced.
[0030] (2-4-2) If the time or rate at which GPU occupancy by applications to be executed in parallel using time sharing exceeds the allocated time is large, reduce the number of applications to be executed in parallel so that the GPU can be allocated to each application with sufficient frequency. For example, the outlook (predicted value) for the processing load of each application may be grasped in advance. Alternatively, GPU occupancy time may be allocated to multiple applications, and after the applications start to be executed, the level of processing time exceedance (e.g., number of rendering frame rates) and the level of increased delay in response to user input may be measured, and the GPU occupancy time allocated to each application may then be reviewed.
[0031] When an application (called a "relocated application") needs to be reallocated to another system (second system) while the first system is running, the relocated application is first started in the second system and a context copy from the first system is started. Processing of the relocated application in the first system continues until the setup is complete. Then, at a certain timing of context switching, processing of the relocated application in the first system is stopped.
[0032] (2-5) The CPU must have at least the combined computing power required by each application executed in parallel using time sharing, and must operate in sync with the rendering frame rate of the GPU. The CPU performance may be realized by a combination of the operating frequency, the number of CPU cores, the number of threads, etc. For example, consider a system in which four game apps are executed in parallel on a cloud server using eight one-thread CPUs operating at 1.6 GHz. This system may use eight two-thread CPUs of the same architecture operating at 3.2 GHz. In addition, if the four game apps to be executed in parallel each require a computing power of 100 GFLOPS, the CPU to be used may have a computing power of at least 400 GFLOPS.
[0033] (2-6) A GPU command buffer is provided for each application, and the target that the GPU refers to is switched during a context switch. (2-6-1) A separate command buffer may be provided for compute processing that is asynchronous with the drawing processing.
[0034] (2-7) Providing information to a processing step downstream of the GPU, indicating which application generated each frame buffer sequentially, when it was generated, and when it should be displayed. The processing step downstream of the GPU includes, for example, a compression encoding unit, a decompression unit (decoding unit), a communication unit, and a display unit.
[0035] <Technical concept of the embodiment 2> As a second technical concept of the embodiment, a method for efficiently compressing and encoding a plurality of images of a plurality of game apps stored in a frame buffer in a cloud server and transferring the images to a client will be described.
[0036] (1)Challenge: When multiple game apps are executed on a cloud server, multiple frame buffers are generated simultaneously, and the frame buffers are compressed and encoded simultaneously and transmitted to a client with low latency, the compression coder generally needs to have the parallelism and processing power to process the frame buffers generated simultaneously in parallel. For example, if four game apps that need to generate 1920 x 1080 resolution images at 60 Hz are executed in parallel and four frame buffers are completed at the same time, the system needs to have four parallel compression coders that can compress and encode 1920 x 1080 resolution images at 60 Hz. This may result in an increase in the cost of the system.
[0037] Furthermore, if multiple images from multiple game apps are stored simultaneously in multiple frame buffers and then compressed and sent out with low latency, a higher performance compression encoder is required (see the right side of Figure 4 below). Also, if multiple images from multiple game apps are stored simultaneously in multiple frame buffers and then compressed and sent out with low latency, the interconnect (bus) and memory bandwidth that inputs and outputs data to the compression encoder also require higher performance. Also, if multiple images from multiple game apps are stored simultaneously in multiple frame buffers and then compressed and sent out with low latency, the peak power consumption will also increase.
[0038] (2) Solution technology: The above problem is solved by having one compression encoder have a mechanism for efficiently processing multiple streams, and serializing the timing at which multiple game apps generate frame buffers (in other words, sequentializing). The specific configuration is explained in 2-1 to 2-6 below.
[0039] (2-1) Serializing the timing at which multiple game apps finish drawing to the frame buffer. For example, the GPU processing start times of multiple game apps running in parallel may be shifted from each other. Furthermore, the flip timing or vertical synchronization timing may be shifted from each other for multiple game apps running in parallel. In many cases, a display output device is not connected to a cloud gaming server, but the timing of passing a frame buffer to a compression encoding circuit may be virtually treated as the vertical synchronization timing. In order to realize the technical idea of feature 2, the parallel execution of multiple game apps may be realized using multiple GPUs, or may be realized by spatially or time-dividing a computing unit in one GPU.
[0040] FIG. 4 shows the relationship between the operation timing of compression encoding and the required performance. Here, it is assumed that four game apps (game AppA to game AppD) that generate images with a resolution of 1980×1080 at 60 fps are executed in parallel, and the images of the four game apps are stored in the frame buffer. In the method 70, the images of the four game apps are stored in the frame buffer at the same time. In the method 70, the number of pixels that need to be processed within 4 milliseconds is 1920×1080×4. On the other hand, in the method 72 of the embodiment, the images of the four game apps are stored in the frame buffer at different times. Therefore, the number of pixels that need to be processed within 4 milliseconds is 1920×1080. Therefore, according to the method 72 of the embodiment, it is possible to realize compression encoding with low delay and reduce the required performance of the compression encoder.
[0041] (2-2) Creating a frame buffer at a frame rate that is the sum of the processing frame rates planned by multiple applications executed in parallel. In other words, creating multiple images corresponding to multiple applications at a frame rate that is the sum of the frame rates planned by multiple applications executed in parallel. For example, when running four game apps in parallel that need to generate images at 60 fps, the frame buffer is configured to generate images at 240 Hz.
[0042] For example, if the number of applications executed in parallel is four, namely game A, game B, game C, and game D, the frame buffers are generated in the following order: game A, game B, game C, game D, game A, game B, game C, game D, ... However, if the frame processing time for each application is variable, the order in which the frame buffers are generated may be reversed. In that case, information indicating which application generated each frame buffer is stored. Note that the frame buffers generated by each application do not necessarily need to be placed in the same shared memory area, and the compression encoder may sequentially reference multiple memory areas.
[0043] (2-3) The compression encoder must have at least the ability to perform compression encoding at a frame rate equal to the total frame rates of multiple applications executed in parallel. For example, if four game apps that generate 1920 x 1080 resolution images at 60 fps (60 Hz) are run in parallel, a compression encoder capable of processing 1920 x 1080 resolution images generated at 240 fps (240 Hz) is used.
[0044] (2-4) The compression encoder sequentially encodes a series of frame buffers output from multiple game apps, and then divides and outputs the encoded data for each game. In this case, the compression encoder must be configured to be able to determine which frame buffer belongs to which game. For example, a frame buffer to which images are output may be provided for each game. Furthermore, when images from multiple games are output to one frame buffer, a tag indicating which game the image belongs to may be added to the image data. Furthermore, data may be passed to a different transmitter for each game.
[0045] (2-5) The compression encoder stores past image frames and intermediate data during compression encoding separately from other games, and increases compression efficiency by referring to the stored data when compressing and encoding new images output from the one game. In this case as well, the compression encoder is configured to be able to determine which frame buffer belongs to which game.
[0046] For example, assume that frame images A1 and A2 of game A, frame images B1 and B2 of game B, frame images C1 and C2 of game C, and frame images D1 and D2 of game D are output in the following order: A1, B1, C1, D1, A2, B2, C2, D2. In this case, when compressing and encoding B2, the compression encoder does not use A2 as a forward reference target, but instead references previously stored data for B1 and intermediate data when compressing and encoding B1.
[0047] (2-6) The compression encoder performs compression encoding on a partial image basis, which is a part of an image of an application, and sequentially outputs the encoded data on a partial image basis, thereby performing low-latency processing.
[0048] <Details of the system of the embodiment> An example of a configuration that embodies the above technical concept will now be described. 5 is a block diagram showing functional blocks of a data processing system according to an embodiment. A data processing system 10 is a system that serves as a unit for processing an application, and one cloud server includes one or more data processing systems 10. The data processing system 10 includes a CPU 12, a GPU 14, a memory 16, a compression encoder 18 (also called a "video encoder"), and a network interface 20. These elements are connected via a bus 22. Furthermore, only one GPU 14 and one compression encoder 18 are provided in the data processing system 10.
[0049] In the block diagrams of this specification, each element described as a functional block performing various processes can be configured in hardware as a circuit block, memory, or other LSI, and can be realized in software as a program loaded into memory. Therefore, it is understood by those skilled in the art that these functional blocks can be realized in various forms by hardware alone, software alone, or a combination thereof, and are not limited to any one of them. For example, a computer program including modules corresponding to the functional blocks in the CPU 12 or GPU 14 in the block diagram may be installed in the storage of the data processing system 10. The CPU 12 and GPU 14 may perform the functions of each functional block by reading the computer program into the memory 16 and executing it.
[0050] The memory 16 stores data referenced or updated by the CPU 12, the GPU 14, and the compression encoder 18. The memory 16 includes a command buffer 30 and a frame buffer 32. The command buffer 30 stores commands (such as commands instructing the content of drawing) output from the CPU 12 to the GPU 14. In the embodiment, the command buffer 30 includes a plurality of buffers that are different for each game app executed in parallel. The individual command buffer for each game app is also referred to as an "individual app command buffer." The frame buffer 32 stores image data generated by the GPU 14. In the embodiment, the frame buffer 32 includes a plurality of buffers that are different for each game app executed in parallel. The individual frame buffer for each game app is also referred to as an "individual app frame buffer."
[0051] Here, a command buffer in which a drawing instruction, i.e., an instruction for data processing executed in synchronization with switching of an application to be executed in the GPU 14, is stored is referred to as a first command buffer. The command buffer 30 may include a second command buffer, which is a command buffer different from the multiple first command buffers corresponding to multiple game apps, and in which an instruction for data processing executed asynchronously with switching of an application to be executed in the GPU 14 is stored. The data processing executed asynchronously with switching of an application to be executed in the GPU 14 may be, for example, a general-purpose calculation process other than image processing. The GPU 14 may read a command from the second command buffer and execute the general-purpose calculation process regardless of the application to be executed.
[0052] The network interface 20 communicates with the client device in accordance with a predetermined communication protocol. In the embodiment, the client device is an information processing device (such as a PC, a smartphone, or a game console) of a user who plays a game, and displays game images generated by the data processing system 10 and accepts user operations for the game. The network interface 20 passes user operation information transmitted from the client device to the CPU 12. The network interface 20 also transmits image data compressed and encoded by the compression encoder 18 to the client device.
[0053] The CPU 12 includes a content determination unit 40, a drawing instruction unit 42, a switching instruction unit 44, and a timing unit 45. The GPU 14 includes a command reading unit 50, an image generation unit 52, a context saving unit 54, and a context reading unit 56. The content determination unit 40 and the image generation unit 52 execute processes that depend on each of the multiple game apps 58 executed in parallel. The compression encoder 18 includes an image reading unit 60 and a compression encoder 62. At least some of the functional blocks included in the CPU 12, GPU 14, and compression encoder 18 in FIG. 5 may be implemented as computer programs. The CPU 12, GPU 14, and compression encoder 18 may fulfill the functions of the respective functional blocks by executing computer programs.
[0054] 6 shows a schematic diagram of parallel processing of multiple applications in the data processing system 10. The CPU 12 executes data processing in parallel for game AppA, game AppB, game AppC, and game AppD that are running on multiple client devices. The GPU 14 executes, in a time-division manner, generation processing of multiple images corresponding to the multiple game Apps that are running in parallel, based on instructions from the CPU 12. As described above, the GPU 14 has at least the total computing power required by each of the multiple game Apps that are running in parallel.
[0055] Specifically, the content determination unit 40 of the CPU 12 determines the content of an image (e.g., an image showing an operation result) to be displayed on each client device based on user operation information input from the multiple client devices. In other words, the content determination unit 40 determines the content (image pattern, coordinate information, etc.) of multiple images corresponding to game AppA, game AppB, game AppC, and game AppD.
[0056] The drawing instruction unit 42 of the CPU 12 stores commands for drawing the content of each game App determined by the content determination unit 40 in the command buffer 30 (in the embodiment, an individual App command buffer corresponding to each game App).
[0057] The command reading unit 50 of the GPU 14 corresponds to the CP in Fig. 2. The command reading unit 50 reads a command for instructing drawing of an image corresponding to one game App (e.g., game App A, referred to here as the "target App") that is to be processed at a certain point in time among multiple game Apps executed in parallel, from an individual App command buffer corresponding to the target App. When the command reading unit 50 of the GPU 14 receives an application switching instruction (in the embodiment, a context switch instruction) from the switching instruction unit 44 of the CPU 12 and the application to be executed is switched, the command buffer from which the drawing instruction is read is switched from the individual App command buffer corresponding to the application that was previously the application to be executed to the individual App command buffer corresponding to the application to be executed next.
[0058] The image generating unit 52 of the GPU 14 corresponds to SE, TU, and RB in FIG. 2. The image generating unit 52 generates a plurality of images corresponding to a plurality of game apps executed in parallel, and stores the plurality of images in the frame buffer 32. Specifically, the image generating unit 52 generates image data of the target app according to the command read by the command reading unit 50. The image generating unit 52 stores the generated image data of the target app in the individual app frame buffer corresponding to the target app. As described above, the image generating unit 52 generates a plurality of images corresponding to a plurality of game apps at a frame rate equal to the total frame rates scheduled for the plurality of game apps executed in parallel.
[0059] The GPU 14 may provide the following additional information for the image stored in the frame buffer 32 to a subsequent processing unit (compression encoder 18, communication unit, display unit, etc.). The additional information may include (1) data indicating which application the image belongs to, in other words, data indicating the application from which the image was generated. The additional information may also include (2) data indicating the generation timing of the image, such as the number of the image, a timestamp, time information, etc. The additional information may also include (3) data indicating the display timing of the image, such as a timestamp, time information, etc. This can help the subsequent processing unit to appropriately prioritize the image processing, to determine whether to skip processing, etc. The GPU 14 may store the additional information in the frame buffer 32 as metadata of the image, or may pass the additional information to the subsequent processing unit via a memory area different from the frame buffer 32.
[0060] Fig. 7 shows a handshake flow between the CPU and the GPU in processing one application. As shown in Fig. 7, when the image generation process is completed, the image generation unit 52 of the GPU 14 transmits a drawing end notification signal to the CPU 12. In the embodiment, the image generation unit 52 generates one image (in other words, a frame) of the target App, and when the image is stored in the frame buffer 32, it transmits a drawing end notification signal to the CPU 12.
[0061] When the GPU 14 completes all the processes necessary for forming one frame corresponding to a first application (e.g., game AppA), the switching instruction unit 44 of the CPU 12 instructs the GPU 14 to switch to a generation process of an image corresponding to a second application (e.g., game AppB) different from the first application. When all the processes necessary for forming one frame corresponding to the first application (e.g., game AppA) are completed, it can also be said that the generation process of one image (which can also be said to be a final image) which is an image corresponding to the first application (e.g., game AppA) and is to be stored in the frame buffer is completed. Specifically, when the switching instruction unit 44 receives a rendering end notification from the GPU 14, it transmits a signal of a context switch instruction to the GPU 14. The context switch instruction may include information specifying a new target App different from the previous target App.
[0062] When a context switch instruction is received from the CPU 12, the context save unit 54 of the GPU 14 stores the previous context data of the target App in the memory 16 or a predetermined save register. As described above, the context data includes internal state information and intermediate data in the drawing process of the target App up to that point.
[0063] Furthermore, upon receiving a context switch instruction from the CPU 12, the context reading unit 56 of the GPU 14 obtains context data of the new target App specified by the context switch instruction from the memory 16 or a predetermined save register, and sets the obtained context data in a drawing process register of the GPU 14. When the context switch is completed, the command reading unit 50 of the GPU 14 reads a command instructing drawing of an image corresponding to the new target App from the individual app command buffer corresponding to the new target App, and proceeds to generation processing of an image corresponding to the new target App.
[0064] The timing unit 45 of the CPU 12 measures the time that each of the multiple game apps executed in parallel occupies the GPU 14. In other words, the timing unit 45 measures the time required for the image generation process of each of the multiple game apps.
[0065] The image reading unit 60 of the compression encoder 18 reads image data from the frame buffer 32 (sequentially from a plurality of individual App frame buffers in this embodiment) upon receiving a flip instruction signal, which will be described later, from the CPU 12. The compression encoding unit 62 compresses and encodes the image data read by the image reading unit 60 in accordance with a predetermined algorithm. When the compression encoding unit 62 completes the compression encoding of certain image data, it passes the compressed and encoded image data to the network interface 20, which transmits the compressed and encoded image data to the client device.
[0066] In the embodiment, the switching instruction unit 44 of the CPU 12 transmits a flip instruction signal to the compression encoder 18 upon receiving a rendering end notification from the GPU 14, and transmits a context switch instruction to the GPU 14. The flip instruction signal is a signal that instructs switching between a write target of image data and a reference target of image data (a read target for compression encoding) between multiple frame buffers 32. In other words, the flip instruction signal is a signal that instructs the compression encoder 18 to perform compression encoding of an image stored in the frame buffer 32. The flip instruction signal may include information that specifies an area of the frame buffer 32 in which an image to be compressed and encoded is stored (a specific individual App frame buffer in the embodiment).
[0067] Fig. 8 shows the frame buffer switching timing in the processing of one application. The figure shows an example of a double buffer (here, called buffer a and buffer b). While the GPU 14 writes an image to buffer a, the compression encoder 18 reads the image stored in buffer b and compresses and encodes it. Also, while the GPU 14 writes an image to buffer b, the compression encoder 18 reads the image stored in buffer a and compresses and encodes it. This switching is triggered by a flip instruction signal.
[0068] In the data processing system 10, the CPU 12 shifts the timing at which the drawing process of each application in the GPU 14 is started for multiple applications to be executed in parallel, in a manner that ensures a predetermined GPU allocation time for each application. As a result, the image generation unit 52 of the GPU 14 generates multiple images corresponding to the multiple applications to be executed in parallel at different timings for each application, and stores them in individual App frame buffers corresponding to each application.
[0069] Furthermore, in the data processing system 10, the compression encoder 18 reads out a plurality of images corresponding to a plurality of applications from the individual App frame buffers corresponding to each application at different timings for each application, based on a flip instruction signal transmitted from the CPU 12. This makes it possible to shorten the processing time from drawing to transmitting the compressed data, in other words, to reduce delays.
[0070] Furthermore, in the data processing system 10, the compression encoder 18 reads out a plurality of images corresponding to a plurality of applications from the frame buffer 32 at different timings for each application, and executes the encoding of the images corresponding to each application as a sequential process. This makes it possible to reduce the processing power required for the compression encoder 18.
[0071] FIG. 9 shows an example of sharing the GPU 14 in a time-sharing manner. In FIG. 9A, four systems operate in parallel, and each system generates (or displays) images of game AppA, game AppB, game AppC, and game AppD. In FIG. 9B, a single system processes games AppA, game AppB, game AppC, and game AppD in parallel in a time-sharing manner. The system in FIG. 9B has four times the performance of the single system in FIG. 9A. The processing time for each game App in the system in FIG. 9B is 1 / 4 (i.e., 1 / 240 seconds) compared to the single system in FIG. 9A.
[0072] Fig. 10 also shows an example of sharing the GPU 14 in a time-sharing manner. Fig. 10A shows an ideal case, where the GPU occupation time (total of image generation time and context switch time) of each of game AppA to game AppD is within 1 / 240 seconds. On the other hand, in Fig. 10B, the GPU occupation time of game AppB exceeds 1 / 240 seconds.
[0073] In the situation shown in Fig. 10B, the data processing system 10 of the embodiment skips the next GPU allocation for the game AppB. That is, when the GPU occupation time required for the generation process of one image corresponding to a certain application exceeds a predetermined allocation time, the data processing system 10 skips the GPU allocation for the next generation process of one image corresponding to the application.
[0074] For example, the timing unit 45 of the CPU 12 measures the time from when it instructs the GPU 14 to render a specific game App to when it receives a rendering end notification from the GPU 14, or the time from when it instructs the GPU 14 to render the next game App, as the GPU occupation time by the specific game App. If the GPU occupation time by the specific game App exceeds a predetermined time (1 / 240 seconds in the example of FIG. 10), the rendering instruction unit 42 of the CPU 12 skips the rendering instruction for the specific game App once (skips the next one).
[0075] As a modified example, when the GPU occupation time required for the generation process of one image corresponding to a certain application exceeds a predetermined allocation time, the data processing system 10 may shorten the next GPU allocation time for the next generation process of one image corresponding to the application. For example, when the GPU occupation time of a specific game app measured by the timer unit 45 exceeds a predetermined time (1 / 240 seconds in the example of FIG. 10), the drawing instruction unit 42 of the CPU 12 may shorten the GPU occupation time to be next allocated to the specific game app. In addition, the GPU occupation time to be next allocated to the specific game app may be shorter than the normal allocation time (1 / 240 seconds in the example of FIG. 10) determined by the number of apps executed in parallel and the frame rate of each app. In addition, the GPU occupation time to be next allocated to the specific game app may be shorter than the GPU occupation time to be next allocated to other game apps.
[0076] Note that the process of skipping the next GPU allocation or shortening the next GPU allocation time for a game App that has occupied the GPU 14 for a long time may be executed autonomously by the GPU 14. In this case, the GPU 14, instead of the CPU 12, may include a timer unit 45 that measures the GPU occupation time of each game App.
[0077] 11 also shows an example in which the GPU 14 is shared in a time-sharing manner. The CPU 12 may further include an app allocation unit (not shown). The timing unit 45 of the CPU 12 measures the GPU occupation time of each of a plurality of game apps that share the GPU 14 in a time-sharing manner. When the GPU occupation time of a predetermined number or more game apps among the plurality of game apps that share the GPU 14 in a time-sharing manner exceeds a predetermined time (e.g., 1 / 240 seconds), the app allocation unit may reduce the number of game apps that share the GPU 14 (in other words, the number of game apps that are processed in parallel by the data processing system 10).
[0078] 11 shows an example in which game AppC and game AppD are excluded from game Apps sharing the GPU 14 because the GPU occupation time of game AppA and the GPU occupation time of game AppB exceed a predetermined time (e.g., 1 / 240 seconds). That is, when four game Apps are executed in parallel as shown in FIG. 11, when the number of game Apps whose GPU occupation time exceeds the predetermined time reaches two, the number of game Apps executed in parallel may be reduced to two. The number of game Apps whose GPU occupation time exceeds the predetermined time as a threshold for reducing the number of game Apps executed in parallel and the number of game Apps to be reduced when the threshold is exceeded may be determined by experiments using the data processing system 10.
[0079] When reducing the number of game apps executed in parallel in its own system, the app allocation unit of the CPU 12 may cooperate with the app allocation unit of the other data processing system 10 to reallocate the processing of at least one game app executed in parallel in its own system to the other data processing system 10. For example, when the GPU occupation time of a predetermined number or more applications among a plurality of applications executed in parallel in its own system exceeds a predetermined allocation time (e.g., 1 / 240 second), the app allocation unit of the CPU 12 may reallocate at least one application among the plurality of applications to another data processing system.
[0080] Specifically, in the data processing system 10, when the processing time (GPU occupancy time) of a certain application exceeds a micro time, i.e., in a very small time unit such as 1 / 240 seconds, the next GPU allocation to the application is skipped (Skipping App B Process in FIG. 10). On the other hand, in the data processing system 10, in a macro time, i.e., in a sufficiently long time unit such as 10 seconds, statistics of the allocation results within the relevant time are taken, and when an unacceptable exceedance (e.g., exceedance of a predetermined time or number of times) occurs, some of the multiple applications executed in parallel are reallocated to another data processing system. Note that applications to be reallocated to another data processing system may be selected with priority given to those with a large excess time or number of exceedances.
[0081] Here, the application to be reallocated is referred to as the target App, the data processing system 10 that has been executing the target App is referred to as the first system, and the data processing system 10 to which the target App is to be newly allocated is referred to as the second system. The App allocation unit of the CPU 12 of the first system may cooperate with the App allocation unit of the CPU 12 of the second system to execute the following processes (1) to (4).
[0082] (1) The app allocation unit of the CPU 12 of the first system notifies the app allocation unit of the CPU 12 of the second system of the identification information of the target app. The processing unit (CPU 12, GPU 14, etc.) on the second system side loads the program of the target app from the memory 16 based on the identification information of the target app, and launches the target app. (2) The app allocation unit of the CPU 12 of the first system transmits context data regarding the target app stored in the first system to the second system, and the app allocation unit of the CPU 12 of the second system sets the context data in the processing unit (CPU 12, GPU 14, etc.).
[0083] (3) After completion of (1) above, the target app runs in both the first system and the second system until a context switch of the target app is performed in the first system at a certain timing thereafter. The app allocation unit of the CPU 12 of the first system uses the context switch at the certain timing as a trigger to stop the execution of the target app in the first system and notifies the app allocation unit of the CPU 12 of the second system of this fact. The app allocation unit of the CPU 12 of the first system transmits the context data of the target app in the first system that was saved in the context switch at the certain timing to the second system, and the app allocation unit of the CPU 12 of the second system sets the context data in a processing unit (CPU 12, GPU 14, etc.).
[0084] (4) When the stop of execution of the target app in the first system is notified and the setting of the context data of the target app is completed, the app allocation unit of the CPU 12 of the second system starts execution of the target app in each processing unit of the second system. Note that it is desirable to set the context and start execution of the target app in the second system within the processing allocation time interval (1 / 60th of a second in this example) from the final context switch of the target app in the first system.
[0085] The certain timing in (3) above may be selected in anticipation of the fact that the context saving of the first system, the context transfer from the first system to the second system, and the context setting in the second system can be completed within the interval of the processing allocation time. For example, the certain timing may be determined in consideration of whether or not the transfer system between the first system and the second system is occupied by other processing.
[0086] This allows the target app to resume execution in the second system without any time lag, and without the user being aware of the transition in the operating system, after inheriting the latest context of the target app in the first system.
[0087] The context copy and setting from the first system to the second system may be repeatedly executed until the certain timing described above is reached. For example, if the amount of context data is large and it is not possible to transfer, set, and resume all of the context within one processing allocation time interval, the context may be executed multiple times. Also, if it was expected that the context saving in the first system, the context transfer from the first system to the second system, and the context setting in the second system could be completed within the processing allocation time interval, but in reality they were not completed in time, the execution of the app by the first system may continue, and the context copy and setting may be executed again later.
[0088] Furthermore, in the data processing system 10, the compression encoder 18 is configured to read out a plurality of images corresponding to a plurality of applications from the frame buffer 32 at different timings for each application. In the embodiment, the drawing instruction unit 42 of the CPU 12 writes a drawing instruction command to the command buffer 30 at different timings for each application executed in parallel. As a result, the GPU 14 generates an image at different timings for each application executed in parallel, and writes the image to the frame buffer 32 (individual App frame buffer) at different timings for each application executed in parallel. Furthermore, the switching instruction unit 44 of the CPU 12 notifies the compression encoder 18 of a flip instruction at different timings for each application executed in parallel.
[0089] 12 shows the operation of the compression encoder 18 when multiple applications are processed in parallel. The figure includes a timing chart showing the timing of the compression encoder 18 reading an image from the frame buffer 32 (Scan) and compressing and encoding the read image (Enc).
[0090] In the embodiment, the switching instruction unit 44 of the CPU 12 transmits a flip instruction signal to the compression encoder 18 at different timings for each game App. As a result, as shown in Fig. 4 (method 72) and Fig. 12, the image reading unit 60 of the compression encoder 18 reads out a plurality of images corresponding to the plurality of game Apps from the frame buffer 32 (specifically, the individual App frame buffer corresponding to the game App to be processed) at different timings for each game App.
[0091] 4 (scheme 72) and 12, the compression encoding unit 62 of the compression encoder 18 compresses and encodes a plurality of images corresponding to a plurality of game apps at different timings for each game app. The compression encoding unit 62 executes the process of compressing and encoding a plurality of images corresponding to a plurality of game apps as a sequential process. As described above, the compression encoding unit 62 has the capability of encoding images at a frame rate that is the sum of the frame rates scheduled for a plurality of game apps executed in parallel.
[0092] The compression encoding unit 62 of the compression encoder 18 stores past images of each of the multiple game apps executed in parallel in a predetermined storage area, distinguishing between the game apps. In other words, the compression encoding unit 62 stores past images corresponding to a certain game app in a predetermined storage area, distinguishing between images corresponding to other game apps. When compression encoding a new image corresponding to a specific game app, the compression encoding unit 62 refers to past images corresponding to that game app stored in the storage area. This increases the compression efficiency of the images of each of the multiple game apps executed in parallel.
[0093] An example of CPU and GPU allocation will be described below. System B in Figure 1 has eight CPUs capable of single-thread processing at 1.6 GHz. On the other hand, System A in Figure 1 has eight CPUs capable of dual-thread processing at 3.2 GHz. Therefore, System A has approximately four times the CPU performance of System B. The dual-thread processing capability of the CPU in System A means that the CPU hardware has a mechanism that supports thread processing, and one CPU can run two applications simultaneously.
[0094] Figures 13 and 14 show an example of time-sharing allocation of CPUs and GPUs in system A of Figure 1. The four applications (App A to App D) executed here have been developed on the assumption that eight CPUs operating at 1.6 GHz are available. Each application is assigned to a thread of each of the eight CPUs for execution. If, as in system A, the number of threads supported by one CPU hardware is two and there are four applications to be executed in parallel, then two software-controlled threads can be provided within one hardware thread to execute the four threads in parallel.
[0095] Here, CPU thread processing refers to the state in which application processing is executed on the CPU in a time-sharing manner, regardless of whether it is hardware-controlled or software-controlled, with a granularity much smaller than the predetermined time allocated to the GPU (for example, 1 / 240 seconds). In effect, each application can occupy the corresponding CPU and operate.
[0096] Applications running on each thread of the CPU need to detect changes that occur outside the CPU in real time and take the necessary measures. In addition, in order to cooperate with the outside world with the same real-time characteristics as in System B, applications running on each thread of the CPU continue to run in parallel on the CPU regardless of the specified allocation time unit for the GPU or the actual time each application occupies the GPU. This allows applications running on each thread of the CPU to run in sync with each application process running on the GPU without delay.
[0097] 13 and 14, in CPU allocation for each application, an allocation is made to occupy the CPU regardless of a predetermined allocation time for the GPU. That is, the CPU 12 of the data processing system 10 executes a plurality of applications in parallel, with each application occupying the resources of the CPU 12 in parallel, regardless of the allocation time for each application in the GPU 14. This allows the application on the CPU 12 to execute synchronous processing with the outside of the CPU 12, including the GPU 14, while maintaining real-time performance.
[0098] Furthermore, as shown in system A in Figure 1, Figures 13 and 14, when the number of CPUs is insufficient for the number of applications to be executed in parallel, the CPU uses threads controlled by hardware or software to execute multiple applications in parallel.
[0099] Furthermore, as described above, a command buffer for the GPU is prepared for each application to be executed in parallel. The CPU stores data processing instructions (e.g., drawing instructions) for multiple applications to be executed in parallel in a command buffer corresponding to each application. The GPU reads data processing instructions (e.g., drawing instructions) for multiple applications to be executed in parallel from the command buffer and executes data processing (e.g., drawing processing) corresponding to each application. This allows a specific application on the CPU to continue processing even during a period when processing of a specific application is not assigned to the GPU (a period when a specific application does not occupy the GPU), and allows instructions to the GPU to be written to the command buffer corresponding to the specific application at any time.
[0100] The present invention has been described above based on the embodiments. These embodiments are merely illustrative, and it will be understood by those skilled in the art that various modifications are possible in the combination of each component or each treatment process, and that such modifications are also within the scope of the present invention.
[0101] A first modified example will be described. The data processing system 10 may be connected to a display device that displays an image generated in the data processing system 10. The switching instruction unit 44 of the CPU 12 may store data indicating a blanking period (in other words, a period during which no video is displayed) in the image display of the display device. The switching instruction unit 44 may transmit a context switch instruction to the GPU 14 and a flip instruction signal to the compression encoder 18 during the blanking period in the image display of the display device. As described above, since GPU processing is not required during the blanking period, the effect of the context switching process on the image generation process (delay in the image generation process, etc.) can be suppressed.
[0102] A second modified example will be described. In the above embodiment, the context switch of the GPU 14 has been mentioned, but the compression encoder 18 may also execute a context switch. For example, similar to the GPU 14, the compression encoder 18 may include a context reading unit that reads a context related to an application (e.g., an internal state of the compression encoder 18 or previous processing data) from the memory 16 and sets the context in the compression encoder 18 when the compression encoding of an image corresponding to an application is started. The compression encoder 18 may also include a context saving unit that saves the context related to the application from the compression encoder 18 to the memory 16 when the compression encoding of an image corresponding to an application is completed.
[0103] A third modified example will be described. As proposed in the applicant's patent application (Patent Application No. 2020-016144), the data processing system 10 may include at least one of a dedicated hardware function block for executing a context switch of the GPU 14 and a dedicated hardware function block for executing a context switch of the compression encoder 18. This hardware function block is a block independent of the CPU 12, the GPU 14, the memory 16, and the compression encoder 18, and is hereinafter also referred to as a "context switch engine."
[0104] The context switch engine accesses the memory 16 by DMA (Direct Memory Access). When the context switch engine is notified of the timing to switch applications or detects it itself, it (1) selects the context of each application stored in the memory 16 and transfers it to the processing unit (GPU 14 or compression encoder 18) without the intervention of software, and sets it, or (2) transfers and saves the context stored in the processing unit (GPU 14 or compression encoder 18) to the memory without the intervention of software.
[0105] Specifically, when GPU 14 completes the generation process of an image corresponding to a first application and starts the generation process of an image corresponding to a second application, the context switch engine that executes the context switch of GPU 14 may detect this based on a notification from switching instruction unit 44 of CPU 12, a notification from GPU 14, or the timing indicated by a video signal, etc. Then, the context switch engine may save the context related to the first application from GPU 14 to memory 16 and set the context related to the second application from memory 16 to GPU 14 without going through the processing of software that manages multiple applications executed in parallel.
[0106] Furthermore, when the compression encoder 18 completes encoding of an image corresponding to a first application and starts encoding of an image corresponding to a second application, the context switch engine that executes the context switch of the compression encoder 18 may detect this based on a notification from the switching instruction unit 44 of the CPU 12, a notification from the compression encoder 18, or a timing indicated by a video signal. The context switch engine may save the context related to the first application from the compression encoder 18 to the memory 16 and set the context related to the second application from the memory 16 to the compression encoder 18 without going through the processing of software that manages multiple applications executed in parallel. The software that manages multiple applications is typically software executed by the CPU 12, and may be software that manages the execution order of applications and resource allocation, for example.
[0107] A fourth modified example will be described. Fig. 15 and Fig. 16 are schematic diagrams showing parallel processing of multiple applications in the data processing system 10 of the modified example. The data processing system 10 may have a display pipeline 64 (in other words, a video pipeline) between the GPU 14 and the compression encoder 18.
[0108] The display pipeline 64 receives images from other image supplying blocks (such as the GPU 14 or a video decoder not shown). In other words, it may perform resolution conversion, image quality conversion or multiplexing on images from multiple applications to be processed in parallel in a time-division manner.
[0109] In Fig. 16, (1) the GPU 14 executes the drawing processes of two applications (App A and App B) in a time-division manner, generates two final images for each application, and stores them in the frame buffer 32. (2) the display pipeline 64 scales and composites the two final images for each application. (3) the compression encoder 18 compression-encodes the image after scaling and composition for each application.
[0110] A fifth modified example will now be described. In the above embodiment, the switching instruction unit 44 is provided in the CPU 12, but the switching instruction unit 44 may be provided in a functional block other than the CPU 12 (for example, the GPU 14).
[0111] The technical ideas described in the embodiments can be applied to cases other than the case where multiple game apps are executed in parallel, for example, the technical ideas can be applied to the case where other types of applications (for example, office software or business system programs) are executed in parallel instead of or together with game apps.
[0112] Any combination of the above-mentioned examples and modifications is also useful as an embodiment of the present disclosure. A new embodiment resulting from the combination has the effects of each of the combined examples and modifications. In addition, it will be understood by those skilled in the art that the functions to be performed by each component described in the claims can be realized by each component shown in the examples and modifications alone or in cooperation with each other.
[0113] The techniques described in the embodiments and modifications may be specified by the following aspects. [Item 1-1] One GPU performs time-sharing to generate multiple data corresponding to multiple applications executed in parallel, an instruction unit that instructs the GPU to switch to a generation process of data corresponding to a second application different from the first application when the GPU completes a generation process of one unit of data corresponding to a first application and to be transferred to a subsequent processing unit; A data processing system comprising: According to this data processing system, immediately after the generation process of one unit of data corresponding to a first application is completed, the amount of data related to the first application that needs to be saved is reduced, so that it is possible to efficiently switch to the generation process of data corresponding to a second application. In other words, by having one GPU execute the generation process of multiple pieces of data corresponding to multiple applications, it is possible to efficiently realize the generation process of multiple pieces of data corresponding to multiple applications while reducing the number of hardware resources and improving the system operating rate. [Item 1-2] 2. The data processing system according to item 1-1, wherein the unit of data passed to the subsequent processing unit is an image. According to this data processing system, immediately after the generation process of an image corresponding to a first application is completed, the amount of data related to the first application that needs to be evacuated is reduced, making it possible to efficiently switch to the generation process of an image corresponding to a second application. [Item 1-3] The data processing system according to item 1-1 or 1-2, characterized in that when the generation process of the one unit of data corresponding to the first application is completed in the GPU, context data related to the first application is stored in a predetermined memory area. According to this data processing system, the amount of context data related to the first application that needs to be saved can be reduced, and efficient context switching can be achieved. In other words, by waiting for the completion of rendering by the GPU before performing a context switch, it becomes easier to suspend and replace processing in the GPU, and the amount of processing required for context switching can be reduced. [Item 1-4] 3. The data processing system according to claim 1, further comprising a transfer unit that, when the GPU completes the generation process of the one unit of data corresponding to the first application and starts the generation process of data corresponding to the second application, evacuates context data related to the first application from the GPU to a specified memory area without going through processing of software that manages the multiple applications, and sets context data related to the second application from the memory area to the GPU. According to this data processing system, in addition to the effects of items 1-3, there is an effect that a context switch can be completed more quickly. [Items 1-5] A data processing system according to any one of items 1-1 to 1-4, characterized in that, when the GPU occupancy time required for the generation processing of the one unit of data corresponding to the first application exceeds a predetermined allocated time, the allocated time for the next generation processing of the one unit of data corresponding to the first application is shortened or the GPU allocation for the next generation processing is skipped. This data processing system can reduce the impact (delay, etc.) of the first application's excessive GPU occupancy time on data processing of other applications in the GPU, and can maintain fairness between applications executed in parallel. That is, even if a context switch is not executed for each predetermined allocated time at a micro level such as 1 / 240th of a second, at a macro level of several seconds to several minutes, each application is executed at a ratio according to the predetermined allocated time. As a result, the behavior of each application in the data processing system can be made the same as when the applications are executed in individual systems such as system B in Figure 1, including the real-time nature of processing. [Items 1-6] A data processing system according to any one of items 1-1 to 1-5, characterized in that, when the GPU occupancy time of a predetermined number or more of the plurality of applications exceeds a predetermined allocated time, the number of applications for which the unit of data is generated by the GPU is reduced. According to this data processing system, it is possible to secure the GPU occupancy time required for the data generation processing of an application. [Items 1-7] A data processing system according to any one of items 1-1 to 1-5, characterized in that if the GPU occupancy time of a predetermined number or more of the plurality of applications exceeds a predetermined allocation time, at least one of the plurality of applications is assigned to another data processing system. According to this data processing system, it is possible to secure the GPU occupancy time required for the data generation processing of an application. [Items 1-8] The data processing system described in items 1-7, characterized in that when the at least one application is assigned to the other data processing system, (1) the application is started in the other data processing system, (2) context data related to the application stored in the own system is transmitted to the other data processing system, and (3) processing of the application in the own system is stopped upon a context switch of the application in the own system at a certain timing. According to this data processing system, the processing of an application being executed in one system can be suitably taken over by another system. [Items 1-9] Further comprising an encoding unit, The GPU generates an image as the unit of data, and stores the generated image in a frame buffer; The data processing system according to any one of items 1-1 to 1-8, characterized in that the instruction unit instructs the GPU to perform the switching when instructing the encoding unit to encode the image stored in the frame buffer. According to this data processing system, when the generation process of one unit of data corresponding to one application is completed, it is possible to reliably instruct switching to the generation process of data corresponding to another application. [Items 1-10] The data processing system described in items 1-9 is characterized in that the GPU provides at least one of the following data to a subsequent processing unit for an image stored in the frame buffer: (1) data indicating which application the image belongs to, (2) data indicating the timing of image generation, and (3) data indicating the timing of image display. According to this data processing system, subsequent processing units (eg, compression / encoding / decompression unit, communication unit, display unit, etc.) can be operated appropriately. [Item 1-11] The data processing system according to any one of items 1-1 to 1-10, wherein the instruction unit instructs the switching during a blanking period in image display. According to this data processing system, since GPU processing is not required during the blanking period, it is possible to avoid the influence of context switching processing on image generation processing (such as delay in image generation processing). [Item 1-12] 12. The data processing system according to any one of items 1-1 to 1-11, wherein the GPU has at least a computing capability equal to the sum of the computing capabilities of the GPU required by each of the plurality of applications. This data processing system can reduce delays in generating multiple pieces of data corresponding to multiple applications. For example, when the data generated by the GPU is images, delays in displaying multiple images corresponding to multiple applications can be reduced. [Items 1-13] A CPU that executes the plurality of applications in parallel is further provided, 13. The data processing system according to any one of items 1-1 to 1-12, wherein the CPU has at least a computing capability equal to the total of the CPU computing capabilities required by each of the plurality of applications. According to this data processing system, it is possible to suppress processing delays of multiple applications executed in parallel. [Items 1-14] The data processing system according to any one of claims 1 to 13, characterized in that the CPU executes the multiple applications in parallel so that each application occupies the CPU resources in parallel, regardless of the time allocated to each application in the GPU. According to this data processing system, the CPU can execute synchronous processing with external functional blocks including the GPU while maintaining real-time performance. [Items 1-15] a command buffer corresponding to the plurality of applications; The CPU stores data processing instructions related to the plurality of applications in a command buffer corresponding to each application; The data processing system of any one of items 1 to 14, wherein the GPU reads data processing instructions for the multiple applications from the command buffer. According to this data processing system, even during a period when processing of a particular application is not assigned to the GPU, processing of the particular application can be continued on the CPU. [Items 1-16] a plurality of command buffers corresponding to the plurality of applications, the plurality of command buffers storing data processing instructions relating to the plurality of applications; The data processing system according to any one of items 1-1 to 1-12, wherein the GPU switches a command buffer from which data processing instructions are read when switching an application to be executed. According to this data processing system, the processing of a certain application in a functional block that issues an instruction for data processing and the processing of the same application in the GPU can be executed asynchronously. [Item 1-17] The data processing system described in items 1-16, further comprising a command buffer different from the multiple command buffers, the command buffer storing data processing instructions that can be executed asynchronously with the switching of the application to be executed in the GPU. According to this data processing system, it is possible to cause the GPU to execute data processing (for example, general-purpose computing processing such as numerical calculations) that can be executed asynchronously with the switching of applications to be executed in the GPU. [Item 1-18] A method executed by a data processing system having one GPU and a processor, the method comprising: A step in which the GPU executes a generation process of a plurality of data corresponding to a plurality of applications executed in parallel in a time-division manner; a step of instructing the instruction unit to switch to image generation processing corresponding to a second application different from the first application when the GPU completes a generation process of one unit of data corresponding to a first application and to be passed to a subsequent processing unit; A data processing method comprising: According to this data processing method, immediately after the generation process of one unit of data corresponding to a first application is completed, the amount of data related to the first application that needs to be saved is reduced, so that it is possible to efficiently switch to the generation process of data corresponding to a second application. In other words, by having one GPU execute the generation process of multiple pieces of data corresponding to multiple applications, it is possible to efficiently realize the generation process of multiple pieces of data corresponding to multiple applications while reducing the number of hardware resources and improving the system operating rate. [Item 1-19] A data processing system including one GPU and a command unit, A step in which the GPU executes a generation process of a plurality of data corresponding to a plurality of applications executed in parallel in a time-division manner; a step of instructing the instruction unit to switch to image generation processing corresponding to a second application different from the first application when the GPU completes a generation process of one unit of data corresponding to a first application and to be passed to a subsequent processing unit; A computer program for executing the above. According to this computer program, immediately after the generation process of one unit of data corresponding to a first application is completed, the amount of data related to the first application that needs to be saved is reduced, so that it is possible to efficiently switch to the generation process of data corresponding to a second application. In other words, by having one GPU execute the generation process of multiple pieces of data corresponding to multiple applications, it is possible to efficiently realize the generation process of multiple pieces of data corresponding to multiple applications while reducing the number of hardware resources and improving the system operating rate.
[0114] [Item 2-1] an image generation unit that generates a plurality of images corresponding to a plurality of applications executed in parallel and stores the plurality of images in a frame buffer; an encoding unit that reads and encodes an image stored in the frame buffer; Equipped with 2. A data processing system comprising: a data processing unit configured to read out a plurality of images corresponding to the plurality of applications from the frame buffer at different timings for each application. According to this data processing system, encoding with low delay can be realized and the required performance of the encoder can be reduced. [Item 2-2] Item 2-1. The data processing system according to item 2-1, wherein the encoding unit executes the process of encoding the multiple images corresponding to the multiple applications as a sequential process. According to this data processing system, encoding with low delay can be realized and the required performance of the encoder can be reduced. [Item 2-3] 3. The data processing system according to claim 2, wherein the image generating unit generates a plurality of images corresponding to the plurality of applications at different timings for each application. This data processing system can reduce the required performance of the image generating unit (eg, GPU). [Item 2-4] It also has a CPU. The CPU shifts the timing at which the image generating unit starts a drawing process for each application by allocating a predetermined time to each application; The data processing system according to any one of items 2-1 to 2-3, characterized in that the encoding unit reads out a plurality of images corresponding to the plurality of applications from the frame buffer at different timings for each application. According to this data processing system, the required performance of the image generating unit (for example, a GPU) can be reduced, and the required performance of the encoding unit can also be reduced. [Item 2-5] It also has a CPU. The CPU shifts the timing at which the image generating unit starts a drawing process for each application by allocating a predetermined time to each application; The data processing system described in item 2-1, characterized in that the encoding unit reads out a plurality of images corresponding to the plurality of applications from the frame buffer at different timings for each application, and executes a process of encoding the plurality of images corresponding to the plurality of applications as a sequential process. According to this data processing system, the required performance of the image generating unit (for example, a GPU) can be reduced, and the required performance of the encoding unit can also be reduced. [Item 2-6] The data processing system according to any one of items 2-1 to 2-5, wherein the image generating unit generates the images at a frame rate that is a sum of frame rates scheduled by the applications. According to this data processing system, it is possible to suppress delays in generating a plurality of images corresponding to a plurality of applications, and it is possible to suppress delays in displaying a plurality of images corresponding to a plurality of applications. [Item 2-7] The data processing system according to any one of items 2-1 to 2-6, characterized in that the encoding unit has a performance capable of encoding images at a frame rate that is the sum of frame rates scheduled by the multiple applications. According to this data processing system, it is possible to suppress the delay in encoding a plurality of images corresponding to a plurality of applications, and it is also possible to suppress the delay in displaying a plurality of images corresponding to a plurality of applications. [Item 2-8] The data processing system according to any one of items 2-1 to 2-7, wherein the encoding unit stores past images corresponding to a certain application separately from images corresponding to other applications, and refers to the past images corresponding to the certain application when compressing and encoding a new image corresponding to the certain application. According to this data processing system, it is possible to improve the efficiency of compressing images of a plurality of applications that are executed at different times. [Item 2-9] The data processing system according to any one of items 2-1 to 2-8, further comprising a transfer unit that, when the encoding unit completes encoding of an image corresponding to a first application and starts encoding of an image corresponding to a second application, saves a context related to the first application from the encoding unit to a storage unit and sets a context related to the second application from the storage unit to the encoding unit without going through processing of software that manages the multiple applications. According to this data processing system, it is possible to quickly execute context switching in the encoding unit, and it is possible to suppress delays in processing in the encoding unit, for example. [Item 2-10] A method executed by a data processing system including an image generating unit and an encoding unit, comprising: the image generating unit generating a plurality of images corresponding to a plurality of applications executed in parallel and storing the plurality of images in a frame buffer; a step of the encoding unit reading a plurality of images corresponding to the plurality of applications from the frame buffer at different timings for each application, and encoding the read images; A data processing method comprising: According to this data processing method, it is possible to realize encoding with low delay and reduce the required performance of the encoder. [Item 2-11] A data processing system including an image generating unit and one encoding unit, the image generating unit generating a plurality of images corresponding to a plurality of applications executed in parallel and storing the plurality of images in a frame buffer; a step of the encoding unit reading a plurality of images corresponding to the plurality of applications from the frame buffer at different timings for each application, and encoding the read images; A computer program for executing the above. According to this computer program, encoding with low delay can be realized and the required performance of the encoder can be reduced. [Industrial Applicability]
[0115] The present invention is applicable to a system that executes a plurality of applications in parallel. [Explanation of symbols]
[0116] 10 data processing system, 12 CPU, 14 GPU, 18 compression encoder, 32 frame buffer, 42 drawing instruction unit, 44 switching instruction unit, 52 image generation unit, 54 context saving unit, 56 context reading unit, 62 compression encoding unit.
Claims
1. A CPU, an image generation unit that generates a plurality of images corresponding to a plurality of applications executed in parallel and stores the plurality of images in a frame buffer; an encoding unit that reads and encodes the image stored in the frame buffer; Equipped with the CPU shifts the timing at which the image generating unit starts a drawing process for each application by allocating a predetermined time to each application; The data processing system according to claim 1, wherein the encoding unit reads out a plurality of images corresponding to the plurality of applications from the frame buffer at different timings for each application.
2. 2. The data processing system according to claim 1, wherein the encoding unit executes the process of encoding the plurality of images corresponding to the plurality of applications as a sequential process.
3. 3. The data processing system according to claim 1, wherein the image generating section generates a plurality of images corresponding to the plurality of applications at different times for each application.
4. 4. The data processing system according to claim 1, wherein the image generating section generates the images at a frame rate that is a total of frame rates scheduled by the applications.
5. 5. The data processing system according to claim 1, wherein the encoding unit has a performance capable of encoding images at a frame rate that is a total of frame rates scheduled by the plurality of applications.
6. A data processing system according to any one of claims 1 to 5, characterized in that the encoding unit stores past images corresponding to a certain application separately from images corresponding to other applications, and refers to the past images corresponding to the certain application when compressing and encoding a new image corresponding to the certain application.
7. A data processing system as described in any one of claims 1 to 6, further comprising a transfer unit that, when the encoding unit completes encoding of an image corresponding to a first application and starts encoding of an image corresponding to a second application, saves a context related to the first application from the encoding unit to a memory unit without going through processing of software that manages the multiple applications, and sets a context related to the second application from the memory unit to the encoding unit.
8. A method executed by a data processing system including a CPU, an image generating unit, and an encoding unit, comprising: a step of shifting timings at which the CPU causes the image generating unit to start drawing processes of a plurality of applications executed in parallel by allocating a predetermined time to each application; the image generating unit generating a plurality of images corresponding to the plurality of applications and storing the plurality of images in a frame buffer; a step of the encoding unit reading a plurality of images corresponding to the plurality of applications from the frame buffer at different timings for each application, and encoding the read images; A data processing method comprising:
9. A CPU of a data processing system, A process of shifting timings for initiating drawing processes of a plurality of applications executed in parallel by an image generating unit of the data processing system in such a manner that a predetermined time is allocated to each application; causing the image generator to generate a plurality of images corresponding to the plurality of applications and store the plurality of images in a frame buffer; a process of causing an encoding unit of the data processing system to read a plurality of images corresponding to the plurality of applications from the frame buffer at different timings for each application, and to encode the read images; A computer program for executing the above.
Citation Information
Patent Citations
Picture drawing transfer system
JP2008289030A
Information processing device
WO2012014625A1
