Task processing apparatus, task processing method, and device

By configuring resource tags for task instances and dynamically adjusting storage parameters, the problem of inaccurate resource control in the processor system is solved, and the task processing performance and energy efficiency are improved.

WO2025175942A1PCT designated stage Publication Date: 2025-08-28HUAWEI TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/070170
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-02-21
Filing Date
2025-01-02
Publication Date
2025-08-28

AI Technical Summary

Technical Problem

Existing processor systems cannot provide precise resource control for different task scenarios or different stages of the same task during task processing, resulting in unreasonable resource scheduling and low energy efficiency.

Method used

By configuring resource tags for each task instance, fine-grained resource control of task information is achieved using processing cores, storage devices and control devices, including dynamic adjustment of cache, interconnection devices and storage parameters.

Benefits of technology

It improves the performance of task processing, ensures quality of service (QoS), and improves the rationality of resource scheduling and system energy efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025070170_28082025_PF_FP_ABST
    Figure CN2025070170_28082025_PF_FP_ABST
Patent Text Reader

Abstract

The embodiments of the present application relate to the technical field of electronics. Provided are a task processing apparatus, a task processing method, and a device, which are used for providing more accurate resource control for different task scenarios and different stages of the same task. The task processing apparatus comprises: at least one processing core, which is configured to output a plurality of resource tags corresponding to a plurality of task instances, wherein each resource tag corresponds to at least one task instance, and the plurality of task instances comprise sub-tasks of one or more tasks; a first storage apparatus, which is configured to cache a plurality of pieces of task information corresponding to the plurality of resource tags, and determine storage parameters of each of the plurality of pieces of task information; and a control apparatus, which is configured to output control information of any one of the plurality of pieces of task information, wherein the control information is used for adjusting the storage parameters of the task information in the first storage apparatus.
Need to check novelty before this filing date? Find Prior Art

Description

Task processing device, task processing method and equipment

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on February 21, 2024, with application number 202410196061.3 and application name “A task processing device, task processing method and equipment”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of electronic technology, and in particular to a task processing device, a task processing method, and equipment. Background Art

[0003] During operation, processor systems typically execute multiple tasks simultaneously. Different tasks, or different stages of the same task, may have varying performance requirements, such as quality of service (QoS), processor resource requirements, and energy efficiency. Currently, processor systems can only control tasks using cores or threads within the system as the control entities, failing to provide precise resource control for different task scenarios or different stages of the same task. Summary of the Invention

[0004] The present application provides a task processing apparatus, a task processing method and a device for providing more precise resource control for different task scenarios and different stages of the same task.

[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0006] In a first aspect, a task processing device is provided, which includes: at least one processing core for outputting multiple resource tags corresponding to multiple task instances, each resource tag is used to identify at least one task instance that uses the same resource (that is, each resource tag corresponds to at least one task instance), and the task instance can be called a subtask. For example, the task instance can include but is not limited to: a process, a thread, an executed function, an accessed memory address, communication between threads, etc.; a first storage device for caching multiple task information corresponding to the multiple resource tags and determining storage parameters for each task information in the multiple task information, each resource tag corresponds to a task information, and the task information includes information of at least one task instance identified by the resource tag, and the information includes data and / or instructions, etc.; a control device for outputting control information of any task information in the multiple task information, the control information is used to adjust the storage parameters of the task information in the first storage device, that is, to control the resources used by the task information in the first storage device; wherein the storage parameters include at least one of the following: miss rate, access bandwidth, access delay, total occupied capacity, and probability of being replaced. Optionally, the at least one task instance identified by each resource tag includes at least one task instance in the same scenario, and different resource tags may identify task instances in different task scenarios or at different stages.

[0007] In the above technical solution, the at least one processing core is used to output multiple resource tags corresponding to multiple task instances, the first storage device is used to cache multiple task information corresponding to the multiple resource tags and determine the storage parameters of each task information, and the control device is used to adjust the storage parameters of any task information in the first storage device, so that the control device can control the resources used by the task information corresponding to each resource tag according to the granularity of the resource tag. In this way, when different resource tags correspond to task instances of different task scenarios or different stages of the same task, fine-grained resource management can be provided for different task scenarios or different stages of the same task to ensure the QoS of the task, improve the rationality of resource scheduling and system energy efficiency, and thereby improve the performance of task processing.

[0008] In a possible implementation of the first aspect, the at least one processing core is further configured to: output multiple load and store instructions carrying the multiple resource tags, each load and store instruction including a load instruction and / or a store instruction; and the first storage device is further configured to: transmit and cache multiple task information corresponding to the multiple resource tags based on the multiple load and store instructions. In the above possible implementation, the at least one processing core may output the resource tags via the load and store instructions to transmit the resource tags to the first storage device, so that the first storage device can calculate the storage parameters of the task information according to the granularity of the resource tags, thereby controlling the resources used by the task information with different resource tags.

[0009] In a possible implementation of the first aspect, the at least one processing core includes a first processing core, the first storage device includes a first cache device (or private cache device) coupled to the first processing core, the first cache device including: a first cache for caching at least one task information, the at least one task information including task information corresponding to a resource tag output by the first processing core; a first detector for detecting storage parameters of each task information in the at least one task information in the first cache; and a first executor for adjusting storage parameters of the first task information in the first cache according to first control information, the first control information being output by the control device for the first task information, the at least one task information including the first task information. Optionally, the first cache device may include a first-level cache device and / or a second-level cache device, each level of cache device may include its own detector and executor. In the above possible implementation, the first cache device corresponding to each processing core may detect the storage parameters of its cached task information via the detector, and receive control information sent by the control device via the executor, thereby controlling the resources used by its cached task information. This allows the resources in each processing core's private cache device to be controlled at the granularity of the resource tag, thereby improving the rationality and energy efficiency of resource scheduling in the private cache device.

[0010] In a possible implementation of the first aspect, the at least one processing core further includes a second processing core, the first storage device further includes a second cache device (or a shared cache device) coupled to both the first processing core and the second processing core, the second cache device including: a second cache for caching at least two pieces of task information, the at least two pieces of task information including task information corresponding to resource tags output by the first processing core and the second processing core; a second detector for detecting storage parameters of each of the at least two pieces of task information in the second cache; and a second executor for adjusting storage parameters of the second task information in the second cache according to second control information, the second control information being output by the control device for the second task information, the at least two pieces of task information including the second task information. In the above possible implementation, the second cache device corresponding to the at least one processing core can detect the storage parameters of the cached task information via the detector, and receive control information sent by the control device via the executor, thereby controlling the resources used by the cached task information, thereby controlling the resources in the shared cache device according to the granularity of the resource tags, thereby improving the rationality and energy efficiency of resource scheduling in the shared cache device.

[0011] In a possible implementation of the first aspect, the first cache device and the second cache device are coupled via an interconnection device; the interconnection device is used to transmit the at least two task information and determine the transmission parameters of each task information in the at least two task information; the control device is also used to output third control information of the third task information in the at least two task information, and the third control information is used to adjust the transmission parameters of the third task information in the interconnection device, and the at least two task information also include the third task information. Optionally, the transmission parameter includes at least one of the following: access bandwidth, access delay. In the above possible implementation, the control device can control the resources used by the task information transmitted by the interconnection device, so that the resources in the bus can be controlled according to the granularity of the resource label, thereby improving the rationality and energy efficiency of resource scheduling in the bus.

[0012] In one possible implementation of the first aspect, the interconnection device includes: a bus for transmitting the at least two pieces of task information; a third detector for determining transmission parameters of each piece of the at least two pieces of task information within the bus; and a third executor for adjusting the transmission parameters of the third piece of task information within the bus based on third control information. In this possible implementation, the interconnection device can detect the transmission parameters of the task information it transmits via the detector and receive control information sent by the control device via the executor to control the resources used by the task information it transmits. This allows for controlling bus resources at the granularity of resource tags, thereby improving the rationality and energy efficiency of resource scheduling within the bus.

[0013] In a possible implementation of the first aspect, the first storage device is used to couple with the second storage device (or memory device); the second storage device is used to: store operation information, which includes task information corresponding to the multiple resource tags; determine the storage parameters of the task information corresponding to each resource tag in the multiple resource tags; the control device is also used to: control the resources used by the task information in the second storage device according to the storage parameters of the task information corresponding to any resource tag in the multiple resource tags. Optionally, the transmission parameter includes at least one of the following: access bandwidth, access delay. In the above possible implementation, the control device can control the resources used by the task information stored in the second storage device, so that the resources in the second storage device can be controlled according to the granularity of the resource tag, thereby improving the rationality and energy efficiency of resource scheduling in the second storage device.

[0014] In one possible implementation of the first aspect, the at least one processing core is further configured to configure a resource tag for each of the multiple task instances, wherein the resource tag for each task instance is implemented by configuring at least one of the following: a thread, a control register, an instruction encoding field, a redundant bit field of a virtual address, a redundant bit field of a physical address, and a virtual page attribute. In the above possible implementation, multiple configuration methods for resource tags of different granularities are provided. Configuring resource tags in this manner can increase the diversity and flexibility of configuring resource tags, thereby increasing the flexibility and diversity of resource control based on resource tags.

[0015] In a possible implementation of the first aspect, when the same task instance corresponds to at least two resource tags, the priorities of the at least two resource tags are different. In the above possible implementation, by setting priorities for the at least two resource tags, the diversity and flexibility of configuring resource tags can be improved.

[0016] In a second aspect, a task processing method is provided, which is applied to a task processing device including at least one processing core, a first storage device and a control device, the method comprising: the at least one processing core outputs multiple resource tags corresponding to multiple task instances, each resource tag is used to identify at least one task instance that uses the same resource; the first storage device caches multiple task information corresponding to the multiple resource tags, and determines the storage parameters of each task information in the multiple task information, the task information corresponding to each resource tag includes information of the at least one task instance identified by the resource tag; the control device outputs control information of any task information in the multiple task information, the control information is used to adjust the storage parameters of the task information in the first storage device; wherein the storage parameters include at least one of the following: miss rate, access bandwidth, access delay, total occupied capacity, and probability of being replaced.

[0017] In a possible implementation of the second aspect, the at least one processing core outputs multiple resource tags corresponding to multiple task instances, including: the at least one processing core outputs multiple load and store instructions carrying the multiple resource tags; the first storage device caches multiple task information corresponding to the multiple resource tags, including: the multiple load and store instructions are used by the first storage device to transmit and cache the multiple task information corresponding to the multiple resource tags.

[0018] In a possible implementation of the second aspect, the at least one processing core includes a first processing core, the first storage device includes a first cache device coupled to the first processing core, the first cache device includes a first cache, a first detector, and a first executor; the first storage device caches the multiple task information corresponding to the multiple resource tags, and determines a storage parameter for each task information in the multiple task information, including:

[0019] The first buffer caches at least one task information, and the at least one task information includes task information corresponding to the resource tag output by the first processing core; the first detector detects the storage parameters of each task information in the at least one task information in the first buffer; the method also includes: the first executor adjusts the storage parameters of the first task information in the first buffer according to the first control information, the first control information is output by the control device for the first task information, and the at least one task information includes the first task information.

[0020] In a possible implementation of the second aspect, the at least one processing core also includes a second processing core, the first storage device also includes a second cache device coupled to both the first processing core and the second processing core, the second cache device includes a second cache, a second detector and a second executor: the first storage device caches multiple task information corresponding to the multiple resource tags, and determines the storage parameters of each task information in the multiple task information, and also includes: the second cache caches at least two task information, the at least two task information include task information corresponding to the resource tags output by the first processing core and the second processing core; the second detector detects the storage parameters of each task information in the at least two task information in the second cache; the method also includes: the second executor adjusts the storage parameters of the second task information in the second cache according to the second control information, the second control information is output by the control device for the second task information, and the at least two task information include the second task information.

[0021] In a possible implementation of the second aspect, the first cache device and the second cache device are coupled via an interconnection device; the method further includes: the interconnection device transmits the at least two task information and determines a transmission parameter for each task information in the at least two task information; the control device outputs third control information of a third task information in the at least two task information, the third control information being used to adjust the transmission parameters of the third task information in the interconnection device, the at least two task information also including the third task information, and the transmission parameters including at least one of the following: access bandwidth, access delay.

[0022] In a possible implementation of the second aspect, the interconnection device includes a bus, a third detector, and a third executor: the interconnection device transmits the at least two task information and determines the transmission parameters of each of the at least two task information, including: the bus transmits the at least two task information; the third detector determines the transmission parameters of each of the at least two task information in the bus; the method further includes: the third executor controls the resources used by the third task information in the bus according to the third control information. In a possible implementation of the second aspect, the first storage device is used to couple with the second storage device; the method further includes: the second storage device stores operation information, the operation information including the task information corresponding to the multiple resource tags; the second storage device determines the storage parameters of the task information corresponding to each resource tag in the multiple resource tags; the control device adjusts the storage parameters of the task information corresponding to any resource tag in the multiple resource tags in the second storage device.

[0023] In a possible implementation of the second aspect, the method further includes: the at least one processing core configuring a resource tag for each task instance in the multiple task instances, wherein the resource tag of each task instance is implemented by configuring at least one of the following: a thread, a control register, an encoding field of an instruction, a redundant bit field of a virtual address, a redundant bit field of a physical address, and a virtual page attribute.

[0024] In a possible implementation manner of the second aspect, when the same task instance corresponds to at least two resource tags, the at least two resource tags have different priorities.

[0025] In a third aspect, an electronic device is provided, which includes a memory and a task processing device, the memory being used to store computer instructions, and the task processing device being used to execute the computer instructions so that the electronic device implements the task processing method provided in the second aspect or any possible implementation of the second aspect.

[0026] In another aspect of the present application, a computer-readable storage medium is provided, in which a computer program or instruction is stored. When the computer program or instruction is executed, the task processing method provided by the second aspect or any possible implementation of the second aspect is implemented.

[0027] In another aspect of the present application, a computer program product is provided, which includes: a computer program (also referred to as code, or instructions), which, when executed, enables a computer to execute a task processing method as provided in the second aspect or any possible implementation of the second aspect.

[0028] It can be understood that the beneficial effects that can be achieved by any of the task processing methods, electronic devices, computer-readable storage media and computer program products provided above can correspond to the beneficial effects of the task processing devices provided above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] FIG1 is a schematic diagram of the structure of a processor system provided in an embodiment of the present application;

[0030] FIG2 is a schematic diagram of the structure of a task processing device provided in an embodiment of the present application;

[0031] FIG3 is a schematic diagram of the structure of another task processing device provided in an embodiment of the present application;

[0032] FIG4 is a schematic diagram of a control device controlling a first storage device according to an embodiment of the present application;

[0033] FIG5 is a flowchart of configuring resource tags according to an embodiment of the present application;

[0034] FIG6 is a flowchart of another configuration resource tag according to an embodiment of the present application;

[0035] FIG7 is a schematic diagram of resources used by task information corresponding to a control resource tag provided by an embodiment of the present application;

[0036] FIG8 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0037] The following will discuss in detail the making and use of various embodiments. However, it should be understood that many applicable inventive concepts provided herein can be implemented in a variety of specific contexts. The specific embodiments discussed are merely illustrative of specific ways to implement and use the present application and technology and do not limit the scope of this application.

[0038] Unless defined otherwise, all technical and scientific terms used herein have the same meanings as commonly understood by one of ordinary skill in the art.

[0039] Various circuits or other components may be described or referred to as being "configured to" perform one or more tasks. In this case, "configured to" is used to imply structure by indicating that the circuit / component includes structure (e.g., circuitry) that performs the one or more tasks during operation. Thus, even when a specified circuit / component is not currently operational (e.g., not turned on), the circuit / component may be referred to as being configured to perform the task. Circuits / components used with the phrase "configured to" include hardware, such as circuitry that performs an operation, etc.

[0040] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, a, b and c; where a, b and c can be single or multiple.

[0041] The embodiments of this application use terms such as "first" and "second" to distinguish objects with similar names, functions, or effects. Those skilled in the art will understand that terms such as "first" and "second" do not limit the quantity or order of execution. The term "coupled" is used to indicate an electrical connection, including direct connection via wires or connectors or indirect connection via other devices. Therefore, "coupling" should be considered a broadly defined electronic communication connection.

[0042] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0043] During operation, the processor system usually executes multiple different tasks at the same time. Different tasks or different stages of the same task may have different performance requirements, such as the requirements for quality of service (QoS), processor resources, and energy efficiency. Based on this, the embodiment of the present application provides a task processing device and a task processing method, which can provide fine-grained resource control for different task scenarios or different stages of the same task to ensure the QoS of the task, improve the rationality of resource scheduling and system energy efficiency, and thus improve the performance of task processing.

[0044] The technical solutions provided in the embodiments of the present application can be applied to a processor system, which can also be referred to as a processor subsystem or a processing system. The processor system may include at least one processing core (or core, also called a processor core), each processing core having a corresponding private cache (e.g., a level 1 cache and a level 2 cache), the private caches of different processing cores being coupled to a shared cache (e.g., a level 3 cache) via a bus, and different processing cores in the at least one processing core being able to access the shared cache.

[0045] Exemplarily, as shown in Figure 1, the processor system includes multiple processing cores, including processing cores 101 to 104, processing core 101 is coupled to private cache 111, processing core 102 is coupled to private cache 112, processing core 103 is coupled to private cache 113, and processing core 104 is coupled to private cache 114, and private cache 111, private cache 112, private cache 113 and private cache 114 are coupled to shared cache 140 via bus 130.

[0046] In the processor system, the multiple processing cores may include multiple different processing cores of the same processor, or the multiple processing cores may include processing cores of multiple different processors, that is, the multiple processing cores may form one or more processors. The processors include, but are not limited to, CPUs, general-purpose processors, graphics processing units (GPUs), image signal processors (ISPs), digital signal processors (DSPs), network processing units (NPUs), artificial intelligence (AI) processors, and the like. Optionally, the structures of any two of the multiple processing cores and the sizes of their respective hardware resources (e.g., cache resources) may be the same or different, and this embodiment of the application does not impose any specific restrictions on this.

[0047] Furthermore, as shown in FIG1 , the processor system further includes a controller and a memory, which may constitute a storage system. Optionally, the memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which serves as an external cache. Exemplarily, the RAM may be a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), and a double data rate synchronous dynamic random access memory (DDR SDRAM). FIG1 illustrates the processor system as including a DDR controller and a DDR SDRAM.

[0048] The processor system may be an electronic device, or a system on chip (SoC) or a chipset comprising multiple chips applied to an electronic device, or a module comprising the SoC or chipset. The electronic device may be used as a terminal device or a server. Optionally, the electronic device includes but is not limited to: mobile phones, tablet computers, laptops, desktop computers, PDAs, ultra-mobile personal computers (umPCs), mobile internet devices (MIDs), netbooks, camcorders, cameras, wearable devices (such as smart watches and smart bracelets, etc.), vehicle-mounted equipment (such as cars, bicycles, electric vehicles, airplanes, ships, trains, high-speed railways, etc.), virtual reality (VR) equipment, augmented reality (AR) equipment, wireless terminals in industrial control, smart home devices (such as refrigerators, televisions, air conditioners, electric meters, etc.), intelligent robots, workshop equipment, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, or wireless terminals in smart homes, flying equipment (such as intelligent robots, hot air balloons, drones, airplanes), etc.

[0049] FIG2 is a schematic diagram of the structure of a task processing device provided in an embodiment of the present application, which can be used in the processor system provided above. The task processing device includes: at least one processing core 10, a first storage device 20, and a control device 30. The at least one processing core 10 is coupled to the first storage device 20, and the first storage device 20 is coupled to the control device 30. FIG2 illustrates an example in which the at least one processing core 10 includes n processing cores, represented as processing core 11, processing core 12, ..., processing core 1n.

[0050] The at least one processing core 10 is used to: output multiple resource tags corresponding to multiple task instances, each resource tag is used to identify at least one task instance using the same resource (or each resource tag corresponds to at least one task instance), and the multiple task instances include one or more subtasks of the task. Among them, the at least one processing core includes one or more processing cores, and the one or more processing cores can be used to run one or more tasks, each task can include multiple subtasks (or multiple stages), and each subtask can be called a task instance (or software instance). Exemplarily, the task instance can include but is not limited to: a process, a thread, an executed function, an accessed memory address, communication between threads, etc. In addition, each task instance in the multiple task instances can correspond to a resource tag, and the resource tags corresponding to different task instances in the multiple task instances can be the same or different.

[0051] Optionally, the at least one task instance corresponding to each resource tag may include at least one task instance under the same scenario, and different resource tags may correspond to task instances in different task scenarios or different stages. Each of the multiple resource tags can be used to identify a resource group, and at least one task instance corresponding to the same resource tag shares the same resource group. That is, the at least one processing core 10 can divide the multiple task instances into multiple groups according to different task scenarios or different stages of the same task, each group corresponding to a resource tag, and multiple task instances belonging to the same group use the same resource group during operation.

[0052] In one possible embodiment, for each resource tag among the multiple resource tags, when the at least one processing core 10 is used to output the resource tag, the resource tag may be carried in the instruction output to the first storage device 20. The instruction may be an instruction of the task instance corresponding to the resource tag, that is, the instruction of the task instance output by the at least one processing core 10 during the process of running the task instance. Exemplarily, the at least one processing core 10 may be specifically configured to: output multiple load and store instructions carrying the multiple resource tags, each load and store instruction may include a load instruction and / or a store instruction.

[0053] The first storage device 20 is used to: cache multiple task information corresponding to the multiple resource tags, and determine the storage parameters of each task information in the multiple task information. Each resource tag corresponds to a task information, and the task information includes information about at least one task instance corresponding to the resource tag. For example, the task information includes data and / or instructions involved in the operation of the at least one task instance. The storage parameters of each task information include parameters of the resources used (or occupied) by the task information in the first storage device 20. For example, the storage parameters include bandwidth, latency, storage capacity, etc.

[0054] In a possible embodiment, the at least one processing core 10 is used to output multiple load and store instructions carrying the multiple resource tags. For each resource tag in the multiple resource tags, the first storage device 20 can be used to: when receiving the load and store instructions carrying the resource tag, load the task information corresponding to the resource tag according to the load and store instructions, or store the task information corresponding to the resource tag.

[0055] The control device 30 is configured to: output control information for any task information among the plurality of task information, the control information being used to adjust storage parameters of the task information in the first storage device 20. That is, the control device is configured to control resources used by the task information in the first storage device 20 based on the storage parameters of the task information among the plurality of task information. Optionally, the control device 30 may be a device or unit having a control function or being configurable, for example, an embedded controller, a microcontroller unit (MCU), a field programmable gate array (FPGA), a complex programmable logic device (CPLD), etc.

[0056] In the task processing device provided in an embodiment of the present application, the at least one processing core 10 is used to output multiple resource tags corresponding to multiple task instances, the first storage device 20 is used to cache multiple task information corresponding to the multiple resource tags and determine the storage parameters of each task information, and the control device 30 is used to adjust the storage parameters of any task information in the first storage device 20, so that the control device 30 can control the resources used by the task information corresponding to each resource tag according to the granularity of the resource tag. In this way, when different resource tags correspond to task instances of different task scenarios or different stages of the same task, fine-grained resource management can be provided for different task scenarios or different stages of the same task to ensure the QoS of the task, improve the rationality of resource scheduling and system energy efficiency, and thereby improve the performance of task processing.

[0057] Furthermore, as shown in FIG3 , the first storage device 20 may include a first cache device 21 coupled to each processing core, and may also include a second cache device 22 coupled to the at least one processing core 10. The first cache device 21 and the second cache device 22 may be coupled via an interconnect device 23. Optionally, the first cache device 21 may also be referred to as a private cache device, for example, the first cache device 21 may include a first-level cache device, a second-level cache device, or both a first-level cache device and a second-level cache device; the second cache device 22 may also be referred to as a shared cache device, for example, the second cache device 22 may include a third-level cache device. FIG3 illustrates an example in which the at least one processing core 10 includes a first processing core 11, and the first cache device 21 includes a first-level cache device and a second-level cache device.

[0058] Optionally, the first cache device 21 and / or the second cache device 22 can be used to determine the storage parameters of each task information in the multiple task information. For example, in the first cache device 21 or the second cache device, the storage parameters of each task information may include but are not limited to: miss rate, access bandwidth, access latency, total occupied capacity, probability of being replaced, etc. Accordingly, the control device 30 can be specifically used to: control the resources used by the task information in the first cache device 21 according to the storage parameters of any task information in the first cache device 21, and / or, control the resources used by the task information in the second cache device 22 according to the storage parameters of any task information in the second cache device 22. For example, control one or more of the bandwidth allocation, capacity allocation, replacement algorithm, and / or priority of the task information in the first cache device 21 and / or the second cache device 22.

[0059] Optionally, the interconnection device 23 can be used to: transmit and determine the transmission parameters of each task information in the multiple task information. For example, the transmission parameters of each task information may include but are not limited to: access bandwidth, access delay. Exemplarily, the interconnection device 23 can be used to: transmit part or all of the multiple task information from the first cache device 21 to the second cache device 22 (or called writing back to the second cache device 22), or transmit part or all of the multiple task information from the second cache device 22 to the first cache device 21 (or called backfilling to the first cache device 21). The control device 30 is also used to: adjust the transmission parameters of any task information in the interconnection device 23, that is, control the resources used by the task information in the interconnection device 23, for example, control one or more of the bandwidth allocation and / or priority of the task information in the interconnection device 23.

[0060] Optionally, when the first storage device 20 includes a first cache device 21, a second cache device 22 and / or an interconnection device 23, the multiple resource tags output by the at least one processing core 10 can also be transmitted between the first cache device 21, the interconnection device 23 and the second cache device 22. For example, the multiple resource tags can be transmitted between the first cache device 21, the interconnection device 23 and the second cache device 22 following the write back or backfill of the multiple task information.

[0061] For ease of understanding, the process of the control device 30 controlling the first cache device 21 , the second cache device 22 and the interconnection device 23 is described below through different embodiments.

[0062] In one possible embodiment, as shown in FIG4 , the first storage device 20 includes a first cache device 21 coupled to the first processing core 11. The first cache device 21 includes a first cache 211, a first detector 212, and a first executor 213. The first detector 212 and the first executor 213 are both coupled to the first cache 211.

[0063] The first buffer 211 is configured to cache at least one piece of task information, the at least one piece of task information including the task information corresponding to the resource tag output by the first processing core 11. The first detector 212 is configured to detect the storage parameters of each piece of task information in the at least one piece of task information in the first buffer 211. The first executor 213 is configured to adjust the storage parameters of the first task information in the first buffer 211 based on first control information, i.e., to control the resources used by the first task information in the first buffer 211. The first control information is output by the control device 30 for the first piece of task information, the at least one piece of task information including the first task information.

[0064] When the first processing core 11 is used to run a task and the task includes one or more task instances, the first processing core 11 can be used to output at least one resource tag for the one or more task instances. The at least one resource tag can include some or all of the above-mentioned multiple resource tags, that is, the resource tag output by the first processing core 11 can be some or all of the multiple resource tags output by the at least one processing core 10. The first buffer 211 is specifically used to cache at least one task information corresponding to the at least one resource tag.

[0065] Exemplarily, for any task information among the at least one task information (for example, the first task information), the first detector 212 can be used to detect the storage parameters of the first task information cached in the first buffer 211 and output it to the control device 30; the control device 30 can be used to output the first control information to the first executor 213 based on the storage parameters of the first task information; the first executor 213 can be used to control the resources used by the first task information in the first buffer 211 based on the first control information.

[0066] In another possible embodiment, as shown in FIG4 , the first storage device 20 further includes a second cache device 22 coupled to both the first processing core 11 and the second processing core 12. The second cache device 22 includes a second cache 221, a second detector 222, and a second actuator 223. The second detector 222 and the second actuator 223 are both coupled to the second cache 221.

[0067] Second buffer 221 is configured to cache at least two pieces of task information, including task information corresponding to resource tags output by first processing core 11 and second processing core 12. Second detector 222 is configured to detect storage parameters of each piece of the at least two pieces of task information in second buffer 221. Second executor 223 is configured to control resources used by the second piece of task information in second buffer 221 based on second control information output by control device 30 based on storage parameters of the second piece of task information, including the at least two pieces of task information.

[0068] Among them, when the first processing core 11 and the second processing core 12 are respectively used to run tasks, the first processing core 11 can be used to output at least one resource tag for one or more task instances, and the second processing core 12 can also be used to output at least one resource tag for one or more task instances. For example, the first processing core 11 and the second processing core 12 can output at least two resource tags. The at least two resource tags may include part or all of the above-mentioned multiple resource tags, that is, the resource tags output by the first processing core 11 and the second processing core 12 can be part or all of the multiple resource tags output by the at least one processing core 10. The second buffer 221 is specifically used to cache at least two task information corresponding to the at least two resource tags.

[0069] Exemplarily, for any one of the at least two task information (for example, the second task information), the second detector 222 can be used to detect the storage parameters of the second task information cached in the second buffer 221 and output it to the control device 30; the control device 30 can be used to output second control information to the second executor 223 based on the storage parameters of the second task information; the second executor 223 can be used to control the resources used by the second task information in the second buffer 221 based on the second control information.

[0070] In another possible embodiment, as shown in FIG4 , the first cache device 21 and the second cache device 22 are coupled via an interconnection device 23. The interconnection device 23 includes a bus 231, a third detector 232, and a third actuator 233. Both the third detector 232 and the third actuator 233 are coupled to the bus 231.

[0071] Bus 231 is configured to transmit multiple pieces of task information corresponding to the multiple resource tags, for example, at least two pieces of task information corresponding to at least two resource tags output by first processing core 11 and second processing core 12. Third detector 232 is configured to determine transmission parameters for each piece of task information in the multiple pieces of task information on bus 231. Third executor 233 is configured to control resources occupied by third pieces of task information in bus 231 based on third control information output by control device 30 based on the transmission parameters of the third piece of task information, including the multiple pieces of task information.

[0072] During the execution of a task by any of the at least one processing cores 10, the processing core may obtain task information from the first cache device 21, and the first cache device 21 may obtain task information from the second cache device 22 via the interconnection device 23. At the same time, the first processing core 11 may also store task information in the first cache device 21, and the first cache device 21 may also store task information in the second cache device 22 via the interconnection device 23. The aforementioned acquisition of task information may also be referred to as backfilling task information, and storing task information may also be referred to as writing back task information. FIG. 4 illustrates the example of writing back and backfilling task information including task information corresponding to resource tags T1, T2, T3, and T4, and does not show the first processing core 11 and the second processing core 12.

[0073] That is, task information can be transmitted between the first cache device 21 and the second cache device 22 via the interconnection device 23. For example, the task information of the first processing core 11 can be transmitted between the first cache device 21 and the second cache device 22 coupled to the first processing core 11 via the interconnection device 23, and the task information of the second processing core 12 can be transmitted between the first cache device 21 and the second cache device 22 coupled to the second processing core 12 via the interconnection device 23.

[0074] For example, when multiple task information is transmitted between the first cache device 21 and the second cache device 22 coupled to each processing core in at least one processing core 10 via the bus 231 in the interconnect device 23, the third detector 232 may be configured to detect transmission parameters of each task information in the multiple task information and output the detected parameters to the control device 30. The control device 30 may be configured to output third control information to the third executor 233 based on the transmission parameters of the third task information, where the third task information is any one of the multiple task information. The third executor 233 may be configured to control resources used by the third task information in the bus 231 based on the third control information.

[0075] In an embodiment of the present application, when the first storage device 20 includes a first cache device 21, a second cache device 22 and / or an interconnection device 23, the detectors in the above devices can detect and output the storage parameters or transmission parameters of any task information, and the control device 30 can control the resources used by the task information in the above devices through the storage parameters or transmission parameters of the task information. Therefore, for any device among the first cache device 21, the second cache device 22 or the interconnection device 23, the control device 30 can realize fine-grained resource management for different task scenarios or different stages of the same task to ensure the QoS of the task, improve the rationality of resource scheduling and system energy efficiency, and thereby improve the performance of task processing.

[0076] Furthermore, as shown in FIG3 , the first storage device 20 is coupled to a second storage device 40. The second storage device 40 is configured to store operational information, including task information corresponding to the plurality of resource tags, and determine storage parameters for the task information corresponding to each of the plurality of resource tags. The control device is further configured to control the resources used by the task information in the second storage device 40 based on the storage parameters of the task information corresponding to any of the plurality of resource tags.

[0077] Optionally, the second storage device 40 may be integrated into the task processing device, may not be integrated into the task processing device, or may be partially integrated into the task processing device. This embodiment of the present application does not impose any specific limitations on this. For example, the second storage device 40 may be a memory device, which may include a controller and a memory. The controller may be integrated into the task processing device, and the memory may not be integrated into the task processing device.

[0078] Similarly, the second storage device 40 may also include a detector and an executor; the detector can be used to detect the storage parameters of the task information corresponding to each resource tag stored in the second storage device 40, and the storage parameters may include bandwidth and / or delay, etc.; the control device can be used to output control information according to the storage parameters of any task information; the executor can be used to control the resources used by the task information in the second storage device 40 according to the control information.

[0079] It can be understood that the above-mentioned specific description of the second storage device 40 is similar to the above-mentioned description of the first storage device 20. For details, please refer to the above description, and the embodiments of the present application will not be repeated here.

[0080] Furthermore, the multiple resource tags corresponding to the multiple task instances output by the at least one processing core 10 can be configured by the at least one processing core 10, and can be configured specifically during the process of running each task instance or before running each task instance. The embodiments of the present application do not impose any specific restrictions on this.

[0081] In a possible embodiment, the at least one processing core 10 is further used to: configure a resource tag for each task instance in the multiple task instances, wherein the resource tag of each task instance is implemented by configuring at least one of the following: a thread, a control register, an encoding field of an instruction, a redundant bit field of a virtual address, a redundant bit field of a physical address, and a virtual page attribute. Exemplarily, as shown in FIG5 , any one of the at least one processing core 10 can configure a resource tag for a task instance through a thread, and the specific configuration process may include: S01. Whether to configure a resource tag through a thread, if so, execute S02, if not, output S03; S02. Output a resource tag; S03. Output a default resource tag. The default resource tag may be pre-configured, for example, the default resource tag may be an invalid resource tag, and the control device 30 may not control the resources used by the default resource tag.

[0082] Optionally, the at least one processing core 10 may also be used to configure at least two resource tags for a task instance. When the same task instance corresponds to at least two resource tags, the priorities of the at least two resource tags are different. That is, the at least one processing core 10 may be used to configure at least two resource tags with different priorities for a task instance, and the first storage device 20 and the control device 30 may preferentially process the task information of the task instance based on the resource tag with the higher priority.

[0083] Optionally, taking the method of configuring resource tags to determine the priority of resource tags as an example, the priorities corresponding to the above-mentioned configuration methods can be, in descending order, the following: redundant bit field of virtual address or redundant bit field of physical address, virtual page attribute, encoding field of instruction, control register, and thread. Exemplarily, as shown in Figure 6, the specific process of configuring the resource tag for the task instance by any processing core of the at least one processing core 10 may include: S11. Whether the resource tag is configured through the redundant bit field of the virtual address or the redundant bit field of the physical address, if so, execute S12, otherwise output S13; S12. Output the resource tag; S13. Whether the resource tag is configured through the virtual page attribute, if so, execute S12, otherwise execute S14; S14. Whether the resource tag is configured through the encoding field of the instruction, if so, execute S12, otherwise execute S15; S15. Whether the resource tag is configured through the control register, if so, execute S12, otherwise execute S16; S16. Whether the resource tag is configured through the control register, if so, execute S12, otherwise execute S17; S17. Whether the resource tag is configured through the thread, if so, execute S12, otherwise execute S18; S18. Output the default resource tag. The default resource tag may be pre-configured. For example, the default resource tag may be an invalid resource tag, and the control device 30 may not control the resources used by the default resource tag.

[0084] It can be understood that the order of priorities corresponding to the several configuration methods described above is only exemplary. In actual applications, it may also be other different priority orders, or only include some configuration methods and priorities. The embodiments of the present application do not impose specific restrictions on this.

[0085] Furthermore, for any of the multiple task information, when controlling the resources used by the task information, the control device 30 may not only consider the storage parameters or transmission parameters of the task information, but may also combine the control strategy and / or resource configuration parameters corresponding to the task information to perform control. The control strategy may also be referred to as a control algorithm, and the resource configuration parameters may also be referred to as a resource budget. Optionally, the control device 30 may specifically be configured to control the resources used by the task information in the first storage device 20 based on the storage parameters of the task information in the first storage device 20 and the resource configuration parameters corresponding to the task information.

[0086] The control strategies and / or resource configuration parameters corresponding to each of the above-mentioned task information (or the control strategies and / or resource configuration parameters corresponding to different resource tags) can be pre-configured, and the control strategies and / or resource configuration parameters corresponding to different task information can be the same or different, and can be specifically configured according to actual needs. The embodiments of the present application do not impose specific restrictions on this.

[0087] For example, as shown in FIG7 , taking the first cache device 21 in the first storage device 20, the task information is the task information corresponding to the resource tag T1, and the storage parameters of the task information include bandwidth as an example, the specific process of controlling the resources used by the task information in the first cache device 21 may include: S21. Configuring the bandwidth proportion of the task information corresponding to T1 in the first cache 211 to be 30%; S22. The first detector 212 detects the bandwidth of the task information corresponding to T1 in the first cache 211 and outputs it to the control device 30; S23. The control device 30 determines whether the bandwidth proportion of the task information corresponding to T1 is greater than 3 5%, if so, execute S24, if otherwise, execute S25; S24. The control device 30 outputs control information, and the first executor 213 limits (or reduces) the bandwidth of the task information corresponding to T1 in the first buffer 211 according to the control information, and returns to S22; S25. The control device 30 determines whether the bandwidth proportion of the task information corresponding to T1 is less than 25%, if so, execute S26, if otherwise, return to S22; S26. The control device 30 outputs control information, and the first executor 213 increases (or increases) the bandwidth of the task information corresponding to T1 in the first buffer 211 according to the control information, and returns to S22.

[0088] In an embodiment of the present application, the control device 30 can reduce or increase the resources used by the task information in the first storage device 20 according to the storage parameters of the task information corresponding to any resource tag detected by the detector in the first storage device 20, so as to maintain the storage parameters of the task information within a certain range, thereby realizing closed-loop control of the resources used by the task information. That is, the control device 30 can realize closed-loop control of the resources used by the task information corresponding to each resource tag according to the granularity of the resource tag. In this way, when different resource tags correspond to different task scenarios or task instances at different stages of the same task, fine-grained resource management and control can be provided for different task scenarios or different stages of the same task to ensure the QoS of the task, improve the rationality of resource scheduling and system energy efficiency, and thereby improve the performance of task processing.

[0089] Based on this, an embodiment of the present application also provides a task processing method, which can be applied to the task processing device provided above. For the description of the task processing device, please refer to the above explanation. The method includes: the at least one processing core outputs multiple resource tags corresponding to multiple task instances, each resource tag corresponds to at least one task instance, and the multiple task instances include one or more subtasks of the task; the first storage device caches multiple task information corresponding to the multiple resource tags, and determines the storage parameters of each task information in the multiple task information; the control device outputs control information based on the storage parameters of any task information in the multiple task information, and the control information is used to control the resources used by the task information in the first storage device.

[0090] Optionally, the at least one processing core outputs multiple resource tags corresponding to multiple task instances, including: the at least one processing core outputs multiple load and store instructions carrying the multiple resource tags; the first storage device caches multiple task information corresponding to the multiple resource tags, including: the multiple load and store instructions are used by the first storage device to transmit and cache the multiple task information corresponding to the multiple resource tags.

[0091] In one possible embodiment, a first storage device caches multiple pieces of task information corresponding to the multiple resource tags and determines storage parameters for each piece of task information in the multiple pieces of task information, including: a first cache caches at least one piece of task information, the at least one piece of task information including task information corresponding to a resource tag output by a first processing core; and a first detector detects storage parameters for each piece of task information in the first cache. Furthermore, the method further includes: a first executor controlling resources used by the first piece of task information in the first cache based on first control information, the first control information being output by the control device based on the storage parameters of the first piece of task information, the at least one piece of task information including the first piece of task information.

[0092] In another possible embodiment, a first storage device caches multiple pieces of task information corresponding to the multiple resource tags and determines storage parameters for each piece of task information within the multiple pieces of task information. The method also includes: a second cache caches at least two pieces of task information, the at least two pieces of task information including task information corresponding to resource tags output by the first processing core and the second processing core; and a second detector detects storage parameters for each piece of task information within the second cache. Furthermore, the method also includes: a second executor controls the resources used by the second piece of task information within the second cache based on second control information, the second control information being output by the control device based on the storage parameters of the second piece of task information, the at least two pieces of task information including the second piece of task information.

[0093] In another possible embodiment, the method further includes: the interconnected device transmits the at least two task information and determines the transmission parameters of each task information in the at least two task information; the control device outputs third control information based on the transmission parameters of the third task information in the at least two task information, and the third control information is used to control the resources used by the third task information in the interconnected device, and the at least two task information also include the third task information.

[0094] Optionally, the interconnection device transmits the at least two pieces of task information and determines transmission parameters for each piece of the at least two pieces of task information, including: transmitting the at least two pieces of task information via the bus; and determining the transmission parameters for each piece of the at least two pieces of task information via the bus by a third detector. Furthermore, the method further includes: controlling resources used by the third piece of task information on the bus based on third control information by a third executor.

[0095] In another possible embodiment, the method further includes: a second storage device stores operation information, the operation information including task information corresponding to the multiple resource tags; the second storage device determines the storage parameters of the task information corresponding to each resource tag in the multiple resource tags; and the control device controls the resources used by the task information in the second storage device according to the storage parameters of the task information corresponding to any resource tag in the multiple resource tags.

[0096] Furthermore, the method further includes: the at least one processing core configuring a resource tag for each of the multiple task instances, wherein the resource tag for each task instance is implemented by configuring at least one of the following: a thread, a control register, an instruction encoding field, a redundant bit field of a virtual address, a redundant bit field of a physical address, or a virtual page attribute. Optionally, when the same task instance corresponds to at least two resource tags, the at least two resource tags have different priorities.

[0097] For example, when configuring resource tags by thread, this can be achieved by configuring the thread context control register via a load storage unit (LSU) in the processing core. The resource tags are assigned to the thread context control register, mapping the thread to the corresponding resource tag. The thread context control register is switched when the operating system performs a thread context switch.

[0098] For example, when configuring resource tags via a control register, this can be accomplished by configuring the LSU control register in the processing core. During the execution of a single thread, the control register can be dynamically configured to switch resource groups, thereby implementing different resource management strategies at different stages of program execution.

[0099] For example, when configuring resource tags via the instruction encoding field, the encoder in the processing core can encode the resource tags into the immediate field of load and store instructions. The decoder in the processing core can extract the resource tags from the immediate field and pass them to the LSU in the processing core. Different resource tags can be configured for different instructions (i.e., different resource groups can be configured), and different resource tags can also be configured for different instructions within a code segment (i.e., multiple resource groups can be mixed).

[0100] Exemplarily, when the resource tag is configured through the virtual page attribute, the resource tag can be configured in the virtual page attribute through software, and the virtual page attribute corresponds one-to-one to the virtual page; wherein the virtual storage unit in the processing core can extract the resource tag in the virtual page attribute and pass it to the LSU in the processing core.

[0101] For example, when configuring resource tags via a redundant bit field of a virtual address or a redundant bit field of a physical address, the resource tags can be configured in the redundant bit field of the virtual address or physical address via software, assigning access resource groups to a certain segment of virtual addresses or physical addresses, enabling access to different data and employing different management policies. The resource tags are encoded in the redundant bit field of the virtual address or physical address, corresponding one-to-one to the virtual address or physical address. The LSU in the processing core can extract the resource tags from the redundant bit field of the virtual address or physical address.

[0102] In an embodiment of the present application, the task processing device can control the resources used by the task information corresponding to each resource tag according to the granularity of the resource tag. In this way, when different resource tags correspond to different task scenarios or task instances at different stages of the same task, fine-grained resource management can be provided for different task scenarios or different stages of the same task to ensure the QoS of the task, improve the rationality of resource scheduling and system energy efficiency, and thereby improve the performance of task processing.

[0103] In another aspect of the present application, an electronic device is also provided, as shown in Figure 8, which includes a memory and a task processing device. The task processing device can be the task processing device provided above, the memory is used to store computer instructions, and the task processing device is used to execute the computer instructions so that the electronic device can implement any one of the task processing methods provided above.

[0104] It can be understood that all relevant contents involved in the above-mentioned device embodiment can be referred to the embodiment of the task processing method and the embodiment of the electronic device, and the embodiments of the present application will not be repeated here.

[0105] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules or units is merely a logical functional division. In actual implementation, other division methods may be used, such as combining or integrating multiple units or components into another device, or ignoring or not implementing certain features.

[0106] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0107] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. The readable storage medium may include: a USB flash drive, a mobile hard drive, a read-only memory, a random access memory, a magnetic disk, or an optical disk, etc., which can store program code. Based on this understanding, the technical solution of the embodiment of the present application, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product.

[0108] In another embodiment of the present application, a readable storage medium is also provided, which stores computer execution instructions. When a device (which may be a single-chip microcomputer, chip, etc.) or a processor executes the steps in the above method embodiment.

[0109] In another embodiment of the present application, a computer program product is provided, which includes computer instructions stored in a readable storage medium; at least one processor of the device can read the computer instructions from the readable storage medium, and at least one processor executes the computer instructions so that the device performs the steps in the above method embodiment.

[0110] Finally, it should be noted that the above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A task processing device, characterized in that: The task processing device includes: at least one processing core, configured to output a plurality of resource tags corresponding to the plurality of task instances, each resource tag being configured to identify at least one task instance using the same resource; A first storage device is configured to cache a plurality of task information corresponding to the plurality of resource tags, and determine a storage parameter for each task information in the plurality of task information, wherein the task information corresponding to each resource tag includes information of the at least one task instance identified by the resource tag; A control device is used to output control information of any task information among the multiple task information, wherein the control information is used to adjust the storage parameters of the task information; wherein the storage parameters include at least one of the following: miss rate, access bandwidth, access delay, total occupied capacity, and probability of being replaced.

2. The task processing device according to claim 1, characterized in that: The at least one processing core is further configured to output a plurality of load and store instructions carrying the plurality of resource tags; The first storage device is configured to transmit and cache a plurality of task information corresponding to the plurality of resource tags according to the plurality of load and store instructions.

3. The task processing device according to claim 1 or 2, characterized in that: The at least one processing core includes a first processing core, the first storage device includes a first cache device coupled to the first processing core, and the first cache device includes: a first buffer, configured to cache at least one task information, wherein the at least one task information includes task information corresponding to the resource tag output by the first processing core; a first detector, configured to detect a storage parameter of each task information in the at least one task information in the first buffer; The first executor is configured to adjust storage parameters of first task information in the first buffer according to first control information, wherein the first control information is output by the control device for the first task information, and the at least one task information includes the first task information.

4. The task processing device according to claim 3, characterized in that: The at least one processing core further includes a second processing core, the first storage device further includes a second cache device coupled to both the first processing core and the second processing core, the second cache device including: a second buffer, configured to cache at least two pieces of task information, wherein the at least two pieces of task information include task information corresponding to resource tags output by the first processing core and the second processing core; a second detector, configured to detect a storage parameter of each of the at least two pieces of task information in the second buffer; The second executor is used to adjust the storage parameters of the second task information in the second buffer according to the second control information, the second control information is output by the control device for the second task information, and the at least two task information include the second task information.

5. The task processing device according to claim 4, characterized in that: The first cache device and the second cache device are coupled via an interconnection device; The interconnection device is used to transmit the at least two pieces of task information and determine a transmission parameter for each piece of task information in the at least two pieces of task information; The control device is further used to output third control information of the third task information in the at least two task information, and the third control information is used to control the transmission parameters of the third task information in the interconnected device. The at least two task information also include the third task information, and the transmission parameters include at least one of the following: access bandwidth and access delay.

6. The task processing device according to claim 5, characterized in that: The interconnection device includes: A bus, configured to transmit the at least two task information; a third detector, configured to determine a transmission parameter of each of the at least two pieces of task information in the bus; The third executor is configured to adjust transmission parameters of the third task information in the bus according to the third control information.

7. The task processing device according to any one of claims 1 to 6, characterized in that: The first storage device is configured to be coupled to the second storage device; The second storage device is used to: store operation information, wherein the operation information includes task information corresponding to the multiple resource tags; Determining storage parameters of task information corresponding to each resource tag in the plurality of resource tags; The control device is further configured to adjust storage parameters of the task information corresponding to any resource tag among the multiple resource tags in the second storage device.

8. The task processing device according to any one of claims 1 to 7, characterized in that: The at least one processing core is further used to configure a resource tag for each task instance in the multiple task instances, wherein the resource tag of each task instance is implemented by configuring at least one of the following: a thread, a control register, an encoding field of an instruction, a redundant bit field of a virtual address, a redundant bit field of a physical address, and a virtual page attribute.

9. The task processing device according to claim 8, characterized in that: When the same task instance corresponds to at least two resource tags, the priorities of the at least two resource tags are different.

10. A task processing method, characterized in that: Applied to a task processing device including at least one processing core, a first storage device, and a control device, the method includes: The at least one processing core outputs a plurality of resource tags corresponding to the plurality of task instances, each resource tag being used to identify at least one task instance using the same resource; The first storage device caches a plurality of task information corresponding to the plurality of resource tags, and determines a storage parameter for each task information in the plurality of task information, wherein the task information corresponding to each resource tag includes information of the at least one task instance identified by the resource tag; The control device outputs control information of any task information among the multiple task information, and the control information is used to adjust the storage parameters of the task information in the first storage device; wherein the storage parameters include at least one of the following: miss rate, access bandwidth, access delay, total occupied capacity, and probability of being replaced.

11. The method according to claim 10, characterized in that The at least one processing core outputting a plurality of resource tags corresponding to a plurality of task instances comprises: the at least one processing core outputting a plurality of load and store instructions carrying the plurality of resource tags; The first storage device caches the multiple task information corresponding to the multiple resource tags, including: the multiple load and store instructions are used by the first storage device to transmit and cache the multiple task information corresponding to the multiple resource tags.

12. The method according to claim 10 or 11, characterized in that The at least one processing core includes a first processing core, the first storage device includes a first cache device coupled to the first processing core, the first cache device includes a first buffer, a first detector, and a first actuator; The first storage device caches the plurality of task information corresponding to the plurality of resource tags and determines a storage parameter of each task information in the plurality of task information, including: The first buffer caches at least one task information, wherein the at least one task information includes task information corresponding to the resource tag output by the first processing core; The first detector detects a storage parameter of each task information in the at least one task information in the first buffer; The method also includes: the first executor adjusts storage parameters of first task information in the first buffer according to first control information, the first control information is output by the control device for the first task information, and the at least one task information includes the first task information.

13. The method according to claim 12, characterized in that The at least one processing core further includes a second processing core, the first storage device further includes a second cache device coupled to both the first processing core and the second processing core, the second cache device including a second cache, a second detector, and a second executor; the first storage device caches multiple task information corresponding to the multiple resource tags and determines a storage parameter for each task information in the multiple task information, further comprising: The second buffer caches at least two pieces of task information, wherein the at least two pieces of task information include task information corresponding to resource tags output by the first processing core and the second processing core; The second detector detects storage parameters of each task information of the at least two task information in the second buffer; The method also includes: the second executor adjusting storage parameters of second task information in the second buffer according to second control information, the second control information is output by the control device for the second task information, and the at least two task information include the second task information.

14. The method according to claim 13, characterized in that The first cache device and the second cache device are coupled via an interconnection device; the method further includes: The interconnection device transmits the at least two pieces of task information and determines a transmission parameter of each piece of task information in the at least two pieces of task information; The control device outputs third control information of the third task information among the at least two task information, and the third control information is used to control the transmission parameters of the third task information in the interconnected device. The at least two task information also include the third task information, and the transmission parameters include at least one of the following: access bandwidth and access delay.

15. The method according to claim 14, characterized in that The interconnection device includes a bus, a third detector, and a third actuator. The interconnection device transmits the at least two pieces of task information and determines a transmission parameter of each piece of task information in the at least two pieces of task information, including: The bus transmits the at least two task information; The third detector determines a transmission parameter of each task information of the at least two task information in the bus; The method further includes: controlling, by the third executor, resources used by the third task information in the bus according to the third control information.

16. The method according to any one of claims 10 to 15, characterized in that: The first storage device is configured to be coupled to the second storage device; and the method further comprises: The second storage device stores operation information, wherein the operation information includes task information corresponding to the multiple resource tags; The second storage device determines a storage parameter of the task information corresponding to each resource tag in the plurality of resource tags; The control device adjusts storage parameters of task information corresponding to any resource tag among the multiple resource tags in the second storage device.

17. The method according to any one of claims 10 to 16, characterized in that: The method further comprises: The at least one processing core configures a resource tag for each task instance in the multiple task instances, wherein the resource tag of each task instance is implemented by configuring at least one of the following: a thread, a control register, an encoding field of an instruction, a redundant bit field of a virtual address, a redundant bit field of a physical address, and a virtual page attribute.

18. The method according to claim 17, characterized in that When the same task instance corresponds to at least two resource tags, the priorities of the at least two resource tags are different.

19. An electronic device, characterized in that: The electronic device includes a memory and a task processing device, the memory is used to store computer instructions, and the task processing device is used to execute the computer instructions, so that the electronic device implements the task processing method according to any one of claims 10 to 18.

20. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on a device, the device is caused to execute the task processing method according to any one of claims 10 to 18.

21. A computer program product, characterized in that The computer program product includes computer instructions, and when the computer instructions are executed on a device, the device is caused to execute the task processing method according to any one of claims 10 to 18.

Citation Information

Patent Citations

  • Task processing device, task processing method and equipment

    CN120523561A

  • Resource scheduling method and device, electronic equipment and storage medium

    CN112346859A

  • Resource allocation method, electronic equipment and computer readable storage medium

    CN114625537A

  • Container scheduling method and system, computer equipment and storage medium

    CN115576669A

  • Control device, control method and related equipment

    CN117170957A