Resource scheduling method and device, electronic equipment and readable storage medium
By dynamically managing and marking the resource status of CGRA on the server side, the problem of low PEA resource utilization in CGRA computing resource scheduling is solved, achieving more efficient resource utilization and flexible resource scheduling, ensuring that the resource needs of multiple clients are met and Stable response.
Patent Information
- Application Number
- CN202310187391.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-21
- Publication Date
- 2024-08-23
AI Technical Summary
When the existing technology schedules the computing resources of the coarse-grained reconfigurable processor (CGRA), the resource utilization rate of the computing unit array (PEA) is low, resulting in the computing resources being underutilized.
After the server receives the client's task processing request, it sends a set of available resources and dynamically marks the resource status according to the client's resource usage request to ensure flexible utilization and effective allocation of resources, including converting static resources and dynamic resources into each other to adapt to the resources. Demand changes.
It improves the utilization of PEA resources, makes resource scheduling more flexible and reliable, and ensures that the resource needs of multiple clients are met. In particular, resource allocation is more stable when responding to multiple clients.
Smart Images

Figure CN118535293A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of wireless communications, and in particular to a resource scheduling method, device, electronic device and readable storage medium. Background Art
[0002] Since the coarse-grained reconfigurable architecture (CGRA) has the advantages of small configuration information and low power consumption, it has been widely used in many fields.
[0003] At present, relevant technologies mostly use time division multiplexing or space division multiplexing to schedule the computing resources of CGRA. Among them, the scheduling method based on time division multiplexing will have the problem of frequent configuration of the processing element array (PEA), and lead to reduced resource utilization of PEA; while the scheduling method based on space division multiplexing will have the problem of underutilization of PEA, and also lead to reduced resource utilization of PEA. That is to say, when the computing resources of CGRA are scheduled based on relevant technologies, the resource utilization of PEA is relatively low. Summary of the invention
[0004] The purpose of the embodiments of the present disclosure is to provide a resource scheduling method, device, electronic device and readable storage medium, which are used to solve the technical problem of low resource utilization of PEA when scheduling computing resources of CGRA in related technologies.
[0005] In a first aspect, an embodiment of the present disclosure provides a resource scheduling method, the method is applied to a server, the server includes a coarse-grained reconfigurable processor, the server is in communication connection with a first client, and the method includes:
[0006] receiving a task processing request sent by the first client;
[0007] In response to the task processing request, sending a first available resource set to the first client, wherein the first available resource set includes a first resource and a second resource, the first resource is an exclusive resource allocated by the server to the first client, and the second resource is a non-exclusive resource marked as available in the server at a first moment, and the first moment is the moment when the task processing request is received;
[0008] Receive a resource usage request fed back by the first client based on the first available resource set, and mark the usage status of a target resource in the first available resource set as an unavailable status, wherein the target resource is the resource indicated by the resource usage request in the second resource.
[0009] In one embodiment, before receiving the task processing request sent by the first client, the method further includes:
[0010] Receiving a resource configuration request sent by the first client;
[0011] Based on the resource configuration request, the first resource is determined in a second set of available resources, wherein the second set of available resources includes non-exclusive resources marked as available in the server at a second moment, and the second moment is a moment of receiving the resource configuration request.
[0012] In one embodiment, after receiving the resource configuration request sent by the first client, the method further includes:
[0013] In a case where the number of resources required by the resource configuration request is greater than the number of resources included in the second available resource set, notification information is sent to the first client, where the notification information is used to notify that available resources are insufficient.
[0014] In one embodiment, after receiving the resource usage request fed back by the first client based on the first available resource set and marking the usage status of the target resource as unavailable in the first available resource set, the method further includes:
[0015] Receiving a resource release request sent by the first client;
[0016] In response to the resource release request, the resource attribute of the first resource is changed to a non-exclusive resource, and the usage status of the first resource is marked as an available status.
[0017] In one embodiment, the resource use request includes a resource use time limit corresponding to the target resource;
[0018] The marking the usage status of the target resource as unavailable in the first available resource set includes:
[0019] In the first available resource set, the usage status of the target resource in a target time period is marked as an unavailable state, wherein the target time period is the time period indicated by the resource usage time limit.
[0020] In one embodiment, the target resource includes a first sub-target resource and a second sub-target resource, and the resource usage time limit includes a first sub-time limit corresponding to the first sub-target resource and a second sub-time limit corresponding to the second sub-target resource;
[0021] The marking the usage status of the target resource in the target time period as unavailable in the first available resource set includes:
[0022] In the first available resource set, the usage status of the first sub-target resource in the first time period is marked as unavailable, and, in the first available resource set, the usage status of the second sub-target resource in the second time period is marked as unavailable, wherein the first time period is the time period indicated by the first sub-time period, and the second time period is the time period indicated by the second sub-time period.
[0023] In one embodiment, when a first available resource set is sent to the first client in response to the task processing request, the first resource set is not empty.
[0024] In a second aspect, an embodiment of the present disclosure further provides a resource scheduling device, which is applied to a server, the server includes a coarse-grained reconfigurable processor, the server is communicatively connected to a first client, and the device includes:
[0025] A first receiving module, used to receive a task processing request sent by the first client;
[0026] A first sending module, configured to send a first available resource set to the first client in response to the task processing request, wherein the first available resource set includes a first resource and a second resource, the first resource is an exclusive resource allocated by the server to the first client, and the second resource is a non-exclusive resource marked as available in the server at a first moment, and the first moment is a moment of receiving the task processing request;
[0027] The second receiving module is used to receive a resource usage request fed back by the first client based on the first available resource set, and mark the usage status of the target resource in the first available resource set as unavailable, wherein the target resource is the resource indicated by the resource usage request in the second resource.
[0028] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the above-mentioned resource scheduling method when executed by the processor.
[0029] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned resource scheduling method are implemented.
[0030] In the disclosed embodiment, after receiving the task processing request of the first client, a first available resource set indicating all resources currently available to the server is sent to the first client, and based on the resource usage request fed back by the first client, the usage status of the target resource is marked as unavailable, so as to adapt to the dynamic changes in the resource usage requirements of the first client, which can not only improve the resource utilization of the PEA resources of the server, but also make the resource scheduling of the PEA resources of the server more flexible. Among them, the setting of the first resource can ensure that the basic resource usage requirements of the first client are met, making the resource scheduling of the server more reliable and stable when responding to multiple clients. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a flowchart of a resource scheduling method provided by an embodiment of the present disclosure;
[0032] Figure 2 is a schematic diagram of a logical structure of a PEA provided by an embodiment of the present disclosure;
[0033] Figure 3 is a schematic diagram of a static resource and a dynamic resource provided by an embodiment of the present disclosure;
[0034] Figure 4 is a structural diagram of a resource scheduling device provided by an embodiment of the present disclosure;
[0035] Figure 5 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0036] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0037] The embodiment of the present disclosure provides a resource scheduling method, which is applied to a server, wherein the server includes a coarse-grained reconfigurable architecture (CGRA), and the server is connected to a first client for communication. Figure 1 , Figure 1 is a flow chart of a resource scheduling method provided by an embodiment of the present disclosure, such as Figure 1 As shown, the following steps are included:
[0038] Step 101: Receive a task processing request sent by the first client.
[0039] The method disclosed in the present invention is applied in a cloud scenario, for example: the aforementioned server may be a cloud server.
[0040] Among them, the first client is used to refer to any user accessing the server. The user is a logical entity with independent processing requirements. For example, the user can be an enterprise or individual who rents / shares the same cloud platform, or different applications sharing the same cloud platform (such as face recognition and mobile communication physical layer processing applications).
[0041] It should be noted that in the cloud scenario, multiple users accessing the server share the processing element array (PEA) resources of CGRA; and for each user, each user can run at least one processing task based on his or her own needs.
[0042] The core structure of CGRA includes a processing element array (PEA) responsible for calculation and a central processing unit (CPU) responsible for control.
[0043] The logical structure of PEA can be found in Figure 2 ,like Figure 2 As shown, each PE in PEA can be understood as a computing core. At least one computing core can complete the execution of the aforementioned processing tasks. Moreover, as the number of computing cores increases, the execution efficiency of the processing tasks will also increase, and the connection relationship between PEs can be adaptively configured.
[0044] The aforementioned task processing request can be understood as a computing resource inquiry request sent by the first client to the server before using the computing resources allocated by the server to process the task, for inquiring the amount of computing resources currently available to the server.
[0045] Step 102: In response to the task processing request, send a first available resource set to the first client.
[0046] Among them, the first available resource set includes a first resource and a second resource, the first resource is an exclusive resource allocated by the server to the first client, and the second resource is a non-exclusive resource marked as available in the server at a first moment, and the first moment is the moment of receiving the task processing request.
[0047] When CGRA is running, for the processing code of a certain application (such as mobile communication physical layer processing), the compiler first generates several groups of PEA configuration information based on the code; then, the CPU configures PEA according to the first group of configuration information; then, PEA reads in data and completes processing under the first group of configuration information; then, the CPU continues to configure PEA according to the second group of configuration information; then, PEA reads in data and completes processing under the second group of configuration information, and so on, until the aforementioned several groups of PEA configuration information have all read in data and completed processing, that is, the execution of the aforementioned processing code is completed.
[0048] In the application, in order to carry multiple users accessing the server in the cloud scenario, the PEA of CGRA needs to be virtualized and PEA is abstracted into multiple logical virtual hardware to be provided to multiple users accessing the server respectively, and each user can only access or call the virtual hardware resources allocated to the user.
[0049] In the present disclosure, the virtualization setting of PEA can use PE as the smallest division unit, and divide the multiple PE resources included in PEA into two categories: static resources and dynamic resources. Among them, static resources are resources that belong exclusively to a certain user, and dynamic resources are resources shared by all users. In addition, dynamic resources and static resources are logical identifiers of PE (which can also be understood as resource attributes), and the two can be converted into each other.
[0050] The aforementioned first resource is a static resource, and the aforementioned second resource is a dynamic resource.
[0051] Step 103: Receive a resource usage request fed back by the first client based on the first available resource set, and mark the usage status of the target resource in the first available resource set as unavailable.
[0052] The target resource is the resource indicated by the resource usage request in the second resource.
[0053] When receiving the first available resource set, the first client will compile the code in the first available resource set according to the actual code for processing the task, so as to obtain the target resource occupation plan for actually executing the task, and send a resource usage request to the server based on the target resource occupation plan, wherein the target resource occupation plan can be the resource usage plan with the highest execution efficiency for processing the task, or it can be the resource usage plan with the least resource usage for processing the task. The present disclosure does not limit the method for obtaining the target resource occupation plan.
[0054] In the disclosed embodiment, after receiving the task processing request of the first client, a first available resource set indicating all resources currently available to the server is sent to the first client, and based on the resource usage request fed back by the first client, the usage status of the target resource is marked as unavailable, so as to adapt to the dynamic changes in the resource usage requirements of the first client, which can not only improve the resource utilization of the PEA resources of the server, but also make the resource scheduling of the PEA resources of the server more flexible. Among them, the setting of the first resource can ensure that the basic resource usage requirements of the first client are met, making the resource scheduling of the server more reliable and stable when responding to multiple clients.
[0055] In one embodiment, before receiving the task processing request sent by the first client, the method further includes:
[0056] Receiving a resource configuration request sent by the first client;
[0057] Based on the resource configuration request, the first resource is determined in a second set of available resources, wherein the second set of available resources includes non-exclusive resources marked as available in the server at a second moment, and the second moment is a moment of receiving the resource configuration request.
[0058] In this embodiment, the resource configuration request can be understood as a resource configuration requirement estimated by the server according to the task processing requirement reported by the first client when the first client accesses the server.
[0059] After determining the first resource in the first available resource set, the server will convert the logical identifier of the first resource from a dynamic resource to a static resource, which can ensure that the basic resource usage needs of the first client are met, making the server's resource scheduling more reliable and stable when responding to multiple clients.
[0060] In one embodiment, after receiving the resource configuration request sent by the first client, the method further includes:
[0061] In a case where the number of resources required by the resource configuration request is greater than the number of resources included in the second available resource set, notification information is sent to the first client, where the notification information is used to notify that available resources are insufficient.
[0062] In this embodiment, when the number of resources required by the resource configuration request is greater than the number of resources included in the second available resource set, a notification message is sent to the first client to promptly inform the user of the first client of the shortage of available resources, thereby avoiding a long waiting time for the user of the first client.
[0063] In one embodiment, when a first available resource set is sent to the first client in response to the task processing request, the first resource set is not empty.
[0064] In this embodiment, the situation in which the server sends the first available resource set to the first client in response to the task processing request can be understood as the situation in which the server has allocated at least one PE exclusive resource to the first client. At this time, the first resource is not empty. Different from the related technology that prioritizes processing efficiency when processing multi-task resource scheduling, the present disclosure utilizes the setting of the first resource to guarantee the basic resource usage needs of the first client in extreme cases, so that the server's response to the resource usage needs of multiple users is more fair and reliable.
[0065] The aforementioned extreme case can be understood as a case where the second resource is empty, for example, a case where no dynamic resources currently exist on the server, or a case where the usage status of the dynamic resources currently existing on the server are all unavailable.
[0066] It should be pointed out that the existence of the first resource is used to guarantee the basic resource usage needs of the first client in extreme cases. Therefore, the resource usage request fed back by the first client based on the first available resource set may indicate at least one resource of the first resource, or may not indicate the first resource.
[0067] Exemplarily, if the first resource is set to resource a1 and resource a2, and the second resource is set to resource a3 and resource a4, then the resource usage request fed back by the first client based on the first available resource set may indicate resource a1 and resource a2, or resource a1 and resource a3, or resource a3 and resource a4.
[0068] In one embodiment, after receiving the resource usage request fed back by the first client based on the first available resource set and marking the usage status of the target resource as unavailable in the first available resource set, the method further includes:
[0069] Receiving a resource release request sent by the first client;
[0070] In response to the resource release request, the resource attribute of the first resource is changed to a non-exclusive resource, and the usage status of the first resource is marked as an available status.
[0071] In this embodiment, when the user corresponding to the first client chooses to disconnect from the server, a resource release request can be sent to the server to cause the server to change the resource attribute of the first resource to a non-exclusive resource, that is, to convert the logical identifier of the first resource from a static resource to a dynamic resource, and mark the usage status of the first resource as an available status, so as to complete the release of the exclusive resources corresponding to the first client.
[0072] In one embodiment, the resource use request includes a resource use time limit corresponding to the target resource;
[0073] The step of marking the usage status of the target resource as unavailable in the first available resource set includes:
[0074] In the first available resource set, the usage status of the target resource in a target time period is marked as an unavailable state, wherein the target time period is the time period indicated by the resource usage time limit.
[0075] In this embodiment, the usage status of the target resource in other time periods outside the target time period is an available state. By setting the resource usage time limit, the scheduling and use of the aforementioned dynamic resources are further refined from the time dimension, making the resource scheduling of the PEA resources on the server side more flexible.
[0076] In one embodiment, the target resource includes a first sub-target resource and a second sub-target resource, and the resource usage time limit includes a first sub-time limit corresponding to the first sub-target resource and a second sub-time limit corresponding to the second sub-target resource;
[0077] The marking the usage status of the target resource in the target time period as unavailable in the first available resource set includes:
[0078] In the first available resource set, the usage status of the first sub-target resource in the first time period is marked as unavailable, and, in the first available resource set, the usage status of the second sub-target resource in the second time period is marked as unavailable, wherein the first time period is the time period indicated by the first sub-time period, and the second time period is the time period indicated by the second sub-time period.
[0079] In this embodiment, when the target resource includes at least two resources, the target resource includes a first sub-target resource and a second sub-target resource, which can be any two different resources among the at least two resources. By marking the usage status of the first sub-target resource in the first time period as unavailable in the first available resource set, and marking the usage status of the second sub-target resource in the second time period as unavailable in the first available resource set, different dynamic resources can be used differently in the time dimension, making the resource scheduling of the PEA resources on the server more flexible.
[0080] It should be noted that the first time period and the second time period may be the same or different, and the present disclosure does not limit this.
[0081] In one embodiment, the resource scheduling process of CGRA includes:
[0082] The first step is resource initialization.
[0083] In this step, the CGRA is not connected to any user in the initial state. At this time, all PEs included in the CGRA are marked as dynamic resources with the usage state being available.
[0084] Step 2: User registration.
[0085] In this step, the user sends the resource demand to the controller of CGRA. The controller receives the resource demand and allocates static resources exclusive to the user from all dynamic resources currently available according to the resource demand. If the controller finds that all dynamic resources currently available cannot meet the resource demand of the user, the controller sends insufficient available resources information to the user.
[0086] The third step is to run the task.
[0087] In this step, when the user has an actual processing task, the controller combines all dynamic resources that are currently available and the static resources corresponding to the user into an available resource set and provides it to the user as the array resource configuration used in the actual operation of the user. After the user compiles according to the above available resource set, the size of the corresponding array actually occupied and the corresponding operation cycle will be determined. At this time, the user sends the size of the array actually occupied and the corresponding operation cycle to the controller, and the controller updates the static resources, and marks the corresponding dynamic resources in all dynamic resources that are currently available as unavailable within the corresponding operation cycle.
[0088] Step 4: User logout.
[0089] In this step, the user no longer needs to access the cloud server where the CGRA is located for his own reasons. The user sends a resource release request to the controller, so that the controller converts the static resources corresponding to the user into dynamic resources.
[0090] For ease of understanding, the following examples are provided:
[0091] In this example, the PEA size of CGRA is set to 4*4, that is, PEA includes 16 PEs.
[0092] During the CGRA initialization phase, the controller sets the 16 PEs as static resources and marks the usage status as available.
[0093] User 1 accesses the cloud server where CGRA is located and proposes a resource requirement of "2*2 array". After receiving the corresponding resource requirement, the controller allocates the 2*2 arrays in the upper left corner of the 4*4 array to user 1. The corresponding 2*2 array type is set by the controller as a static resource and belongs to user 1.
[0094] User 2 accesses the cloud server where CGRA is located and proposes a resource requirement of 2*2 array size. After receiving the corresponding resource requirement, the controller allocates the 2*2 arrays in the upper right corner of the 4*4 array to user 2. The corresponding 2*2 array type is set by the controller as a static resource and belongs to user 2.
[0095] At this time, if Figure 3 As shown, user 1 and user 2 each occupy 2*2 array resources, and the remaining dynamic resources are 2*4 array resources in the lower left corner and the lower right corner.
[0096] User 1 actually runs and initiates a processing task. At this time, the controller receives the processing task of user 1, merges user 1's 2*2 static resources (upper left corner) and 2*4 dynamic resources (lower left and lower right corners) into an available resource set, and sends it to user 1.
[0097] User 1 compiles the code of his own processing task in a 2*2+2*4 array. The compilation result indicates that the corresponding processing task can be completed by occupying an array area of 2*2 (upper left corner) + 2*2 (lower left corner) and running for 100 cycles.
[0098] User 1 sends the actual resource occupancy information to the controller, and the controller marks the usage status of the 2*2 array in the lower left corner of the dynamic resource as unavailable within the corresponding 100 cycles.
[0099] When the above processing of user 1 is not completed, user 2 initiates a processing task. At this time, the controller receives the processing task of user 2, merges the 2*2 static resources of user 2 (upper right corner) and the available 2*2 dynamic resources (lower right corner) into an available resource set, sends it to user 2, compiles it according to the above steps, and updates the mark.
[0100] At a certain moment, user 2 sends a resource release request. The controller receives the resource release information from user 2 and converts the static resources corresponding to user 2 into dynamic resources. At this time, the dynamic resources total 12 PEs, and the remaining 4 static resources correspond to user 1.
[0101] like Figure 4 As shown, the embodiment of the present disclosure further provides a resource scheduling device 400, which is applied to a server, the server includes a coarse-grained reconfigurable processor, the server is connected to a first client for communication, and the device 400 includes:
[0102] A first receiving module 401 is used to receive a task processing request sent by the first client;
[0103] A first sending module 402 is used to send a first available resource set to the first client in response to the task processing request, wherein the first available resource set includes a first resource and a second resource, the first resource is an exclusive resource allocated by the server to the first client, and the second resource is a non-exclusive resource marked as available in the server at a first moment, and the first moment is the moment of receiving the task processing request;
[0104] The second receiving module 403 is used to receive a resource usage request fed back by the first client based on the first available resource set, and mark the usage status of the target resource in the first available resource set as unavailable, wherein the target resource is the resource indicated by the resource usage request in the second resource.
[0105] In one embodiment, when a first available resource set is sent to the first client in response to the task processing request, the first resource set is not empty.
[0106] In one embodiment, the apparatus 400 further includes:
[0107] A third receiving module, used to receive a resource configuration request sent by the first client;
[0108] A resource determination module is used to determine the first resource in a second set of available resources based on the resource configuration request, wherein the second set of available resources includes non-exclusive resources marked as available in the server at a second moment, and the second moment is the moment of receiving the resource configuration request.
[0109] In one embodiment, the apparatus 400 further includes:
[0110] The second sending module is used to send notification information to the first client when the number of resources required by the resource configuration request is greater than the number of resources included in the second available resource set, wherein the notification information is used to notify that the available resources are insufficient.
[0111] In one embodiment, the apparatus 400 further includes:
[0112] A fourth receiving module, used to receive a resource release request sent by the first client;
[0113] The changing module is used to change the resource attribute of the first resource to a non-exclusive resource in response to the resource release request, and mark the use status of the first resource as an available status.
[0114] In one embodiment, the resource use request includes a resource use time limit corresponding to the target resource;
[0115] The change module includes:
[0116] A changing unit is used to mark the usage status of the target resource in the first available resource set in a target time period as an unavailable state, wherein the target time period is the time period indicated by the resource usage time limit.
[0117] In one embodiment, the target resource includes a first sub-target resource and a second sub-target resource, and the resource usage time limit includes a first sub-time limit corresponding to the first sub-target resource and a second sub-time limit corresponding to the second sub-target resource;
[0118] The changing unit is specifically used for:
[0119] In the first available resource set, the usage status of the first sub-target resource in the first time period is marked as unavailable, and, in the first available resource set, the usage status of the second sub-target resource in the second time period is marked as unavailable, wherein the first time period is the time period indicated by the first sub-time period, and the second time period is the time period indicated by the second sub-time period.
[0120] The resource scheduling device 400 provided in the embodiment of the present disclosure can implement each process in the above method embodiment and achieve the same technical effect. To avoid repetition, it will not be described here.
[0121] See also Figure 5 , Figure 5 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure, such as Figure 5 As shown, the electronic device includes: a processor 501 , a memory 502 , and a program 5021 stored in the memory 502 and executable on the processor 501 .
[0122] When the program 5021 is executed by the processor 501, it can achieve Figure 1 Any steps in the corresponding method embodiments and achieving the same beneficial effects will not be repeated here.
[0123] Those skilled in the art will appreciate that all or part of the steps of implementing the above-mentioned embodiment method can be completed by hardware associated with program instructions, and the program can be stored in a readable medium.
[0124] The present disclosure also provides a readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the above-mentioned Figure 1 Any steps in the corresponding method embodiments can achieve the same technical effect and will not be repeated here to avoid repetition.
[0125] The computer-readable storage medium of the embodiment of the present disclosure may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it.
[0126] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0127] The program code contained on the storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the foregoing.
[0128] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or terminal. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0129] The above is a preferred implementation of the embodiment of the present disclosure. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles described in the present disclosure. These improvements and modifications should also be regarded as the scope of protection of the present disclosure.
Claims
1. A resource scheduling method, It is characterized in that The method is applied to a server, the server includes a coarse-grained reconfigurable processor, the server is in communication connection with a first client, and the method includes: receiving a task processing request sent by the first client; In response to the task processing request, sending a first available resource set to the first client, wherein the first available resource set includes a first resource and a second resource, the first resource is an exclusive resource allocated by the server to the first client, and the second resource is a non-exclusive resource marked as available in the server at a first moment, and the first moment is the moment when the task processing request is received; Receive a resource usage request fed back by the first client based on the first available resource set, and mark the usage status of a target resource in the first available resource set as an unavailable status, wherein the target resource is the resource indicated by the resource usage request in the second resource.
2. The method according to claim 1, It is characterized in that Before receiving the task processing request sent by the first client, the method further includes: Receiving a resource configuration request sent by the first client; Based on the resource configuration request, the first resource is determined in a second set of available resources, wherein the second set of available resources includes non-exclusive resources marked as available in the server at a second moment, and the second moment is a moment of receiving the resource configuration request.
3. The method according to claim 2, It is characterized in that After receiving the resource configuration request sent by the first client, the method further includes: In a case where the number of resources required by the resource configuration request is greater than the number of resources included in the second available resource set, notification information is sent to the first client, where the notification information is used to notify that available resources are insufficient.
4. The method according to claim 1, It is characterized in that After receiving the resource usage request fed back by the first client based on the first available resource set and marking the usage status of the target resource as unavailable in the first available resource set, the method further includes: Receiving a resource release request sent by the first client; In response to the resource release request, the resource attribute of the first resource is changed to a non-exclusive resource, and the usage status of the first resource is marked as an available status.
5. The method according to claim 1, It is characterized in that The resource use request includes a resource use time limit corresponding to the target resource; The marking the usage status of the target resource as unavailable in the first available resource set includes: In the first available resource set, the usage status of the target resource in a target time period is marked as an unavailable state, wherein the target time period is the time period indicated by the resource usage time limit.
6. The method according to claim 5, It is characterized in that The target resource includes a first sub-target resource and a second sub-target resource, and the resource usage time limit includes a first sub-time limit corresponding to the first sub-target resource and a second sub-time limit corresponding to the second sub-target resource; The marking the usage status of the target resource in the target time period as unavailable in the first available resource set includes: In the first available resource set, the usage status of the first sub-target resource in the first time period is marked as unavailable, and, in the first available resource set, the usage status of the second sub-target resource in the second time period is marked as unavailable, wherein the first time period is the time period indicated by the first sub-time period, and the second time period is the time period indicated by the second sub-time period.
7. The method according to claim 1, It is characterized in that When a first available resource set is sent to the first client in response to the task processing request, the first resource set is not empty.
8. A resource scheduling device, It is characterized in that The device is applied to a server, the server includes a coarse-grained reconfigurable processor, the server is communicatively connected with a first client, and the device includes: A first receiving module, used to receive a task processing request sent by the first client; A first sending module, configured to send a first available resource set to the first client in response to the task processing request, wherein the first available resource set includes a first resource and a second resource, the first resource is an exclusive resource allocated by the server to the first client, and the second resource is a non-exclusive resource marked as available in the server at a first moment, and the first moment is a moment of receiving the task processing request; The second receiving module is used to receive a resource usage request fed back by the first client based on the first available resource set, and mark the usage status of the target resource in the first available resource set as unavailable, wherein the target resource is the resource indicated by the resource usage request in the second resource.
9. An electronic device, It is characterized in that The method comprises a processor, a memory and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the resource scheduling method according to any one of claims 1 to 7 when executed by the processor.
10. A readable storage medium, It is characterized in that The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the resource scheduling method according to any one of claims 1 to 7 are implemented.
