CN114610578A - Resource state management method and device, electronic equipment and storage medium - Google Patents

Resource state management method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114610578A
CN114610578A CN202210263326.8A CN202210263326A CN114610578A CN 114610578 A CN114610578 A CN 114610578A CN 202210263326 A CN202210263326 A CN 202210263326A CN 114610578 A CN114610578 A CN 114610578A
Authority
CN
China
Prior art keywords
resource
state
resources
pipeline
dormant
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210263326.8A
Other languages
Chinese (zh)
Other versions
CN114610578B (en
Inventor
窦强
赵天磊
张承义
高军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Phytium Technology Co Ltd
Original Assignee
Phytium Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Phytium Technology Co Ltd filed Critical Phytium Technology Co Ltd
Priority to CN202210263326.8A priority Critical patent/CN114610578B/en
Publication of CN114610578A publication Critical patent/CN114610578A/en
Application granted granted Critical
Publication of CN114610578B publication Critical patent/CN114610578B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Abstract

The application discloses a resource state management method and device, electronic equipment and a storage medium. The method is applied to a resource management unit in electronic equipment with at least one processor core, the resource management unit allocates resources of the electronic equipment to the processor core running a pipeline based on the resource requirement of the pipeline, and the state of the resources is controlled by monitoring the calling condition of the resources in a first time interval. For example, in the case where a resource is not called, the resource is controlled to switch from the awake state to the sleep state; and when the awakening condition is met, controlling the resource to be switched from the dormant state to the awakening state. Therefore, on one hand, resources of the electronic equipment can be managed and distributed in a centralized manner based on the production line, and the utilization rate of the resources is improved; on the other hand, on the premise of meeting the execution requirement of the assembly line, the rest idle resources enter a dormant state, and the resources in the dormant state are controlled to run in a low-energy-consumption mode, so that the energy consumption generated by the idle resources is greatly reduced.

Description

Resource state management method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer resource management, and in particular, to a resource status management method and apparatus, an electronic device, and a storage medium.
Background
To further improve the performance and computing power, most electronic devices (e.g., electronic computers) employ at least one processor core, and resources within the electronic device are allocated at the granularity of the processor core. When the load of each processor core is uneven, some processor cores may not obtain enough resources to cause blocking; while the resources of other processor cores are idle, resulting in waste.
In addition, energy consumption is usually generated when resources of the electronic device are idle, and once a large amount of resources are idle for a long time, the resource utilization rate is reduced and energy consumption is wasted.
Disclosure of Invention
The applicant creatively provides a resource state management method, a resource state management device, an electronic device and a storage medium.
According to a first aspect of embodiments of the present application, there is provided a resource state management method applied to a resource management unit of an electronic device, where the resource management unit allocates resources of the electronic device to a processor core executing a pipeline based on resource requirements of the pipeline, the method including: monitoring the resource calling condition of the electronic equipment in a first time interval; and controlling the state of the resource based on the resource calling condition, wherein the state of the resource comprises a dormant state or a wakeup state.
According to an embodiment of the present application, allocating resources of an electronic device to a processor core of an execution pipeline includes: resources of a wake state of the electronic device are allocated to a processor core of the execution pipeline.
According to an embodiment of the present application, controlling the state of a resource based on a call condition includes: if the resource is not called in the first time interval, controlling the state of the resource to be switched from the awakening state to the sleeping state; in response to the wake condition being satisfied, the state of the control resource is switched from a sleep state to a wake state.
According to an embodiment of the present application, the wake-up condition includes that the size of the resource in the wake-up state is smaller than the size of the resource required by the pipeline; accordingly, before the state of the control resource is switched from the sleep state to the awake state, the method further comprises: the size of the resources needed by the pipeline and the size of the resources in the wake state are determined.
According to an embodiment of the present application, the wake-up condition includes that a duration of a sleep state of the resource reaches a set duration threshold; accordingly, after the state of the control resource is switched from the awake state to the sleep state, the method further comprises: and starting a dormancy timer, wherein the dormancy timer is used for triggering the resource management unit to control the state of the resource to be switched from the dormant state to the awakening state after the set duration threshold.
According to an embodiment of the application, the wake-up condition includes detecting a failed resource, where the failed resource is a resource that is used due to the resource failure; accordingly, before the state of the control resource is switched from the sleep state to the awake state, the method further comprises: performing health detection on resources of the electronic equipment to determine fault resources; accordingly, after the state of the control resource is switched from the sleep state to the awake state, the method further comprises: and replacing the fault resource by using the resource switched into the wake-up state.
According to an embodiment of the present application, the method further comprises: establishing a dormant resource pool; adding resources in a dormant state into the dormant resource pool, and/or moving the resources out of the dormant resource pool after the state of controlling the resources is switched from the dormant state to a wake-up state.
According to a second aspect of the embodiments of the present application, there is provided a resource status management apparatus applied to a resource management unit of an electronic device, where the resource management unit allocates resources of the electronic device to a processor core executing a pipeline based on resource requirements of the pipeline, the apparatus including: the resource calling condition monitoring module is used for monitoring the calling condition of the resource in a first time interval; and the resource state control module is used for controlling the state of the resource based on the resource calling condition, wherein the state of the resource comprises a dormant state or a wakeup state.
According to a third aspect of embodiments of the present application, there is provided an electronic device, including: a resource management unit and at least one processor core; the resource management unit is used for executing any resource state management method.
According to a fourth aspect of embodiments herein, there is provided a computer storage medium comprising a set of computer-executable instructions which, when executed, are operable to perform the above-described resource state management method.
The embodiment of the application provides a resource state management method, a resource state management device, electronic equipment and a storage medium, wherein the method is applied to a resource management unit in the electronic equipment with at least one processor core, the resource management unit allocates resources of the electronic equipment to the processor core running a pipeline based on the resource requirement of the pipeline, and the state of the resources is controlled by monitoring the calling condition of the resources in a first time interval. For example, in the case where a resource is not called, the resource is controlled to switch from the awake state to the sleep state; and when the awakening condition is met, controlling the resource to be switched from the dormant state to the awakening state. Therefore, on one hand, resources of the electronic equipment can be managed and distributed in a centralized manner based on the production line, and the utilization rate of the resources is improved; on the other hand, on the premise of meeting the execution requirement of the assembly line, the rest idle resources enter a dormant state, and the resources in the dormant state are controlled to run in a low-energy-consumption mode, so that the energy consumption generated by the idle resources is greatly reduced.
It is to be understood that the implementation of the present application does not require all of the above-described advantages to be achieved, but rather that certain technical solutions may achieve certain technical effects, and that other embodiments of the present application may also achieve other advantages not mentioned above.
Drawings
The above and other objects, features and advantages of exemplary embodiments of the present application will become readily apparent from the following detailed description read in conjunction with the accompanying drawings. Several embodiments of the present application are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
in the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
FIG. 1 is a flow diagram of a pipeline upon which resources are allocated according to an embodiment of the present application;
fig. 2 is a schematic flowchart illustrating a method for implementing resource status management according to an embodiment of the present application;
fig. 3 is a schematic flowchart illustrating a process of controlling a resource state to be switched from a sleep state to an awake state according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating a process for controlling a resource state to switch from a sleep state to an awake state according to another embodiment of the present application;
FIG. 5 is a flowchart illustrating management of resources in a dormant state by a dormant resource pool according to another embodiment of the present application;
FIG. 6 is a schematic diagram illustrating a structure of a resource status management apparatus according to an embodiment of the present application;
fig. 7 is a schematic view of a composition structure of an electronic device to which the resource status management method according to the embodiment of the present application is applied.
Detailed Description
In order to make the objects, features and advantages of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the description of the present specification, reference to the description of "one embodiment," "some embodiments," "an example," "a specific example," or "some examples" or the like means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
Before further detailed description of the embodiments of the present application, terms and expressions referred to in the embodiments of the present application will be described, and the terms and expressions referred to in the embodiments of the present application will be used for the following explanation.
A processor core: is the most core part inside the processor and can also be called as the processor core.
A processor: including one or more processor cores, and other components or devices such as memory.
Assembly line: the method is an implementation technology for executing a plurality of instructions in an overlapping way, each step in a pipeline finishes one part of the instructions, each step is called as a pipeline stage or a pipeline section, and the pipeline stages are connected in front and back to form the pipeline; instructions enter at one end of the pipeline and exit at the other end of the pipeline through the pipeline stages; each pipeline corresponds to a pipeline.
For the processing flow of an instruction in a pipeline, as shown in fig. 1, the life cycle of an instruction in a pipeline includes: fetching, decoding, executing, accessing and writing back. The instruction fetch refers to a process of reading an instruction from a memory. Instruction decoding refers to a process of translating an instruction fetched from a memory, and an operand Register index required by the instruction is obtained after decoding, and the operand can be read from a general Register File (Register File) by using the operand Register index. The type of computation to be performed after Instruction decode is known and the required operands have been read from the general purpose register set, then Instruction execution (Instruction execution) follows. Instruction execution refers to the flow of the actual operation on an instruction. For example, if the instruction is an add operation instruction, the operand is added; if the instruction is a subtraction operation, the operand is subtracted. The most common component in the "execute" stage is the ALU, which is a hardware functional unit that implements specific operations. The memory access refers to a flow of reading data from a memory or writing data into the memory by a memory access instruction. Write-back refers to a process of writing back the result of instruction execution to the general register set, if it is a normal operation instruction, the result value comes from the result of the "execution" stage calculation; in the case of a memory read command, the result is data read from memory during the "access" phase.
An electronic device refers to an electronic device having a processor and employing at least one processor core in the processor.
A resource of an electronic device refers to a resource that may be allocated to a processor core for use in various pipeline stages of an execution pipeline. For example: the resources allocated to the processor core can be branch prediction resources, fetch resources, decoding resources, renaming resources, execution resources and the like; the execution resources may include at least one or more of arithmetic resources, register resources, and memory resources. The memory resources may include buffers and memory, and the buffers may include at least one or more of an L1 buffer, an L2 buffer, and an L3 buffer. The memory may be any type of memory such as a flash memory. The transcoding resources may include at least one transcoder. The renaming resource may include at least one register.
The resource management unit refers to a unit provided in the electronic device for collectively managing resources of the electronic device. In the embodiment of the application, the resource management unit abandons an allocation strategy that fixed resources are allocated to each processor core and the resources of the processor cores are isolated from each other and cannot be shared, but performs unified management on the resources of the electronic equipment, and allocates the resources of the electronic equipment to the processor cores executing the pipeline based on the resource requirement of the pipeline. Therefore, the processor core with large load can obtain more resources, and the processor core with small load can obtain less resources, so that the distribution of the resources among the processor cores is more reasonable and balanced, the utilization rate of the resources is greatly improved, and the problems of resource distribution and asymmetric load of the processing cores are avoided.
Moreover, the resource management unit is used for uniformly managing the resources of the electronic equipment, and all idle resources can be centralized and used for being distributed to the processor cores of the execution pipelines. Therefore, the requirements of complex pipelines or high-strength pipelines with larger resource demand on resources are easier to meet, and the processing capacity and the computing performance of the electronic equipment can be further improved.
In addition, the resource management unit can uniformly manage the resources of the electronic equipment, and can further divide the allocable resources in the electronic equipment into resources in an awakening state and resources in a dormant state, and enable the resources in the dormant state to operate in a low-energy-consumption mode, so that the energy consumption of the whole plurality of electronic equipment is reduced.
The above advantages are particularly emphasized when the electronic device is a multi-core electronic device having at least two processor cores.
Based on the above inventive concept, an embodiment of the present application provides a resource state management method, where the method is applied to a resource management unit of the electronic device, and fig. 2 shows a main flow of implementing the resource state management method according to an embodiment of the present application, and as shown in fig. 2, the method includes:
operation S210, monitoring a resource calling condition of the electronic device in a first time interval;
wherein the first time interval is preset, for example, 1 minute, 5 minutes, 10 minutes, etc. Theoretically, too short a first time interval may cause the state of the resource to be frequently switched between the awake state and the sleep state, and increase the monitoring cost; the first time interval is too long, and the resource can enter the dormant state after being idle for a long time, so that the energy consumption can not be repeatedly saved.
Therefore, a better first time interval can be determined according to a plurality of experimental effects or model calculations.
The resource calling condition refers to whether the resource of the electronic equipment is called in a first time interval.
The resource management unit can monitor the resource calling condition of the electronic equipment in the first time interval in various ways.
For example, at the beginning time of the first time interval, a blank resource call table is created or the original resource call table is emptied; in the process of allocating resources to the processor cores of the execution pipeline, recording the allocated resources in the resource call table; and when the first time interval is over, checking the resource call table, wherein the resource recorded in the resource call table is called resource, and the resource not recorded is non-called resource.
Or, in the original resource management item, setting a flag bit for each resource item, and resetting the flag bit to a value representing 'no call' at the beginning of the first time interval; when the resource is called, the flag bit is set to a value representing 'called'; when the first time interval is over, the flag bit of each resource item is checked, so that whether the resource is called or not can be obtained.
In the implementation of the present application, each resource does not only refer to a single resource in the meaning, but also refers to the smallest resource unit available for allocation according to the resource allocation policy. These minimum resource units available for allocation may comprise a single resource or may comprise multiple resources.
For example, the resource management unit divides the branch prediction resources into one or more branch prediction sub-resource pools based on the resource allocation policy, each of the branch prediction sub-resource pools including resources of the same or different sizes. Each branch predictor resource pool is an allocable resource unit.
In operation S220, the state of the resource is controlled based on the resource calling condition, where the state of the resource includes a sleep state or a wake state.
Typically, the default state of a resource of an electronic device is an awake state. If the resource is called in the first time interval, keeping the resource in the wake-up state; and if the resource is not called, controlling the state of the resource to be switched from the awakening state to the sleeping state.
When the state of the resource is switched to the dormant state, the resource can be controlled to run in a low-energy-consumption mode, so that the energy consumption of the whole electronic equipment is further saved.
Some resources that lose some performance or functionality when operating in a low power consumption mode may affect the performance of a processor core if allocated to the processor core for an execution pipeline.
For this reason, in most embodiments of the present application, only the resources in the wake state are allocated to the processor core executing the pipeline; while resources in the sleep state are not used for the execution pipeline.
Therefore, the processing range of resource allocation can be further reduced, the calculation load of the resource management unit is reduced, and the management efficiency of the resources is improved.
After the state of the resource is switched to the dormant state, the resource in the dormant state can be awakened when the awakening condition is met, the state of the resource is controlled to be switched from the dormant state to the awakening state, and the performance core function is recovered.
In an embodiment of the present application, the wake-up condition includes a flow of waking up a resource in a sleep state, as shown in fig. 3, where the size of the resource in the wake-up state is smaller than that of the resource required by the pipeline;
operation S310, determining a size of a resource required by the pipeline and a size of a resource in an awake state;
the size of the resource required by the pipeline can be determined by estimating the size of the resource through the data amount processed by the pipeline, the operation type, the execution period and the like.
When the pipeline needs multiple resources, the size of each resource needed by the pipeline and the size of the resource in each resource for the allocated wake state need to be determined.
The resource size of each wake-up state can be determined by counting the resource size of each resource for which the allocated state is the wake-up state.
For example, the resource management unit creates a resource pool for each resource, respectively, for storing the resources available for the allocated wake state. The instruction-fetching resource pool is used for storing instruction-fetching resources in an awakening state which can be used for distribution; the decoding resource pool is used for storing decoding resources of the wake-up state which can be used for allocation; the operation resource pool is used for storing operation resources of the wake-up state which can be used for distribution; the storage resource pool is used for storing storage resources of the wake state which can be used for allocation and the like.
Assuming that the current assembly line needs the fetch resource, the decode resource, the operation resource and the storage resource, the size of the resource in the fetch resource pool, the size of the resource in the decode resource pool, the size of the resource in the operation resource and the size of the resource in the storage resource are respectively counted to determine the size of the resource in each resource, which can be allocated and is in the wake-up state.
Operation S320, determining whether the size of the resource needed by the pipeline is smaller than the size of the resource in the wake-up state, if not, continuing to operate S330, and if so, continuing to operate S340;
when the pipeline needs a plurality of resources, it needs to be determined that the size of each resource needed is smaller than the size of the resource of the awake state available for allocation in each resource.
Operation S330, acquiring resources in a sleep state, and controlling the state of the resources in the sleep state to be switched from the sleep state to an awake state;
optionally, resources in all dormant states may be acquired; dormant resources of a desired size may also be acquired.
In operation S340, according to the size of the resource needed by the pipeline, the corresponding wake-up resource is obtained, and the obtained wake-up resource is allocated to the processor core that executes the pipeline.
In the embodiment of the present application shown in fig. 3, the resources in the sleep state are awakened only when the resources in the awake state are not enough. In this way, the idle resources can be in the dormant state for as long as possible, thereby reducing the energy consumption of the electronic device to the greatest extent possible.
In another embodiment of the present application, the wake-up condition includes that a duration of a sleep state of the resource reaches a set duration threshold; accordingly, after the state of the control resource is switched from the awake state to the sleep state, the method further comprises: and starting a dormancy timer, wherein the dormancy timer is used for triggering the resource management unit to control the state of the resource to be switched from the dormant state to the awakening state after the set duration threshold.
The set time length threshold can be flexibly determined according to implementation requirements or implementation effects.
Through the set time length threshold, the judgment of the awakening condition can be simplified, and the resource size of the existing awakening state is not required to be known; moreover, through the set time length threshold, the resources can be in the core awakening state in the dormant state in turn, the use frequency of each resource is balanced, and the service life shortening caused by overload work due to the fact that individual resources are always in the awakening state is avoided.
In order to save the start of the dormancy timer, the resources that are not called in the first time interval may be used as a batch of resources, and the same batch of resources share one dormancy timer.
In another embodiment of the present application, the waking condition includes detecting a failed resource, where the failed resource is a resource that is used due to a failure of the resource, and as shown in fig. 4, the process of waking up the resource in the dormant state includes:
operation S410, acquiring a resource from the resources of the electronic device;
the acquired resource may be a resource that is already used or may be an allocatable wake-up state resource.
Operation S420, performing health detection on the resource;
operation S430, determining whether the resource is a fault resource, if yes, continuing to step S440, otherwise, returning to operation S410 to obtain a next resource;
operation S440, acquiring a resource in a dormant state;
operation S450, controlling the state of the resource to be switched from the sleep state to the wake state;
operation S460 replaces the failed resource with the awakened resource.
For example, a table or configuration entry referencing the failed resource is scanned and the awakened resource is used in place of the failed resource.
When a processor core calls a failing resource, it may cause the processor core to fail or cause the processor to relinquish the current resource to acquire the next available resource. This may result in a lack of resources and may result in serious errors such as a jam or crash.
In the embodiment of the application, the resources in the electronic device are regularly detected for health, so that the fault resources can be timely found, the resources in the dormant state are awakened, and the fault resources are replaced by the awakened resources, so that the performance of the processor core is ensured, and the probability of errors caused by the fault resources of the processor core is reduced.
Fig. 5 shows another embodiment of the present application, in which a main flow of a resource state management method is implemented by a dormant resource pool, and the method includes:
operation S510, acquiring allocable resources;
since resources in the dormant state are all placed in the dormant resource pool, the resources available for allocation are all resources in the awake state.
Operation S520, acquiring a calling condition of the resource in a first time interval;
operation S530, determining whether the resource is called, if so, continuing to operate S540, otherwise, returning to operation S510 to obtain the next allocable resource;
operation S540, controlling the state of the resource to be switched from the awake state to the sleep state;
in operation S550, the resource is added to the dormant resource pool.
The dormant resource pool is created in advance, and can be realized through a queue or a stack.
In another process or thread, the following is performed to wake up a resource in a sleep state:
operation S560, in response to the wake-up condition being satisfied, acquiring resources in a dormant state from the dormant resource pool;
operation S570, executing a wakeup operation, and controlling the state of the resource to be switched from the sleep state to the wakeup state;
in operation S580, resources in the dormant state are removed from the dormant resource pool.
In the embodiment of the application, the resources in the dormant state and the resources in the awakening state are separately managed through the dormant resource pool, so that the operation of traversing each resource to acquire the resource state can be greatly reduced, and the efficiency of resource management is greatly improved.
Further, an embodiment of the present application further provides a resource status management apparatus, which is applied to a resource management unit of an electronic device, where the resource management unit allocates resources of the electronic device to a processor core executing a pipeline based on resource requirements of the pipeline, as shown in fig. 6, the apparatus 60 includes: a resource calling condition monitoring module 601, configured to monitor a calling condition of a resource in a first time interval; the resource state control module 602 is configured to control a state of a resource based on a resource calling condition, where the state of the resource includes a sleep state or a wake state.
In an embodiment of the present application, the apparatus further includes a resource allocation module, specifically configured to allocate resources of the wake state of the electronic device to a processor core of the execution pipeline.
In an embodiment of the present application, the resource status control module 602 includes: the dormancy control submodule is used for controlling the state of the resource to be switched from the awakening state to the dormant state if the resource is not called in the first time interval; and the wake-up control submodule is used for responding to the satisfaction of the wake-up condition and controlling the state of the resource to be switched from the dormant state to the wake-up state.
In an embodiment of the present application, the wake-up condition includes that a size of a resource in a wake-up state is smaller than a size of a resource required by a pipeline; accordingly, the apparatus 60 further comprises: and the resource demand evaluation module is used for determining the size of the resource required by the pipeline and the size of the resource in the awakening state.
In an embodiment of the present application, the wake-up condition includes that a duration of a sleep state of the resource reaches a set duration threshold; accordingly, the apparatus 60 further comprises: and the dormancy timer starting module is used for starting the dormancy timer, and the dormancy timer is used for triggering the resource management unit to control the state of the resource to be switched from the dormant state to the awakening state after the set duration threshold.
In an embodiment of the present application, the wake-up condition includes detecting a failed resource, where the failed resource is a resource that is used due to the failure of the resource; accordingly, the apparatus 60 further comprises: the resource health detection module is used for carrying out health detection on the resources of the electronic equipment so as to determine fault resources; and the resource replacing module is used for replacing the fault resource by using the resource switched to the awakening state.
In an embodiment of the present application, the apparatus 60 further includes: a dormant resource pool establishing module, configured to establish a dormant resource pool; accordingly, the apparatus 60 further comprises: the dormant resource pool entering module is used for adding resources into a dormant resource pool; a dormant resource acquiring module, configured to acquire a resource in a dormant state from the dormant resource pool; and the dormant resource pool outlet module is used for removing the resources from the dormant resource pool.
It should be noted that since the advent of the first general-purpose computer, computer technology has gained rapid growth over decades, and that rapid growth in computer technology has benefited from improvements in computer architecture and advances in computer manufacturing technology. The contribution of computer production technology to the development of computer technology has been stable; however, as the computer architecture has been improved for decades, the space for improving the computer architecture is becoming increasingly narrow, and therefore any small improvement on the computer architecture will have a significant impact on the performance of the processor and the development of computer technology.
An embodiment of the present application further provides an electronic device, which is configured to implement the resource state management method shown in fig. 2 to 6. As shown in fig. 7, the electronic device 70 at least includes: the resource management unit 701 and at least one processor core: a first processor core 702 and a second processor core 703; the resource management unit 701 is configured to execute any one of the resource state management methods.
According to a fourth aspect of embodiments herein, there is provided a computer storage medium comprising a set of computer executable instructions for performing the method of any one of the above when executed.
It is to be noted here that: the above description on the embodiment of the resource status management apparatus, the above description on the embodiment of the electronic device, and the above description on the embodiment of the computer storage medium are similar to the description on the foregoing method embodiments, and have similar beneficial effects to the foregoing method embodiments, and therefore, no further description is given. For technical details that are not disclosed yet in the description of the embodiment of the resource status management apparatus, the description of the embodiment of the electronic device, and the description of the embodiment of the computer storage medium, please refer to the description of the foregoing method embodiments of the present application for understanding, and therefore will not be described again for brevity.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, so that a process, a method, an article, or an apparatus that comprises a series of elements includes not only those elements but also other elements not explicitly listed, or further includes inherent elements of such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of a unit is only one logical function division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another device, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to flow program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media capable of storing program codes, such as a removable storage medium, a Read Only Memory (ROM), a magnetic disk, and an optical disk.
Alternatively, the integrated units described above in the present application may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or portions thereof that contribute to the prior art may be embodied in the form of a software product stored in a storage medium, and including several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a removable storage medium, a ROM, a magnetic disk, an optical disk, or the like, which can store the program code.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A resource state management method applied to a resource management unit of an electronic device, the resource management unit allocating resources of the electronic device to a processor core executing a pipeline based on resource requirements of the pipeline, the method comprising:
monitoring the resource calling condition of the electronic equipment in a first time interval;
and controlling the state of the resource based on the resource calling condition, wherein the state of the resource comprises a dormant state or a wakeup state.
2. The method of claim 1, wherein allocating resources of the electronic device to a processor core executing the pipeline comprises:
and allocating resources of the awakening state of the electronic equipment to a processor core executing the pipeline.
3. The method of claim 1, wherein controlling the state of the resource based on the call comprises:
if the resource is not called in the first time interval, controlling the state of the resource to be switched from a wake-up state to a sleep state;
controlling the state of the resource to switch from a sleep state to a wake state in response to a wake condition being satisfied.
4. The method of claim 3, wherein the wake condition comprises a resource size of the wake state being smaller than a resource size required by the pipeline;
accordingly, before the state of controlling the resource is switched from the sleep state to the awake state, the method further comprises:
the size of the resources needed by the pipeline and the size of the resources in the wake state are determined.
5. The method of claim 3, wherein the wake-up condition comprises a duration of a sleep state of the resource reaching a set duration threshold;
accordingly, after the state of controlling the resource is switched from the awake state to the sleep state, the method further comprises:
and starting a dormancy timer, wherein the dormancy timer is used for triggering the resource management unit to control the state of the resource to be switched from a dormant state to an awakening state after the set duration threshold.
6. The method of claim 3, wherein the wake-up condition comprises detecting a failed resource, wherein the failed resource is a resource that is used due to a failure of the resource;
accordingly, before the state of controlling the resource is switched from the sleep state to the awake state, the method further comprises:
performing health detection on resources of the electronic equipment to determine the fault resources;
accordingly, after the state of controlling the resource is switched from the sleep state to the awake state, the method further comprises:
and replacing the fault resource by using the resource switched to the wake-up state.
7. The method of claim 3, further comprising:
establishing a dormant resource pool;
adding resources in a dormant state to the dormant resource pool,
and/or moving the resource out of the dormant resource pool after the state for controlling the resource is switched from the dormant state to the awakening state.
8. A resource status management apparatus applied to a resource management unit of an electronic device, the resource management unit allocating resources of the electronic device to a processor core executing a pipeline based on resource requirements of the pipeline, the apparatus comprising:
the resource calling condition monitoring module is used for monitoring the calling condition of the resource in a first time interval;
and the resource state control module is used for controlling the state of the resource based on the resource calling condition, wherein the state of the resource comprises a dormant state or a wakeup state, and the resource in the dormant state is not used for executing the pipeline.
9. An electronic device, comprising:
a resource management unit and at least one processor core;
wherein the resource management unit is configured to perform the method of any of claims 1-7.
10. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-7.
CN202210263326.8A 2022-03-17 2022-03-17 Resource state management method and device, electronic equipment and storage medium Active CN114610578B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210263326.8A CN114610578B (en) 2022-03-17 2022-03-17 Resource state management method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210263326.8A CN114610578B (en) 2022-03-17 2022-03-17 Resource state management method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114610578A true CN114610578A (en) 2022-06-10
CN114610578B CN114610578B (en) 2023-12-29

Family

ID=81864037

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210263326.8A Active CN114610578B (en) 2022-03-17 2022-03-17 Resource state management method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114610578B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117119783A (en) * 2023-10-25 2023-11-24 广东迅扬科技股份有限公司 Control method for standby power consumption of module

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101493761A (en) * 2008-01-25 2009-07-29 国际商业机器公司 Method for pipelinedly processing instruction by processor and relevant processor
CN101510156A (en) * 2009-03-30 2009-08-19 阿里巴巴集团控股有限公司 Information system resource recovery method and device
US20100281285A1 (en) * 2009-04-30 2010-11-04 Blanding William H Managing under-utilized resources in a computer
CN103744735A (en) * 2014-01-09 2014-04-23 福建星网锐捷网络有限公司 Method and device for scheduling multi-core resource
US20150074677A1 (en) * 2013-09-06 2015-03-12 Seagate Technology Llc Load adaptive pipeline
US9348602B1 (en) * 2013-09-03 2016-05-24 Amazon Technologies, Inc. Resource allocation for staged execution pipelining
CN106528294A (en) * 2016-11-04 2017-03-22 郑州云海信息技术有限公司 Resource pool management method and system
CN112486312A (en) * 2020-11-19 2021-03-12 杭州电子科技大学 Low-power-consumption processor
CN113485841A (en) * 2021-07-28 2021-10-08 腾讯科技(深圳)有限公司 Data processing method and device based on edge calculation and readable storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101493761A (en) * 2008-01-25 2009-07-29 国际商业机器公司 Method for pipelinedly processing instruction by processor and relevant processor
CN101510156A (en) * 2009-03-30 2009-08-19 阿里巴巴集团控股有限公司 Information system resource recovery method and device
US20100281285A1 (en) * 2009-04-30 2010-11-04 Blanding William H Managing under-utilized resources in a computer
US9348602B1 (en) * 2013-09-03 2016-05-24 Amazon Technologies, Inc. Resource allocation for staged execution pipelining
US20150074677A1 (en) * 2013-09-06 2015-03-12 Seagate Technology Llc Load adaptive pipeline
CN103744735A (en) * 2014-01-09 2014-04-23 福建星网锐捷网络有限公司 Method and device for scheduling multi-core resource
CN106528294A (en) * 2016-11-04 2017-03-22 郑州云海信息技术有限公司 Resource pool management method and system
CN112486312A (en) * 2020-11-19 2021-03-12 杭州电子科技大学 Low-power-consumption processor
CN113485841A (en) * 2021-07-28 2021-10-08 腾讯科技(深圳)有限公司 Data processing method and device based on edge calculation and readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
萧放等: "基于超级基站的集中式接入网络架构的物理层虚拟化方法", vol. 26, no. 05 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117119783A (en) * 2023-10-25 2023-11-24 广东迅扬科技股份有限公司 Control method for standby power consumption of module
CN117119783B (en) * 2023-10-25 2024-01-30 广东迅扬科技股份有限公司 Control method for standby power consumption of module

Also Published As

Publication number Publication date
CN114610578B (en) 2023-12-29

Similar Documents

Publication Publication Date Title
KR101029414B1 (en) Method and apparatus for providing for detecting processor state transitions
US9632822B2 (en) Multi-core device and multi-thread scheduling method thereof
US8181047B2 (en) Apparatus and method for controlling power management by comparing tick idle time data to power management state resume time data
CN102103484B (en) For enabling the instruction of processor waiting status
CN101529383B (en) Task processing device
JP5311234B2 (en) Computer system and its operation method
TWI416413B (en) Work processing device
US20090150696A1 (en) Transitioning a processor package to a low power state
US20120137295A1 (en) Method for displaying cpu utilization in a multi-processing system
WO2013101069A1 (en) Core switching accelaration in asymmetric multiprocessor system
CN102736928B (en) Fast wake-up computer system method and computer system
CN114610578B (en) Resource state management method and device, electronic equipment and storage medium
US20030177163A1 (en) Microprocessor comprising load monitoring function
WO2016085680A1 (en) System and method for adaptive thread control in a portable computing device (pcd)
US20080313652A1 (en) Notifying user mode scheduler of blocking events
US20160342354A1 (en) Saving the Architectural State of a Computing Device using Sectors
JP2009037403A (en) Valid activation method for core memory in multi-core processor
CN109426563B (en) Process management method and device
KR20120003088A (en) Apparatus and method for thread progress tracking using deterministic progress index
CN111077976B (en) Method for realizing idle state low power consumption mode of multi-core processor and processor
US8621470B2 (en) Wakeup-attribute-based allocation of threads to processors
CN106326599B (en) System state monitoring method and device for multiprocessor system simulation
CN114356586B (en) Processor and electronic equipment
US20230315188A1 (en) Using a hardware-based controller for power state management
WO2024024102A1 (en) Computer system, task scheduler device, pending process awakening method, and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant