CN106528287B - Resource for computer system distribution method and device - Google Patents
Resource for computer system distribution method and device Download PDFInfo
- Publication number
- CN106528287B CN106528287B CN201510571508.1A CN201510571508A CN106528287B CN 106528287 B CN106528287 B CN 106528287B CN 201510571508 A CN201510571508 A CN 201510571508A CN 106528287 B CN106528287 B CN 106528287B
- Authority
- CN
- China
- Prior art keywords
- resource
- user
- saturation degree
- resource user
- boundary
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 76
- 238000013468 resource allocation Methods 0.000 claims description 92
- 229920006395 saturated elastomer Polymers 0.000 claims description 4
- 238000003780 insertion Methods 0.000 claims 4
- 230000037431 insertion Effects 0.000 claims 4
- 238000012163 sequencing technique Methods 0.000 claims 3
- 238000004364 calculation method Methods 0.000 abstract description 12
- 238000013500 data storage Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 230000003068 static effect Effects 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0896—Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/70—Admission control; Resource allocation
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Environmental & Geological Engineering (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
Description
技术领域technical field
本申请涉及系统资源分配方法和装置。具体涉及计算机系统资源分配方法和装置。The present application relates to a system resource allocation method and device. In particular, the invention relates to a computer system resource allocation method and device.
背景技术Background technique
对于拥有众多资源使用者的系统,系统的资源使用者经常需要向系统申请系统所管理的资源,系统收到资源使用者申请资源的请求后,会为不同的资源使用者分配相应数量的资源供资源使用者使用。由于系统资源总量是固定的,所以每个资源使用者可用的资源一定是有限的。各个资源使用者权重的不同,在某一时刻,有的资源使用者的申请资源量较大,有的资源使用者资源申请资源量较小,现有的资源分配算法将申请资源量较小的资源使用者的可用资源配额匀给申请资源量较大的资源使用者。具体地,现有的资源配额计算多为以下的方案:For a system with many resource users, the resource users of the system often need to apply to the system for the resources managed by the system. After receiving the resource user's request for resource application, the system will allocate a corresponding amount of resources for different resource users. Resource consumers use. Since the total amount of system resources is fixed, the resources available to each resource user must be limited. The weight of each resource user is different. At a certain moment, some resource users apply for a large amount of resources, and some resource users apply for a small amount of resources. The existing resource allocation algorithm will apply for a small amount of resources The available resource quota of resource users is evenly distributed to resource users who apply for a large amount of resources. Specifically, most of the existing resource quota calculations are the following schemes:
1、以各个资源使用者最大资源配额(MaxQuota)的比例来分配系统资源总量、得到资源使用者静态平衡配额资源(ScaleQuota)。1. Allocate the total system resources in proportion to the maximum resource quota (MaxQuota) of each resource user, and obtain the static balance quota resource (ScaleQuota) of the resource user.
2、当资源使用者申请资源量(Request)的总和小于系统资源总量时,则每个资源使用者得到的资源配额即是资源使用者申请资源量(Request),结束分配过程。2. When the sum of resources requested by resource users (Request) is less than the total amount of system resources, the resource quota obtained by each resource user is the requested resource amount (Request) of the resource user, and the allocation process ends.
3、将资源使用者分为两类,B类:资源使用者申请资源量(Request)小于资源使用者静态平衡配额资源(ScaleQuota);C类:资源使用者申请资源量(Request)大于资源使用者静态平衡配额资源(ScaleQuota)。3. Divide resource users into two categories, category B: the amount of resources requested by resource users (Request) is less than the static balance quota resource (ScaleQuota) of resource users; category C: the amount of resources requested by resource users (Request) is greater than the resource usage Or statically balance quota resources (ScaleQuota).
4、对于B类资源使用者,静态平衡配额资源(ScaleQuota)与资源使用者申请资源量(Request)的差可以分配给C类资源使用者用;将这些差累计求和,记为系统中可以再分配的资源总量,记为 4. For resource users of class B, the difference between the statically balanced quota resources (ScaleQuota) and the amount of resources requested by resource users (Request) can be allocated to resource users of class C; the accumulated sum of these differences is recorded as the available resource in the system The total amount of reallocated resources, denoted as
5、将按照资源使用者最大资源配额(MaxQuota)的比例分配给C类资源使用者,则C类资源使用者新的可用资源配额=静态平衡资源配额(ScaleQuota)+新得到的资源配额,记为Ω。5. will Allocate to class C resource users in proportion to the resource user's maximum resource quota (MaxQuota), then the new available resource quota of class C resource users = static balance resource quota (ScaleQuota) + newly obtained resource quota, denoted as Ω.
6、如果C类资源使用者的Ω大于资源使用者申请资源量(Request),则Ω与资源使用者申请资源量(Request)的差还可以分配给C类资源使用者中Ω仍小于资源使用者申请资源量(Request)的资源使用者,算法跳转回步骤3进行迭代,直到可再分配资源总量 6. If the Ω of the C-type resource user is greater than the resource user’s application resource amount (Request), the difference between Ω and the resource user’s application resource amount (Request) can also be allocated to the C-type resource user, and Ω is still smaller than the resource usage The resource user who applies for the amount of resources (Request), the algorithm jumps back to step 3 to iterate until the total amount of resources that can be allocated
可见,现有资源配额的计算方法在最坏情况和平均情况下的时间复杂度O为资源使用者数量n的平方(n2),并且,当只想知道某个资源使用者的资源分配额时,必须将所有资源使用者的资源分配额全部计算出来,对于拥有众多资源使用者的大系统来说,现有计算机系统资源分配方法无法满足实时计算的要求。同时现有的计算机系统资源分配方法不能支持资源使用者配置最小资源配额量的情况。It can be seen that the time complexity O of the existing resource quota calculation method in the worst case and the average case is the square (n 2 ) of the number of resource users n, and when one only wants to know the resource allocation of a certain resource user When , the resource allocation of all resource users must be fully calculated. For a large system with many resource users, the existing computer system resource allocation methods cannot meet the requirements of real-time calculation. At the same time, the existing computer system resource allocation method cannot support the situation that the resource user configures the minimum resource quota.
申请内容application content
本申请提供两种计算机系统资源分配方法,以解决现有资源分配方法时间复杂度高,无法满足实时计算的要求的问题。此外,本申请还提供两种计算机系统资源分配装置。This application provides two computer system resource allocation methods to solve the problem that the existing resource allocation methods have high time complexity and cannot meet the requirements of real-time computing. In addition, the present application also provides two kinds of computer system resource allocation devices.
本申请提供的一种计算机系统资源分配方法,包括以下步骤:A method for allocating computer system resources provided by the present application includes the following steps:
获取系统资源总量和有权提出资源申请请求的资源使用者的资源分配相关数据,所述资源使用者的资源分配相关数据包括资源使用者的最大资源配额量和申请资源量;Obtain the total amount of system resources and resource allocation-related data of resource users who have the right to make resource application requests, and the resource allocation-related data of resource users include the resource user's maximum resource quota and application resource amount;
利用所述资源使用者的申请资源量除以最大资源配额量,计算得出资源使用者的资源饱和度;calculating the resource saturation of the resource user by dividing the resource amount requested by the resource user by the maximum resource quota;
以所述资源使用者的资源饱和度为依据,对所述资源使用者进行排序;sorting the resource users based on the resource saturation of the resource users;
根据资源使用者排序,以设定条件确定一个边界资源使用者,将资源饱和度小于或等于所述边界资源使用者的资源使用者,称为B类资源使用者;将资源饱和度大于该边界资源使用者的资源使用者称为C类资源使用者;According to the ranking of resource users, a boundary resource user is determined by setting conditions, and resource users whose resource saturation is less than or equal to the boundary resource user are called B-type resource users; resource saturation is greater than the boundary A resource user of a resource user is called a class C resource user;
对B类资源使用者,以其申请资源量作为其资源配额向其分配资源;对于C类资源使用者,将系统资源总量减去按照所述为B类资源使用者分配的所有资源量后,获得剩余资源量;将所述剩余资源量,按照该C类资源使用者的最大资源配额量占所有C类资源使用者的最大资源配额量的总和的比例,作为其资源配额,以所述的资源配额向该C类资源使用者分配资源。For B-type resource users, resources are allocated to them based on the amount of resources they apply for as their resource quota; for C-type resource users, the total amount of system resources is subtracted from all the resources allocated for B-type resource users as described , to obtain the amount of remaining resources; the amount of remaining resources, according to the ratio of the maximum resource quota of the C-type resource user to the sum of the maximum resource quotas of all C-type resource users, is used as its resource quota, and the above-mentioned The resource quota allocated resources to the C-type resource users.
可选地,所述设定条件为所述边界资源使用者满足不等式一和不等式二,Optionally, the setting condition is that the boundary resource user satisfies Inequality 1 and Inequality 2,
不等式一:Inequality one:
不等式二:Inequality two:
其中ToatalResource:系统资源总量;Requesti:资源饱和度小于或等于边界资源使用者的资源饱和度的,除边界资源使用者以外的其他B类资源使用者中第i个B类资源使用者的申请资源量;MaxQuotaj:资源饱和度大于边界资源使用者的资源饱和度的第j个C类资源使用者的最大资源配额量;Requesth:边界资源使用者的申请资源量;MaxQuotah:边界资源使用者的最大资源配额量;Requesth+1:所述排序资源使用者中,资源饱和度小于任一其他C类资源使用者的资源饱和度,但大于边界资源使用者的资源饱和度的C类资源使用者的申请资源量;MaxQuotah+1:所述排序的资源使用者中,资源饱和度小于任一其他C类资源使用者的资源饱和度,但大于边界资源使用者的资源饱和度的C类资源使用者的最大资源配额量;m:系统内资源饱和度小于或等于边界资源使用者的资源饱和度的,除边界资源使用者以外的其他B类资源使用者的数量;n:系统内资源饱和度大于边界资源使用者的资源饱和度的C类资源使用者的数量;∑:求和运算。Among them, ToatalResource: the total amount of system resources; Request i : if the resource saturation is less than or equal to the resource saturation of the border resource user, the i-th class B resource user among other class B resource users except the border resource user Application resource amount; MaxQuota j : the maximum resource quota of the jth class C resource user whose resource saturation is greater than the resource saturation of the boundary resource user; Request h : the application resource amount of the boundary resource user; MaxQuota h : boundary The maximum resource quota of a resource user; Request h+1 : Among the sorted resource users, the resource saturation is less than the resource saturation of any other C-type resource users, but greater than the resource saturation of the boundary resource users The amount of resources requested by a class C resource user; MaxQuota h+1 : Among the resource users sorted, the resource saturation is less than that of any other class C resource user, but greater than the resource saturation of the boundary resource user The maximum resource quota of C-type resource users; m: the number of other B-type resource users except for boundary resource users whose resource saturation in the system is less than or equal to the resource saturation of boundary resource users; n : The number of C-type resource users whose resource saturation in the system is greater than that of the boundary resource users; ∑: summation operation.
可选地,所述根据资源使用者排序,以设定条件确定一个边界资源使用者的方法包括:Optionally, the method of determining a boundary resource user by setting conditions according to the sorting of resource users includes:
将所述排序的资源使用者中的一个资源使用者作为临时边界资源使用者;using one of the sorted resource users as a temporary boundary resource user;
将临时边界资源使用者作为边界资源使用者代入所述不等式一和不等式二,若两个不等式都成立,则该临时资源使用者为边界资源使用者;若两个不等式不能都成立,则将所述排序的资源使用者中的另外一个资源使用者作为临时边界资源使用者,返回执行“将临时边界资源使用者的数据作为边界资源使用者的数据代入不等式一和不等式二”的步骤。Substitute the temporary boundary resource user into the above inequality 1 and inequality 2 as the boundary resource user, if both inequalities are true, then the temporary resource user is the boundary resource user; if the two inequalities cannot both be true, then all Another resource user among the sorted resource users is used as a temporary border resource user, and returns to the step of "substituting the data of the temporary border resource user into Inequality 1 and Inequality 2 as the data of the border resource user".
可选地,所述将所述排序的资源使用者中的另外一个资源使用者作为临时边界资源使用者的方法包括:Optionally, the method for using another resource user among the sorted resource users as a temporary boundary resource user includes:
若不等式一不成立,则在所述排序的资源使用者中选择一个资源饱和度小于临时边界资源使用者的资源饱和度的资源使用者,将该资源使用者作为临时边界资源使用者;If inequality one is not established, select a resource user whose resource saturation is less than the resource saturation of the temporary boundary resource user among the sorted resource users, and use the resource user as the temporary boundary resource user;
若不等式二不成立,则在所述排序的资源使用者中选择一个资源饱和度大于临时边界资源使用者的资源饱和度的资源使用者,将该资源使用者作为临时边界资源使用者。If the second inequality is not established, select a resource user whose resource saturation is greater than that of the temporary border resource user among the sorted resource users, and use this resource user as the temporary border resource user.
可选地,Optionally,
所述以所述资源使用者的资源饱和度为依据,对所述资源使用者进行排序的方法包括:以资源使用者资源分配相关数据,形成一个树节点,按照资源饱和度的大小插入排序二叉树中或更新排序二叉树中存储该资源使用者的数据节点,并通过调整所述排序二叉树的节点之间位置和相互关系,保持所述二叉树仍为排序二叉树;所述资源使用者资源分配相关数据包括资源使用者的资源饱和度,申请资源量和最大资源配额量;The method for sorting the resource users based on the resource saturation of the resource users includes: forming a tree node based on resource allocation related data of the resource users, inserting and sorting the binary tree according to the resource saturation Store the data nodes of the resource user in or update the sorted binary tree, and maintain the binary tree as a sorted binary tree by adjusting the positions and relationships between the nodes of the sorted binary tree; the resource allocation related data of the resource user includes The resource saturation of resource users, the amount of requested resources and the maximum resource quota;
相应地,所述将所述排序的资源使用者中的一个资源使用者作为临时边界资源使用者的方法包括:将所述排序的二叉树的根节点所存储的资源使用者作为临时边界资源使用者;Correspondingly, the method for using one of the sorted resource users as a temporary border resource user includes: using the resource user stored in the root node of the sorted binary tree as a temporary border resource user ;
相应地,所述则在所述排序的资源使用者中选择一个资源饱和度小于临时边界资源使用者的资源饱和度的资源使用者的方法如下:在所述排序二叉树中选择资源饱和度小于或等于临时边界资源使用者的资源饱和度一侧的直接子节点所对应的资源使用者;Correspondingly, the method for selecting a resource user whose resource saturation is less than the resource saturation of the temporary boundary resource user among the sorted resource users is as follows: select a resource saturation less than or Equal to the resource user corresponding to the direct child node on the resource saturation side of the temporary boundary resource user;
相应地,所述在所述排序的资源使用者中选择一个资源饱和度大于临时边界资源使用者的资源饱和度的资源使用者的方法如下:在所述排序二叉树中选择资源饱和度大于临时边界资源使用者的资源饱和度一侧的直接子节点所对应的资源使用者。Correspondingly, the method for selecting a resource user whose resource saturation is greater than the resource saturation of the temporary boundary resource user among the sorted resource users is as follows: select a resource saturation greater than the temporary boundary in the sorted binary tree The resource user corresponding to the direct child node on the resource saturation side of the resource user.
可选地,所述资源使用者资源分配相关数据还包括:资源饱和度小于或等于该资源使用者的资源饱和度的资源使用者的申请资源量之和和资源饱和度大于该资源使用者的资源饱和度的资源使用者的最大资源配额量之和。Optionally, the data related to the resource allocation of the resource user further includes: the sum of the application resources of resource users whose resource saturation is less than or equal to the resource saturation of the resource user and the resource saturation of the resource user greater than the resource saturation of the resource user The sum of the maximum resource quotas of the resource users of resource saturation.
可选地,Optionally,
所述以所述资源使用者的资源饱和度为依据,对所述资源使用者进行排序的方法包括:以资源使用者资源分配相关数据,形成一个树节点,按照资源饱和度的大小插入排序二叉树中或更新排序二叉树中存储该资源使用者的数据节点,并通过调整所述排序二叉树的节点之间位置和相互关系,保持所述二叉树仍为排序二叉树;所述资源使用者资源分配相关数据包括资源使用者的资源饱和度,申请资源量和最大资源配额量。The method for sorting the resource users based on the resource saturation of the resource users includes: forming a tree node based on resource allocation related data of the resource users, inserting and sorting the binary tree according to the resource saturation Store the data nodes of the resource user in or update the sorted binary tree, and maintain the binary tree as a sorted binary tree by adjusting the positions and relationships between the nodes of the sorted binary tree; the resource allocation related data of the resource user includes The resource saturation of resource users, the amount of requested resources and the maximum amount of resource quota.
可选地,Optionally,
所述资源使用者资源分配相关数据还包括:资源饱和度小于或等于该资源使用者的资源饱和度的资源使用者的申请资源量之和和资源饱和度大于该资源使用者的资源饱和度的资源使用者的最大资源配额量之和。The data related to the resource allocation of the resource user further includes: the sum of the application resources of the resource users whose resource saturation is less than or equal to the resource saturation of the resource user and the resource saturation of the resource user whose resource saturation is greater than the resource saturation of the resource user The sum of the maximum resource quotas of resource users.
本申请提供的一种计算机系统资源分配方法,包括以下步骤:A method for allocating computer system resources provided by the present application includes the following steps:
获取系统资源总量和有权提出资源申请请求的资源使用者的资源分配相关数据,所述资源使用者的资源分配相关数据包括资源使用者的最小资源配额量,最大资源配额量和申请资源量;Obtain the total amount of system resources and resource allocation-related data of resource users who have the right to request resource applications. The resource allocation-related data of resource users includes the resource user's minimum resource quota, maximum resource quota, and resource application ;
利用所述资源使用者的申请资源量减掉最小资源配额量的差除以最大资源配额量,计算得出该资源使用者的资源饱和度;calculating the resource saturation of the resource user by dividing the difference between the resource user's application resource amount minus the minimum resource quota amount by the maximum resource quota amount;
以所述资源使用者的资源饱和度为依据,对申请资源量大于其最小资源配额量的资源使用者进行排序;Based on the resource saturation of the resource users, sort the resource users whose application resources are greater than their minimum resource quotas;
将申请资源量小于或等于其最小资源配额量的资源使用者,称为A类资源使用者;根据资源使用者排序,以设定条件确定一个边界资源使用者,对于资源饱和度小于或等于所述边界资源使用者的资源饱和度的资源使用者,称为B类资源使用者;将资源饱和度大于该边界资源使用者的资源饱和度的资源使用者称为C类资源使用者;Resource users whose application resource amount is less than or equal to their minimum resource quota are called A-type resource users; according to the order of resource users, a boundary resource user is determined by setting conditions. For resource saturation less than or equal to all A resource user whose resource saturation is above the boundary resource user is called a B-type resource user; a resource user whose resource saturation is greater than the resource saturation of the boundary resource user is called a C-type resource user;
对A类资源使用者和B类资源使用者,以其申请资源量作为其资源配额向其分配资源;对于C类资源使用者,将系统资源总量减去所述按照为A类资源使用者和B类资源使用者分配的所有资源量后,再减去所有C类资源使用者的最小资源配额量的总和后,获得剩余资源量;将所述剩余资源量,按照该C类资源使用者的最大资源配额量占所有C类资源使用者的最大资源配额量的总和的比例,作为其超出最小资源配额量的资源分配量,以所述其超出最小资源配额量的资源分配量加上该C类资源使用者的最小资源配额量的和作为该C类资源使用者的资源配额向其分配资源。For Type A resource users and Type B resource users, resources are allocated to them based on the amount of resources they apply for as their resource quota; for Type C resource users, the total amount of system resources minus the above is used as a Type A resource user After subtracting the sum of the minimum resource quotas of all Class C resource users from all resources allocated by Class B resource users, the remaining resource amount is obtained; The ratio of the maximum resource quota of all C-type resource users to the sum of the maximum resource quotas of all C-type resource users is taken as the resource allocation exceeding the minimum resource quota, and the above-mentioned resource allocation exceeding the minimum resource quota plus the The sum of the minimum resource quota of the C-type resource user is used as the resource quota of the C-type resource user to allocate resources to it.
可选地,所述设定的条件为所述边界资源使用者的数据满足下述不等式三和不等式四,Optionally, the set condition is that the data of the boundary resource user satisfies the following Inequality 3 and Inequality 4,
不等式三:Inequality three:
不等式四:Inequality four:
其中in
ToatalResource:系统资源总量;Requestk:申请资源量小于或等于其最小资源配额量的第k个资源使用者的申请资源量;MinQuotai:资源饱和度小于或等于边界资源使用者的资源饱和度,且申请资源量大于其最小资源配额量的,除边界资源使用者以外的其他B类资源使用者中第i个B类资源使用者的最小资源配额量;Requesti:资源饱和度小于或等于边界资源使用者的资源饱和度,且申请资源量大于其最小资源配额量的,除边界资源使用者以外的其他B类资源使用者中第i个B类资源使用者的申请资源量;MaxQuotaj:资源饱和度大于边界资源使用者的资源饱和度,且申请资源量大于其最小资源配额量的第j个C类资源使用者的最大资源配额量;MinQuotaj:资源饱和度大于边界资源使用者的资源饱和度,且申请资源量大于其最小资源配额量的第j个C类资源使用者的最小资源配额量;Requesth:边界资源使用者的申请资源量;MaxQuotah:边界资源使用者的最大资源配额量;MinQuatah:边界资源使用者的最小资源配额量;Requesth+1:所述排序的资源使用者中,资源饱和度小于任一其他资源饱和度大于边界资源使用者的资源饱和度的资源使用者的资源饱和度,但大于边界资源使用者的资源饱和度的C类资源使用者的申请资源量;MaxQuotah+1:所述排序的资源使用者中,资源饱和度小于任一其他资源饱和度大于边界资源使用者的资源饱和度的资源使用者的资源饱和度,但大于边界资源使用者的资源饱和度的C类资源使用者的最大资源配额量;MinQuotah+1:所述排序的资源使用者中,资源饱和度小于任一其他资源饱和度大于边界资源使用者的资源饱和度的资源使用者的资源饱和度,但大于边界资源使用者的资源饱和度的C类资源使用者的最小资源配额量;s:系统内申请资源量小于或等于其最小资源配额量的A类资源使用者的数量;m:系统内资源饱和度小于或等于边界资源使用者的资源饱和度,且申请资源量大于其最小资源配额量的,除边界资源使用者以外的其他B类资源使用者的数量;n:系统内资源饱和度大于边界资源使用者的资源饱和度的C类资源使用者的数量;∑:求和运算。ToatalResource: the total amount of system resources; Request k : the application resource amount of the kth resource user whose application resource amount is less than or equal to its minimum resource quota; MinQuota i : resource saturation is less than or equal to the resource saturation of the boundary resource user , and the amount of applied resources is greater than its minimum resource quota, the minimum resource quota of the i-th B-type resource user among other B-type resource users except boundary resource users; Request i : resource saturation is less than or equal to Resource saturation of border resource users, and if the amount of applied resources is greater than its minimum resource quota, the application resource amount of the i-th class B resource user among other B resource users except border resource users; MaxQuota j : The resource saturation is greater than the resource saturation of the boundary resource user, and the maximum resource quota of the jth class C resource user whose application resource is greater than the minimum resource quota; MinQuota j : The resource saturation is greater than the boundary resource user resource saturation, and the minimum resource quota of the jth class C resource user whose application resource is greater than its minimum resource quota; Request h : the application resource amount of the border resource user; MaxQuota h : the border resource user’s The maximum resource quota; MinQuata h : the minimum resource quota of the boundary resource user; Request h+1 : among the sorted resource users, the resource saturation is smaller than any other resource saturation and greater than the resource saturation of the boundary resource user degree of resource saturation of resource users, but greater than the resource saturation of boundary resource users, the application resource amount of class C resource users; MaxQuota h+1 : Among the sorted resource users, the resource saturation is less than any - The resource saturation of other resource users whose resource saturation is greater than the resource saturation of the boundary resource user, but the maximum resource quota of the C-type resource users whose resource saturation is greater than the resource saturation of the boundary resource user; MinQuota h+1 : Among the sorted resource users, the resource saturation is less than the resource saturation of any other resource user whose resource saturation is greater than the resource saturation of the border resource user, but greater than the resource saturation of the border resource user Class C The minimum resource quota of resource users; s: the number of Class A resource users whose application resources in the system are less than or equal to their minimum resource quota; m: the resource saturation in the system is less than or equal to the resource saturation of boundary resource users degree, and the amount of applied resources is greater than its minimum resource quota, the number of other B-type resource users except boundary resource users; n: C-type resources whose resource saturation in the system is greater than the resource saturation of boundary resource users The number of users; ∑: sum operation.
可选地,所述根据资源使用者排序,以设定条件确定一个边界资源使用者的方法包括:Optionally, the method of determining a boundary resource user by setting conditions according to the sorting of resource users includes:
将所述排序的资源使用者中的一个资源使用者作为临时边界资源使用者;using one of the sorted resource users as a temporary boundary resource user;
将临时边界资源使用者作为边界资源使用者代入所述不等式三和不等式四,若两个不等式都成立,则该临时资源使用者为边界资源使用者;若两个不等式不能都成立,则将所述排序的资源使用者中的另外一个资源使用者作为临时边界资源使用者,返回执行“将临时边界资源使用者作为边界资源使用者代入不等式三和不等式四”的步骤。Substituting the temporary boundary resource user as the boundary resource user into the above inequality 3 and inequality 4, if the two inequalities are both established, then the temporary resource user is the boundary resource user; if the two inequalities cannot both be established, then all Another resource user among the resource users sorted above acts as a temporary border resource user, and returns to the step of "substituting the temporary border resource user as a border resource user into Inequality 3 and Inequality 4".
可选地,所述将所述排序的资源使用者中的另外一个资源使用者作为临时边界资源使用者的方法包括:Optionally, the method for using another resource user among the sorted resource users as a temporary boundary resource user includes:
若不等式三不成立,则在所述排序的资源使用者中选择一个资源饱和度小于临时边界资源使用者的资源饱和度的资源使用者,将该资源使用者的数据作为临时边界资源使用者的数据;If Inequality 3 is not established, then select a resource user whose resource saturation is less than that of the temporary border resource user among the sorted resource users, and use the data of the resource user as the data of the temporary border resource user ;
若不等式四不成立,则在所述排序的资源使用者中选择一个资源饱和度大于临时边界资源使用者的资源饱和度的资源使用者,将该资源使用者的数据作为临时边界资源使用者的数据。If inequality four is not established, then select a resource user whose resource saturation is greater than the resource saturation of the temporary border resource user among the resource users of the sorting, and use the data of the resource user as the data of the temporary border resource user .
可选地,Optionally,
所述以所述资源使用者的资源饱和度为依据,对申请资源量大于其最小资源配额量的资源使用者进行排序的方法包括:以资源使用者资源分配相关数据The method for sorting resource users whose application resources are greater than their minimum resource quotas based on the resource saturation of the resource users includes: using resource allocation related data of resource users
成一个树节点按照资源饱和度的大小插入排序二叉树中或更新排序二叉树中存储该资源使用者的数据节点,并通过调整所述排序二叉树的节点之间位置和相互关系,保持所述二叉树仍为排序二叉树;所述资源使用者资源分配相关数据包括资源使用者的资源饱和度,申请资源量,最小资源配额量和最大资源配额量;Form a tree node into a sorted binary tree according to the size of resource saturation or update the sorted binary tree to store the resource user’s data node, and by adjusting the position and relationship between the nodes of the sorted binary tree, keep the binary tree still as Sort the binary tree; the data related to the resource allocation of the resource user includes the resource saturation of the resource user, the amount of applied resources, the minimum resource quota and the maximum resource quota;
相应地,所述将所述排序的资源使用者中的一个资源使用者作为临时边界资源使用者的方法包括:将所述排序的二叉树的根节点所存储的资源使用者作为临时边界资源使用者;Correspondingly, the method for using one of the sorted resource users as a temporary border resource user includes: using the resource user stored in the root node of the sorted binary tree as a temporary border resource user ;
相应地,所述在所述排序的资源使用者中选择一个资源饱和度小于临时边界资源使用者的资源饱和度的资源使用者的方法如下:在所述排序二叉树中选择资源饱和度小于或等于临时边界资源使用者的资源饱和度一侧的直接子节点所对应的资源使用者;Correspondingly, the method for selecting a resource user whose resource saturation is less than the resource saturation of the temporary boundary resource user among the sorted resource users is as follows: select a resource saturation less than or equal to in the sorted binary tree The resource user corresponding to the direct child node on the resource saturation side of the temporary boundary resource user;
相应地,所述在所述排序的资源使用者中选择一个资源饱和度大于临时边界资源使用者的资源饱和度的资源使用者的方法如下:在所述排序二叉树中选择资源饱和度大于临时边界资源使用者的资源饱和度一侧的直接子节点所对应的资源使用者。Correspondingly, the method for selecting a resource user whose resource saturation is greater than the resource saturation of the temporary boundary resource user among the sorted resource users is as follows: select a resource saturation greater than the temporary boundary in the sorted binary tree The resource user corresponding to the direct child node on the resource saturation side of the resource user.
可选地,所述资源使用者资源分配相关数据还包括:资源饱和度小于或等于该资源使用者的资源饱和度的资源使用者的申请资源量之和,资源饱和度小于或等于该资源使用者的资源饱和度的资源使用者的最小资源配额量之和,资源饱和度大于该资源使用者的资源饱和度的资源使用者的最大资源配额量之和,资源饱和度大于该节点所对应的资源使用者的资源饱和度的资源使用者的最小资源配额量之和,和申请资源量小于其最小配额量的资源使用者的申请资源量之和。Optionally, the resource user resource allocation-related data further includes: the sum of resource applications of resource users whose resource saturation is less than or equal to the resource saturation of the resource user, and the resource saturation is less than or equal to the resource usage The sum of the minimum resource quotas of the resource users whose resource saturation is greater than the resource saturation of the resource user, the sum of the maximum resource quotas of the resource users whose resource saturation is greater than the resource saturation of the resource user, and the resource saturation greater than the node corresponding to The sum of the minimum resource quotas of the resource users whose resources are saturated, and the sum of the application resources of the resource users whose application resources are less than their minimum quotas.
可选地,Optionally,
所述以所述资源使用者的资源饱和度为依据,对申请资源量大于其最小资源配额量的资源使用者进行排序的方法包括:以资源使用者资源分配相关数据,形成一个树节点按照资源饱和度的大小插入排序二叉树中或更新排序二叉树中存储该资源使用者的数据节点,并通过调整所述排序二叉树的节点之间位置和相互关系,保持所述二叉树仍为排序二叉树;所述资源使用者资源分配相关数据包括:资源使用者的资源饱和度,申请资源量,最小资源配额量和最大资源配额量。Based on the resource saturation of the resource users, the method for sorting the resource users whose application resources are greater than their minimum resource quotas includes: using the data related to the resource allocation of the resource users to form a tree node according to the resources The size of the saturation is inserted into the sorted binary tree or updated into the sorted binary tree to store the data nodes of the resource user, and by adjusting the position and relationship between the nodes of the sorted binary tree, the binary tree is still a sorted binary tree; the resource Data related to user resource allocation includes: resource saturation of resource users, amount of requested resources, minimum resource quota and maximum resource quota.
可选地,所述资源使用者资源分配相关数据还包括:Optionally, the resource user resource allocation-related data further includes:
资源饱和度小于或等于该资源使用者的资源饱和度的资源使用者的申请资源量之和,资源饱和度小于或等于该资源使用者的资源饱和度的资源使用者的最小资源配额量之和,资源饱和度大于该资源使用者的资源饱和度的资源使用者的最大资源配额量之和,资源饱和度大于该节点所对应的资源使用者的资源饱和度的资源使用者的最小资源配额量之和,和申请资源量小于其最小配额量的资源使用者的申请资源量之和。The sum of the application resources of the resource users whose resource saturation is less than or equal to the resource saturation of the resource user, and the sum of the minimum resource quotas of the resource users whose resource saturation is less than or equal to the resource saturation of the resource user , the sum of the maximum resource quotas of the resource users whose resource saturation is greater than the resource saturation of the resource user, and the minimum resource quota of the resource users whose resource saturation is greater than the resource saturation of the resource user corresponding to the node and the sum of resource requests of resource users whose application resources are less than their minimum quota.
本申请提供的一种计算机系统资源分配装置,包括:A computer system resource allocation device provided by the present application includes:
获取单元,用于获取系统资源总量和有权提出资源申请请求的资源使用者的资源分配相关数据,所述资源使用者的资源分配相关数据包括资源使用者的最大资源配额量和申请资源量;An acquisition unit, configured to acquire the total amount of system resources and resource allocation-related data of resource users who have the right to make resource application requests, and the resource allocation-related data of resource users includes the resource user's maximum resource quota and application resource amount ;
资源饱和度计算单元,用于利用所述资源使用者的申请资源量除以最大资源配额量,计算得出资源使用者的资源饱和度;A resource saturation calculation unit, configured to calculate the resource saturation of the resource user by dividing the amount of resources requested by the resource user by the maximum resource quota;
排序单元,用于以所述资源使用者的资源饱和度为依据,对所述资源使用者进行排序;a sorting unit, configured to sort the resource users based on the resource saturation of the resource users;
分类单元,用于根据资源使用者排序,以设定条件确定一个边界资源使用者,将资源饱和度小于等于所述边界资源使用者的资源使用者,称为B类资源使用者;将资源饱和度大于该边界资源使用者的资源使用者称为C类资源使用者;The classification unit is used to sort resource users, determine a boundary resource user by setting conditions, and classify resource users whose resource saturation is less than or equal to the boundary resource user as B-type resource users; saturate resources A resource user whose degree is greater than the boundary resource user is called a class C resource user;
资源分配单元,用于,对B类资源使用者,以其申请资源量作为其资源配额向其分配资源;对于C类资源使用者,将系统资源总量减去所述按照为B类资源使用者分配的所有资源量后,获得剩余资源量;将所述剩余资源量,按照该C类资源使用者的最大资源配额量占所有C类资源使用者的最大资源配额量的总和的比例,作为其资源配额,以所述的资源配额向该C类资源使用者分配资源。The resource allocation unit is used to allocate resources to Class B resource users using their application resource amount as their resource quota; for Class C resource users, subtract the total amount of system resources from the above-mentioned resources to use Class B resources After all the resources allocated by the user, the remaining resources are obtained; the remaining resources are calculated as For its resource quota, allocate resources to the C-type resource user according to the resource quota.
本申请提供的一种计算机系统资源分配装置,包括:A computer system resource allocation device provided by the present application includes:
获取单元,用于获取系统资源总量和有权提出资源申请请求的资源使用者的资源分配相关数据,所述资源使用者的资源分配相关数据包括资源使用者的最小资源配额量,最大资源配额量和申请资源量;The obtaining unit is used to obtain the total amount of system resources and resource allocation-related data of resource users who have the right to make resource application requests. The resource allocation-related data of resource users includes the resource user's minimum resource quota and maximum resource quota amount and application resources;
资源饱和度计算单元,用于利用所述资源使用者的申请资源量减掉最小资源配额量的差除以最大资源配额量,计算得出该资源使用者的资源饱和度;The resource saturation calculation unit is used to calculate the resource saturation of the resource user by dividing the difference between the resource user's application resource amount minus the minimum resource quota amount by the maximum resource quota amount;
排序单元,用于以所述资源使用者的资源饱和度为依据,对申请资源量大于其最小资源配额量的资源使用者进行排序;A sorting unit, configured to sort resource users whose application resources are greater than their minimum resource quotas based on the resource saturation of the resource users;
分类单元,用于将申请资源量小于或等于其最小资源配额量的资源使用者,称为A类资源使用者;根据资源使用者排序,以设定条件确定一个边界资源使用者,对于资源饱和度小于或等于所述边界资源使用者的资源饱和度的资源使用者,称为B类资源使用者;将资源饱和度大于该边界资源使用者的资源饱和度的资源使用者称为C类资源使用者;The taxonomy unit is used to classify resource users whose application resources are less than or equal to their minimum resource quotas as Class A resource users; sort resource users to determine a boundary resource user by setting conditions. For resource saturation A resource user whose resource saturation degree is less than or equal to the resource saturation degree of the boundary resource user is called a type B resource user; a resource user whose resource saturation degree is greater than the resource saturation degree of the boundary resource user is called a type C resource user;
资源分配单元,用于对A类资源使用者和B类资源使用者,以其申请资源量作为其资源配额向其分配资源;对于C类资源使用者,将系统资源总量减去所述按照为A类资源使用者和B类资源使用者分配的所有资源量后,再减去所有C类资源使用者的最小资源配额量的总和后,获得剩余资源量;将所述剩余资源量,按照该C类资源使用者的最大资源配额量占所有C类资源使用者的最大资源配额量的总和的比例,作为其超出最小资源配额量的资源分配量,以所述其超出最小资源配额量的资源分配量加上该C类资源使用者的最小资源配额量的和作为该C类资源使用者的资源配额向其分配资源。The resource allocation unit is used to allocate resources to Class A resource users and Class B resource users using their application resources as their resource quotas; for Class C resource users, subtract the total system resources according to After subtracting the sum of the minimum resource quotas of all Class C resource users from all the resources allocated to Class A resource users and Class B resource users, the remaining resource amount is obtained; the remaining resource amount is calculated according to The proportion of the maximum resource quota of the C-type resource user to the sum of the maximum resource quotas of all C-type resource users is taken as the resource allocation amount exceeding the minimum resource quota, and the ratio of the exceeding minimum resource quota The sum of the resource allocation amount plus the minimum resource quota amount of the C-type resource user is used as the resource quota of the C-type resource user to allocate resources to it.
与现有技术相比,本申请具有以下优点:Compared with the prior art, the present application has the following advantages:
本申请的技术方案引入资源饱和度概念,根据资源使用者的资源饱和度将资源使用者排序,在排序的资源使用者中查找边界资源使用者,利用资源使用者的资源饱和度与边界资源使用者的资源饱和度的比较结果,快速计算出资源使用者的资源配额,将计算资源使用者的资源配额的时间复杂度从O(n2)降低到O(log n)的级别(所述n为使用者数量)。起到降低计算资源使用者的资源配额的时间复杂度,满足实时计算的要求的作用,同时仅需计算申请资源的资源使用者的资源配额而无需计算所有资源使用者的资源配额,进一步加快对资源使用者的资源分配的效果。The technical solution of this application introduces the concept of resource saturation, sorts resource users according to their resource saturation, searches for boundary resource users among the sorted resource users, and utilizes resource saturation and boundary resource usage of resource users The comparison result of the resource saturation of the user can quickly calculate the resource quota of the resource user, and reduce the time complexity of calculating the resource quota of the resource user from O(n 2 ) to the level of O(log n) (the n is the number of users). It can reduce the time complexity of calculating the resource quotas of resource users and meet the requirements of real-time computing. At the same time, it is only necessary to calculate the resource quotas of resource users who apply for resources instead of calculating the resource quotas of all resource users, further speeding up the processing of resources. The effect of resource allocation on resource consumers.
另外本申请的另一技术方案除了具备上述方案的技术特征外,针对资源使用者配置了最小资源配额量的情况,不仅能够达到上述降低计算资源使用者的资源配额的时间复杂度,满足实时计算的要求和无需计算所有资源使用者的资源配额的效果,还能够起到满足资源使用者的最小资源配额量配置的作用。In addition, in addition to the technical features of the above-mentioned solution, another technical solution of the present application can not only achieve the above-mentioned reduction in the time complexity of computing resource users' resource quotas, but also meet the requirements of real-time computing. The requirements and the effect of not needing to calculate the resource quotas of all resource users can also play a role in satisfying the minimum resource quota allocation of resource users.
附图说明Description of drawings
图1是本申请第一实施例一种计算机系统资源分配方法的实施例的流程示意图;FIG. 1 is a schematic flowchart of an embodiment of a method for allocating computer system resources according to the first embodiment of the present application;
图2是本申请第二实施例一种计算机系统资源分配装置的实施例的结构框图;FIG. 2 is a structural block diagram of an embodiment of a computer system resource allocation device according to the second embodiment of the present application;
图3是本申请第三实施例一种计算机系统资源分配方法的实施例的流程示意图;FIG. 3 is a schematic flowchart of an embodiment of a computer system resource allocation method according to the third embodiment of the present application;
图4是本申请第四实施例一种计算机系统资源分配装置的实施例的结构框图;Fig. 4 is a structural block diagram of an embodiment of a computer system resource allocation device according to the fourth embodiment of the present application;
具体实施方式Detailed ways
在下面的描述中阐述了很多具体细节以便于充分理解本申请。但是本申请能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本申请内涵的情况下做类似推广,因此本申请不受下面公开的具体实施的限制。In the following description, numerous specific details are set forth in order to provide a thorough understanding of the application. However, the present application can be implemented in many other ways different from those described here, and those skilled in the art can make similar promotions without violating the connotation of the present application. Therefore, the present application is not limited by the specific implementation disclosed below.
本申请的第一实施例提供一种计算机系统资源分配方法,流程示意图如图1所示,包括以下步骤:The first embodiment of the present application provides a computer system resource allocation method, as shown in Figure 1, which includes the following steps:
步骤S101,获取系统资源总量和有权提出资源申请请求的资源使用者的资源分配相关数据,所述资源使用者的资源分配相关数据包括资源使用者的最大资源配额量和申请资源量。Step S101, obtaining the total amount of system resources and resource allocation-related data of resource users who have the right to request resource applications. The resource allocation-related data of resource users includes the resource user's maximum resource quota and resource application.
收到资源使用者申请系统资源的请求后,获取系统资源总量和该资源使用者的与资源分配相关的数据,包括资源使用者的最大资源配额量和其所申请的资源量数据。After receiving a request from a resource user to apply for system resources, obtain the total amount of system resources and data related to resource allocation of the resource user, including the maximum resource quota of the resource user and the data of the resource amount applied for by the resource user.
步骤S102,利用所述资源使用者的申请资源量除以最大资源配额量,计算得出资源使用者的资源饱和度。In step S102, the resource saturation degree of the resource user is calculated by dividing the requested resource amount by the resource user by the maximum resource quota amount.
将资源使用者的申请资源量除以其最大资源配额量的值作为其资源饱和度的值。The resource saturation value is calculated by dividing the requested resource amount of the resource user by its maximum resource quota.
步骤S103,以所述资源使用者的资源饱和度为依据,对所述资源使用者进行排序。Step S103, sorting the resource users based on the resource saturation of the resource users.
根据资源使用者的资源饱和度大小,进行排序。对资源使用者进行排序的方法可以有多种,本实施例中当收到新的申请资源的请求时,该资源使用者若为第一次申请资源,则系统还没有为该资源使用者进行过排序,相应的排序的数据存储结构中不包含该资源使用者的任何数据,这时将该资源使用者的数据包括最大资源配额量,申请资源量,资源饱和度作为一个数据节点,插入按照资源使用者的资源饱和度排序的排序二叉树。Sort according to the resource saturation of resource users. There are many ways to sort resource users. In this embodiment, when a new resource application request is received, if the resource user is applying for resources for the first time, the system has not yet arranged for the resource user. After sorting, the corresponding sorted data storage structure does not contain any data of the resource user. At this time, the data of the resource user includes the maximum resource quota, the amount of requested resources, and the resource saturation as a data node, and inserted according to A sorted binary tree sorted by resource saturation of resource consumers.
所述二叉树中每个节点与其直接相连的上一级节点称为该节点的父节点,与其直接相连的下一级节点称为该节点的直接子节点。该二叉树中的任一节点的一侧直接子节点所存储的资源使用者的资源饱和度小于该节点所存储的资源使用者的资源饱和度,该节点的另外一侧的直接子节点所存储的资源使用者的资源饱和度大于该节点所存储的资源使用者的资源饱和度。The parent node directly connected to each node in the binary tree is called the node's parent node, and the next-level node directly connected to it is called the direct child node of the node. The resource saturation of the resource user stored in the direct child node of any node in the binary tree is less than the resource saturation of the resource user stored in the node, and the resource saturation stored in the direct child node of the other side of the node is The resource saturation of the resource user is greater than the resource saturation of the resource user stored in the node.
将申请资源的资源使用者的数据插入二叉树时,通过旋转节点的位置和相互关系,能够使得插入节点后的二叉树仍然是按照资源饱和度排序的二叉树。When inserting the data of resource users applying for resources into the binary tree, by rotating the position and relationship of the nodes, the binary tree after inserting the nodes can still be a binary tree sorted according to resource saturation.
当收到新的申请资源的请求时,若该资源使用者不是第一次申请资源,则所述二叉树中已经保存有该资源使用者的数据,这时,仅需更新相应树节点的相关数据,具体为申请资源量和资源饱和度。同时将二叉树的节点做旋转等调整位置和相互关系,使其仍然保持为按照资源饱和度排序的二叉树。When a new resource application request is received, if the resource user is not applying for a resource for the first time, the data of the resource user has already been saved in the binary tree, and at this time, only the relevant data of the corresponding tree node needs to be updated , specifically the application resource amount and resource saturation. At the same time, rotate the nodes of the binary tree and adjust their positions and relationships so that they remain as a binary tree sorted by resource saturation.
步骤S104,根据资源使用者排序,以设定条件确定一个边界资源使用者,将资源饱和度小于等于所述边界资源使用者的资源使用者,称为B类资源使用者;将资源饱和度大于该边界资源使用者的资源使用者称为C类资源使用者。Step S104, according to the ranking of resource users, determine a boundary resource user by setting conditions, and classify resource users whose resource saturation is less than or equal to the boundary resource user as B-type resource users; The resource users of the boundary resource users are called C-type resource users.
本实施例中,在排序的资源使用者中,找出其数据满足下述两个不等式的资源使用者,将其称为边界资源使用者。In this embodiment, among the sorted resource users, find resource users whose data satisfy the following two inequalities, and call them boundary resource users.
不等式一:Inequality one:
不等式二:Inequality two:
其中ToatalResource:系统资源总量;Requesti:资源饱和度小于或等于边界资源使用者的资源饱和度的,除边界资源使用者以外的其他B类资源使用者中第i个B类资源使用者的申请资源量;MaxQuotaj:资源饱和度大于边界资源使用者的资源饱和度的第j个C类资源使用者的最大资源配额量;Requesth:边界资源使用者的申请资源量;MaxQuotah:边界资源使用者的最大资源配额量;Requesth+1:所述排序资源使用者中,资源饱和度小于任一其他C类资源使用者的资源饱和度,但大于边界资源使用者的资源饱和度的C类资源使用者的申请资源量;MaxQuotah+1:所述排序的资源使用者中,资源饱和度小于任一其他C类资源使用者的资源饱和度,但大于边界资源使用者的资源饱和度的C类资源使用者的最大资源配额量;m:系统内资源饱和度小于或等于边界资源使用者的资源饱和度的,除边界资源使用者以外的其他B类资源使用者的数量;n:系统内资源饱和度大于边界资源使用者的资源饱和度的C类资源使用者的数量;∑:求和运算。Among them, ToatalResource: the total amount of system resources; Request i : if the resource saturation is less than or equal to the resource saturation of the border resource user, the i-th class B resource user among other class B resource users except the border resource user Application resource amount; MaxQuota j : the maximum resource quota of the jth class C resource user whose resource saturation is greater than the resource saturation of the boundary resource user; Request h : the application resource amount of the boundary resource user; MaxQuota h : boundary The maximum resource quota of a resource user; Request h+1 : Among the sorted resource users, the resource saturation is less than the resource saturation of any other C-type resource users, but greater than the resource saturation of the boundary resource users The amount of resources requested by a class C resource user; MaxQuota h+1 : Among the resource users sorted, the resource saturation is less than that of any other class C resource user, but greater than the resource saturation of the boundary resource user The maximum resource quota of C-type resource users; m: the number of other B-type resource users except for boundary resource users whose resource saturation in the system is less than or equal to the resource saturation of boundary resource users; n : The number of C-type resource users whose resource saturation in the system is greater than that of the boundary resource users; ∑: summation operation.
在排序的资源使用者中,将资源饱和度小于或等于该边界使用者的资源饱和度的资源使用者称为B类资源使用者;将资源饱和度大于该边界使用者的资源饱和度的资源使用者成为C类资源使用者。Among the sorted resource users, resource users whose resource saturation is less than or equal to the boundary user's resource saturation are called B-type resource users; resources whose resource saturation is greater than the boundary user's resource saturation The user becomes a class C resource user.
查找所述边界使用者的方法根据资源使用者的数据存储的方式不同可以有不同的方法。本实施例中,针对将资源使用者的数据存储于按照资源饱和度排序的二叉树的方式,首先将所述二叉树的根节点所存储的资源使用者作为临时边界资源使用者,将该临时边界资源使用者的数据作为边界资源使用者的数据,将小于或等于该临时边界资源使用者所在的节点的资源饱和度的一侧的节点的数据作为资源饱和度小于或等于边界资源使用者的资源饱和度的资源使用者的数据;将其另外一侧节点的数据作为资源饱和度大于边界资源使用者的资源饱和度的资源使用者的数据;将另外一侧直接子节点的数据作为资源饱和度仅大于边界资源使用者的资源饱和度的资源使用者的数据。The method of finding the boundary user can be different according to the data storage method of the resource user. In this embodiment, for the method of storing resource user data in a binary tree sorted according to resource saturation, firstly, the resource user stored in the root node of the binary tree is used as a temporary boundary resource user, and the temporary boundary resource The user's data is used as the data of the border resource user, and the data of the node on the side that is less than or equal to the resource saturation of the node where the temporary border resource user is located is taken as the resource saturation of the border resource user is less than or equal to the resource saturation of the border resource user The data of the resource user whose resource saturation is higher than the boundary resource user's data is the data of the node on the other side; the data of the direct child node on the other side is the resource saturation only Data for resource consumers whose resource saturation is greater than the boundary resource consumer.
利用不等式一和不等式二来判断查找所述临时边界资源使用者是否为边界资源使用者。Inequality 1 and Inequality 2 are used to determine whether the temporary border resource user is a border resource user.
若将临时边界资源使用者作为边界资源使用者使得不等式一不成立,则将该临时边界使用者所在的节点的资源饱和度小于或等于其资源饱和度的一侧直接子节点所存储的资源使用者作为临时边界资源使用者。将排序二叉树中新的临时边界资源使用者的数据再次代入不等式一,依此类推,直至某一节点存储的资源使用者的数据作为临时边界资源使用者的数据满足不等式一。再判断该临时边界资源使用者的数据是否满足不等式二。If the temporary boundary resource user is used as the boundary resource user so that Inequality 1 does not hold, then the resource saturation of the node where the temporary boundary user is located is less than or equal to the resource saturation stored in the direct child node As a temporary border resource consumer. Substitute the data of the new temporary boundary resource user in the sorted binary tree into Inequality 1 again, and so on, until the data of the resource user stored in a certain node satisfies Inequality 1 as the data of the temporary boundary resource user. Then judge whether the data of the temporary border resource user satisfies the second inequality.
若将临时边界资源使用者作为边界资源使用者使得不等式二不成立,则将该临时边界使用者所在的节点的资源饱和度大于其资源饱和度的一侧直接子节点所存储的资源使用者作为临时边界资源使用者。将排序二叉树中新的临时边界资源使用者的数据再次代入不等式二,依此类推,直至某一节点存储的资源使用者的数据作为临时边界资源使用者的数据满足不等式二。再判断该临时边界资源使用者的数据是否满足不等式一。If the temporary boundary resource user is used as the boundary resource user so that Inequality 2 does not hold, then the resource saturation of the node where the temporary boundary user is located has a resource saturation greater than its resource saturation stored in the direct child node as the temporary resource user Boundary resource users. Substitute the data of the new temporary boundary resource user in the sorted binary tree into inequality 2 again, and so on, until the data of the resource user stored in a certain node satisfies inequality 2 as the data of the temporary boundary resource user. Then judge whether the data of the temporary border resource user satisfies inequality one.
能够使得不等式一和不等式二都成立的临时边界资源使用者即为边界资源使用者。The temporary boundary resource user who can make both inequality 1 and inequality 2 hold true is the boundary resource user.
将资源饱和度小于或等于所述边界资源使用者的资源饱和度的资源使用者称为B类资源使用者,将资源饱和度大于所述边界资源使用者的资源饱和度的资源使用者称为C类资源使用者。也即在排序的二叉树中边界资源使用者所在节点一侧的节点所存储的为B类资源使用者的数据,另外一侧节点存储的为C类资源使用者的数据。A resource user whose resource saturation is less than or equal to the resource saturation of the boundary resource user is called a type B resource user, and a resource user whose resource saturation is greater than the resource saturation of the boundary resource user is called a class B resource user. Class C resource users. That is to say, in the sorted binary tree, the node on one side of the node where the boundary resource user is located stores the data of the B-type resource user, and the other side node stores the data of the C-type resource user.
根据申请资源的资源使用者的资源饱和度的值,将其归类为相应类的资源使用者。也即,若申请资源的资源使用者的资源饱和度小于或等于边界资源使用者的资源饱和度,则将该申请资源的资源使用者归为B类资源使用者;若申请资源的资源使用者的资源饱和度大于边界资源使用者的资源饱和度,则将该申请资源的资源使用者归为C类资源使用者。According to the resource saturation value of resource users who apply for resources, they are classified as corresponding resource users. That is, if the resource saturation of the resource user applying for the resource is less than or equal to the resource saturation of the boundary resource user, the resource user applying for the resource is classified as a B-type resource user; if the resource user applying for the resource The resource saturation of the resource is greater than the resource saturation of the boundary resource user, and the resource user applying for the resource is classified as a C-type resource user.
步骤S105,对B类资源使用者,以其申请资源量作为其资源配额向其分配资源,对于C类资源使用者,将系统资源总量减去按照所述为B类资源使用者分配的所有资源量后,获得剩余资源量;将所述剩余资源量,按照该C类资源使用者的最大资源配额量占所有C类资源使用者的最大资源配额量的总和的比例,作为其资源配额,以所述的资源配额向该C类资源使用者分配资源。Step S105, for resource users of type B, allocate resources to them based on the amount of resources they apply for as their resource quota; After the resource amount is obtained, the remaining resource amount is obtained; the remaining resource amount is used as the resource quota according to the ratio of the maximum resource quota amount of the C-type resource user to the maximum resource quota amount of all C-type resource users, Allocate resources to the C-type resource users according to the resource quota.
当申请资源的资源使用者属于B类资源使用者时,为其分配其所申请的资源量。When the resource user applying for the resource belongs to the B-type resource user, allocate the amount of the resource applied for to it.
当申请资源的资源使用者为C类资源使用者时,系统资源总量减去所有B类资源使用者的申请资源量的总和后的差为系统剩余资源量。将系统剩余资源量,按照该资源使用者的最大资源配额量占所有C类资源使用者的最大资源配额量的总和的比例分配给该资源使用者作为其资源配额,向其分配资源。即按照如下公式为其分配资源量:When the resource user who applies for resources is a class C resource user, the difference between the total amount of system resources minus the sum of the resources requested by all class B resource users is the remaining resource amount of the system. The remaining resources of the system are allocated to the resource user as their resource quota according to the ratio of the maximum resource quota of the resource user to the sum of the maximum resource quotas of all C-type resource users, and resources are allocated to it. That is, the amount of resources is allocated to it according to the following formula:
资源配额公式一:Resource quota formula 1:
其中Resourcex:资源饱和度大于边界资源使用者的资源饱和度的C类资源使用者x的资源配额;MaxQuotax:资源饱和度大于边界资源使用者的资源饱和度的C类资源使用者x的最大资源配额量;ToatalResource:系统资源总量;Requesth:边界资源使用者的申请资源量;Requesti:资源饱和度小于或等于边界资源使用者的资源饱和度的,除边界资源使用者以外的第i个B类资源使用者的申请资源量;MaxQuotaj:资源饱和度大于边界资源使用者的资源饱和度的第j个C类资源使用者的最大资源配额量;m:系统内资源饱和度小于或等于边界资源使用者的资源饱和度的,除边界资源使用者以外的其他B类资源使用者的数量;n:系统内资源饱和度大于边界资源使用者的资源饱和度的C类资源使用者的数量;∑:求和运算。Among them, Resource x : the resource quota of class C resource user x whose resource saturation is greater than the resource saturation of the border resource user; MaxQuota x : the resource quota of class C resource user x whose resource saturation is greater than the resource saturation of the border resource user Maximum resource quota; ToatalResource: total system resources; Request h : application resource amount of border resource users; Request i : resource saturation less than or equal to the resource saturation of border resource users, except for border resource users The application resource amount of the i-th type B resource user; MaxQuota j : the maximum resource quota of the j-th type C resource user whose resource saturation is greater than the resource saturation of the boundary resource user; m: resource saturation in the system If the resource saturation of the boundary resource user is less than or equal to the resource saturation of the boundary resource user, the number of other B-type resource users except the boundary resource user; n: the use of C-type resources whose resource saturation in the system is greater than the resource saturation of the boundary resource user The number of participants; ∑: summation operation.
为简化计算,在步骤S103中插入或更新树节点时,可以将不等式一和不等式二中的求和项的值分别保存到被插入或更新的节点中,这样,所述排序二叉树的每个节点除保存有资源使用者的最大资源配额量,申请资源量和资源饱和度外,还保存有资源饱和度小于或等于该节点所对应的资源使用者的资源饱和度的资源使用者的申请资源量之和与资源饱和度大于该节点所对应的资源使用者的资源饱和度的资源使用者的最大资源配额量之和。这样,当利用上述不等式一和不等式二查找边界资源使用者和利用资源配额公式一计算资源使用者的资源配额时,能够起到节省时间的效果。For simplifying the calculation, when inserting or updating tree nodes in step S103, the value of the summation item in Inequality 1 and Inequality 2 can be saved respectively in the node being inserted or updating, like this, each node of described sorting binary tree In addition to saving the resource user's maximum resource quota, application resource amount and resource saturation, it also saves the application resource amount of resource users whose resource saturation is less than or equal to the resource saturation of the resource user corresponding to this node The sum and the sum of the maximum resource quota of the resource user whose resource saturation is greater than the resource saturation of the resource user corresponding to the node. In this way, when the above inequality 1 and inequality 2 are used to find the boundary resource user and the resource quota formula 1 is used to calculate the resource quota of the resource user, time can be saved.
在上述的实施例中,提供了一种计算机系统资源分配方法,将计算资源使用者的资源配额的时间复杂度从O(n2)降低到O(log n)的级别(所述n为资源使用者数量)。起到降低计算资源使用者的资源配额的时间复杂度,满足实时计算的要求的作用,同时仅需计算申请资源的资源使用者的资源配额而无需计算所有资源使用者的资源配额,进一步加快对资源使用者的资源分配的效果。与之相对应的,本申请还提供一种计算机系统资源分配装置。请参看图2,其为本申请的一种计算机系统资源分配装置的实施例的结构示意图。由于装置实施例基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。下述描述的装置实施例仅仅是示意性的。In the above-mentioned embodiments, a computer system resource allocation method is provided, which reduces the time complexity of calculating the resource quota of the resource user from O(n 2 ) to the level of O(log n) (where n is the resource number of users). It can reduce the time complexity of calculating the resource quotas of resource users and meet the requirements of real-time computing. At the same time, it is only necessary to calculate the resource quotas of resource users who apply for resources instead of calculating the resource quotas of all resource users, further speeding up the processing of resources. The effect of resource allocation on resource consumers. Correspondingly, the present application also provides a computer system resource allocation device. Please refer to FIG. 2 , which is a schematic structural diagram of an embodiment of an apparatus for allocating computer system resources according to the present application. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and for relevant parts, refer to the part of the description of the method embodiment. The device embodiments described below are illustrative only.
请参考图2,该计算机系统资源分配装置包括获取单元U201,资源饱和度计算单元U202,排序单元U203,分类单元U204和资源分配单元U205。Please refer to FIG. 2 , the computer system resource allocation device includes an acquisition unit U201, a resource saturation calculation unit U202, a sorting unit U203, a classification unit U204 and a resource allocation unit U205.
所述获取单元U201,用于获取系统资源总量和有权提出资源申请请求的资源使用者的资源分配相关数据,所述资源使用者的资源分配相关数据包括资源使用者的最大资源配额量和申请资源量。The acquiring unit U201 is configured to acquire the total amount of system resources and resource allocation-related data of resource users who have the right to make resource application requests, and the resource allocation-related data of resource users includes the resource user's maximum resource quota and The amount of resources requested.
所述资源饱和度计算单元U202,用于利用所述资源使用者的申请资源量除以最大资源配额量,计算得出资源使用者的资源饱和度。The resource saturation calculation unit U202 is configured to calculate the resource saturation of the resource user by dividing the amount of resources requested by the resource user by the maximum resource quota.
所述排序单元U203,用于以所述资源使用者的资源饱和度为依据,对所述资源使用者进行排序。The sorting unit U203 is configured to sort the resource users based on the resource saturation of the resource users.
所述分类单元U204,用于根据资源使用者排序,以设定条件确定一个边界资源使用者,将资源饱和度小于等于所述边界资源使用者的资源使用者,称为B类资源使用者;将资源饱和度大于该边界资源使用者的资源使用者称为C类资源使用者。The classification unit U204 is configured to determine a border resource user by setting conditions according to the sorting of resource users, and classify resource users whose resource saturation is less than or equal to the border resource user as B-type resource users; A resource user whose resource saturation is greater than the boundary resource user is called a C-type resource user.
所述资源分配单元U205,资源分配单元,用于,对B类资源使用者,以其申请资源量作为其资源配额向其分配资源。对于C类资源使用者,将系统资源总量减去所述按照为B类资源使用者分配的所有资源量后,获得剩余资源量。将所述剩余资源量,按照该C类资源使用者的最大资源配额量占所有C类资源使用者的最大资源配额量的总和的比例,作为其资源配额,以所述的资源配额向该C类资源使用者分配资源。The resource allocation unit U205, a resource allocation unit, is configured to allocate resources to the B-type resource users with the amount of resources they apply for as their resource quotas. For resource users of type C, the remaining resource amount is obtained after subtracting the amount of all resources allocated for resource users of type B from the total amount of system resources. The remaining resource amount, according to the ratio of the maximum resource quota of the C-type resource user to the sum of the maximum resource quotas of all C-type resource users, is used as its resource quota, and the resource quota is used to provide the C Class resource users allocate resources.
本申请第三实施例还提供一种计算机系统资源分配方法,其流程示意图如图3所示。包括以下步骤:The third embodiment of the present application also provides a method for allocating computer system resources, the flowchart of which is shown in FIG. 3 . Include the following steps:
步骤S301,获取系统资源总量和有权提出资源申请请求的资源使用者的资源分配相关数据,所述资源使用者的资源分配相关数据包括资源使用者的最小资源配额量,最大资源配额量和申请资源量。Step S301, obtaining the total amount of system resources and resource allocation-related data of resource users who have the right to make resource application requests. The resource allocation-related data of resource users includes the resource user's minimum resource quota, maximum resource quota and The amount of resources requested.
在收到资源使用者申请系统资源的请求后,获取系统资源总量和该资源使用者的与资源分配相关的数据,除包括申请资源量,最大资源配额量外,还包括最小资源配额量。After receiving a request from a resource user to apply for system resources, obtain the total amount of system resources and the resource allocation-related data of the resource user, including not only the amount of requested resources, the maximum resource quota, but also the minimum resource quota.
步骤S302,利用所述资源使用者的申请资源量减掉最小资源配额量的差除以最大资源配额量,计算得出该资源使用者的资源饱和度;Step S302, using the resource user's application resource amount minus the minimum resource quota amount and dividing by the maximum resource quota amount to calculate the resource saturation of the resource user;
将资源使用者的申请资源量减掉最小资源配额后的差值除以其最大资源配额量的值作为该资源使用者的资源饱和度值。对于申请资源量小于等于其最小资源配额量的资源使用者,其资源饱和度的值分别为负数或零,对于申请资源量大于其最小资源配额量的资源使用者,其资源饱和度的值大于零The resource saturation value of the resource user is obtained by dividing the resource user's requested resource amount minus the minimum resource quota by the resource user's maximum resource quota. For resource users whose application resources are less than or equal to their minimum resource quota, the resource saturation values are negative or zero respectively; for resource users whose application resources are greater than their minimum resource quota, their resource saturation values are greater than zero
步骤S303,以所述资源使用者的资源饱和度为依据,对申请资源量大于其最小资源配额量的资源使用者进行排序。Step S303, sorting the resource users whose applied resource amount is greater than their minimum resource quota amount based on the resource saturation of the resource user.
根据资源使用者的资源饱和度值的大小对申请资源量大于其最小资源配额量的资源使用者,也即资源饱和度的值大于零的资源使用者进行排序。According to the value of the resource saturation of the resource user, the resource users whose applied resource amount is greater than their minimum resource quota, that is, the resource users whose resource saturation value is greater than zero, are sorted.
当收到资源使用者申请资源的请求时,若申请资源的资源使用者为第一次申请资源或系统还没有为该资源使用者进行过排序,则相应的排序的数据存储结构中不包含该资源使用者的任何数据,这种情况下将该资源使用者的数据包括最大资源配额量,最小资源配额量,申请资源量,资源饱和度作为一个数据节点,插入按照资源使用者的资源饱和度排序的排序二叉树。When receiving a request from a resource user to apply for a resource, if the resource user applying for the resource is applying for the resource for the first time or the system has not yet sorted the resource user, the corresponding sorted data storage structure does not include the resource user. Any data of the resource user. In this case, the data of the resource user includes the maximum resource quota, the minimum resource quota, the application resource amount, and the resource saturation as a data node, which is inserted according to the resource saturation of the resource user sorted sorted binary tree.
该二叉树中的任一节点的一侧直接子节点所存储的资源使用者的资源饱和度小于或等于该节点所存储的资源使用者的资源饱和度,该节点的另外一侧的直接子节点所存储的资源使用者的资源饱和度大于该节点所存储的资源使用者的资源饱和度。The resource saturation of the resource user stored in the direct child node of any node in the binary tree is less than or equal to the resource saturation of the resource user stored in the node, and the resource saturation stored in the direct child node of the other side of the node is The stored resource saturation of the resource user is greater than the resource saturation of the resource user stored in the node.
将申请资源的资源使用者的数据插入二叉树时,通过旋转节点的位置和相互关系,能够使得插入节点后的二叉树仍然是按照资源饱和度排序的二叉树。When inserting the data of resource users applying for resources into the binary tree, by rotating the position and relationship of the nodes, the binary tree after inserting the nodes can still be a binary tree sorted according to resource saturation.
当收到资源使用者申请资源的请求时,若申请资源的资源使用者不是第一次申请资源,且系统曾经为该资源使用者进行过排序,则相应的排序的数据存储结构中包含该资源使用者的数据,这种情况下仅需更新排序二叉树的相应节点的相关数据,具体为申请资源量和资源饱和度。同时将二叉树的节点做旋转等调整位置和相互关系处理,使其仍然保持为按照资源饱和度排序的二叉树。When receiving a request from a resource user to apply for a resource, if the resource user applying for the resource is not applying for the resource for the first time, and the system has previously sorted the resource user, the corresponding sorted data storage structure will include the resource The user's data, in this case, it is only necessary to update the relevant data of the corresponding node of the sorted binary tree, specifically the application resource amount and resource saturation. At the same time, the nodes of the binary tree are rotated to adjust their positions and relationships, so that they remain as a binary tree sorted by resource saturation.
步骤S304,将申请资源量小于或等于其最小资源配额量的资源使用者,称为A类资源使用者;根据资源使用者排序,以设定条件确定一个边界资源使用者,对于资源饱和度小于或等于所述边界资源使用者的资源饱和度的资源使用者,称为B类资源使用者;将资源饱和度大于该边界资源使用者的资源饱和度的资源使用者称为C类资源使用者。Step S304, classify resource users whose application resource amount is less than or equal to the minimum resource quota amount as class A resource users; determine a boundary resource user by setting conditions according to the ranking of resource users, and for resource saturation less than Or a resource user equal to the resource saturation of the boundary resource user is called a B-type resource user; a resource user whose resource saturation is greater than the resource saturation of the boundary resource user is called a C-type resource user .
对于申请资源量小于其最小或等于资源配额量的资源使用者,将其称为A类资源使用者。For resource users whose application resources are less than their minimum or equal to their resource quota, they are called Class A resource users.
对于申请资源量大于其最小资源配额量的资源使用者,根据资源使用者排序,以设定条件确定一个边界资源使用者。For resource users whose applied resource amount is greater than their minimum resource quota, sort the resource users to determine a boundary resource user by setting conditions.
本实施例中,在排序的资源使用者中,找出其数据满足下述两个不等式的资源使用者,将其称为边界资源使用者。In this embodiment, among the sorted resource users, find resource users whose data satisfy the following two inequalities, and call them boundary resource users.
不等式三:Inequality three:
不等式四:Inequality four:
进一步地,进行合并同类项操作,能够将上述两个不等式简化为下述形式:Further, the above two inequalities can be simplified into the following form by performing the operation of merging similar items:
不等式三:Inequality three:
不等式四:Inequality four:
其中in
ToatalResource:系统资源总量;Requestk:申请资源量小于或等于其最小资源配额量的第k个资源使用者的申请资源量;MinQuotai:资源饱和度小于或等于边界资源使用者的资源饱和度,且申请资源量大于其最小资源配额量的,除边界资源使用者以外的其他B类资源使用者中第i个B类资源使用者的最小资源配额量;Requesti:资源饱和度小于或等于边界资源使用者的资源饱和度,且申请资源量大于其最小资源配额量的,除边界资源使用者以外的其他B类资源使用者中第i个B类资源使用者的申请资源量;MaxQuotaj:资源饱和度大于边界资源使用者的资源饱和度,且申请资源量大于其最小资源配额量的第j个C类资源使用者的最大资源配额量;MinQuotaj:资源饱和度大于边界资源使用者的资源饱和度,且申请资源量大于其最小资源配额量的第j个C类资源使用者的最小资源配额量;Requesth:边界资源使用者的申请资源量;MaxQuotah:边界资源使用者的最大资源配额量;MinQuatah:边界资源使用者的最小资源配额量;Requesth+1:所述排序的资源使用者中,资源饱和度小于任一其他资源饱和度大于边界资源使用者的资源饱和度的资源使用者的资源饱和度,但大于边界资源使用者的资源饱和度的C类资源使用者的申请资源量;MaxQuotah+1:所述排序的资源使用者中,资源饱和度小于任一其他资源饱和度大于边界资源使用者的资源饱和度的资源使用者的资源饱和度,但大于边界资源使用者的资源饱和度的C类资源使用者的最大资源配额量;MinQuotah+1:所述排序的资源使用者中,资源饱和度小于任一其他资源饱和度大于边界资源使用者的资源饱和度的资源使用者的资源饱和度,但大于边界资源使用者的资源饱和度的C类资源使用者的最小资源配额量;s:系统内申请资源量小于或等于其最小资源配额量的A类资源使用者的数量;m:系统内资源饱和度小于或等于边界资源使用者的资源饱和度,且申请资源量大于其最小资源配额量的,除边界资源使用者以外的其他B类资源使用者的数量;n:系统内资源饱和度大于边界资源使用者的资源饱和度的C类资源使用者的数量;∑:求和运算。ToatalResource: the total amount of system resources; Request k : the application resource amount of the kth resource user whose application resource amount is less than or equal to its minimum resource quota; MinQuota i : resource saturation is less than or equal to the resource saturation of the boundary resource user , and the amount of applied resources is greater than its minimum resource quota, the minimum resource quota of the i-th B-type resource user among other B-type resource users except boundary resource users; Request i : resource saturation is less than or equal to Resource saturation of border resource users, and if the amount of applied resources is greater than its minimum resource quota, the application resource amount of the i-th class B resource user among other B resource users except border resource users; MaxQuota j : The resource saturation is greater than the resource saturation of the boundary resource user, and the maximum resource quota of the jth class C resource user whose application resource is greater than the minimum resource quota; MinQuota j : The resource saturation is greater than the boundary resource user resource saturation, and the minimum resource quota of the jth class C resource user whose application resource is greater than its minimum resource quota; Request h : the application resource amount of the border resource user; MaxQuota h : the border resource user’s The maximum resource quota; MinQuata h : the minimum resource quota of the boundary resource user; Request h+1 : among the sorted resource users, the resource saturation is smaller than any other resource saturation and greater than the resource saturation of the boundary resource user degree of resource saturation of resource users, but greater than the resource saturation of boundary resource users, the application resource amount of class C resource users; MaxQuota h+1 : Among the sorted resource users, the resource saturation is less than any - The resource saturation of other resource users whose resource saturation is greater than the resource saturation of the boundary resource user, but the maximum resource quota of the C-type resource users whose resource saturation is greater than the resource saturation of the boundary resource user; MinQuota h+1 : Among the sorted resource users, the resource saturation is less than the resource saturation of any other resource user whose resource saturation is greater than the resource saturation of the border resource user, but greater than the resource saturation of the border resource user Class C The minimum resource quota of resource users; s: the number of Class A resource users whose application resources in the system are less than or equal to their minimum resource quota; m: the resource saturation in the system is less than or equal to the resource saturation of boundary resource users degree, and the amount of applied resources is greater than its minimum resource quota, the number of other B-type resource users except boundary resource users; n: C-type resources whose resource saturation in the system is greater than the resource saturation of boundary resource users The number of users; ∑: sum operation.
将资源饱和度小于等于所述边界资源使用者的资源使用者,称为B类资源使用者;将资源饱和度大于该边界资源使用者的资源使用者称为C类资源使用者。A resource user whose resource saturation is less than or equal to the boundary resource user is called a B-type resource user; a resource user whose resource saturation is greater than the boundary resource user is called a C-type resource user.
查找所述边界使用者的方法根据资源使用者的数据存储的方式不同可以有不同的方法,本实施例中,针对将资源使用者的数据存储于按照资源饱和度排序的二叉树的方式,首先将所述二叉树的根节点所存储的资源使用者作为临时边界资源使用者,将该临时边界资源使用者的数据作为边界资源使用者的数据,将小于该临时边界资源使用者所在的节点的资源饱和度的一侧的节点的数据作为资源饱和度小于或等于边界资源使用者的资源饱和度的资源使用者的数据;将其另外一侧节点的数据作为资源饱和度大于边界资源使用者的资源饱和度的资源使用者的数据;将另外一侧的直接子节点的数据作为资源饱和度仅大于边界资源使用者的资源饱和度的资源使用者的数据。The method of finding the boundary user can be different according to the data storage method of the resource user. In this embodiment, for the method of storing the data of the resource user in a binary tree sorted according to the resource saturation, first of all, the The resource user stored in the root node of the binary tree is used as a temporary boundary resource user, and the data of the temporary boundary resource user is used as the data of the boundary resource user, and the resources smaller than the node where the temporary boundary resource user is located are saturated The data of the nodes on one side of the degree is taken as the data of the resource users whose resource saturation is less than or equal to the resource saturation of the boundary resource users; the data of the nodes on the other side are taken as the resource saturation of the resource saturation of the boundary resource users The data of the resource user whose resource saturation is only greater than the resource saturation of the boundary resource user is the data of the direct child node on the other side.
利用不等式三和不等式四来判断查找所述临时边界资源使用者是否为边界资源使用者。Inequality 3 and Inequality 4 are used to determine whether the temporary border resource user is a border resource user.
若将临时边界资源使用者作为边界资源使用者使得不等式三不成立,则将该临时边界使用者所在的节点的资源饱和度小于或等于其资源饱和度的一侧的直接子节点所存储的资源使用者作为临时边界资源使用者。将排序二叉树中新的临时边界资源使用者的数据再次代入不等式三,依此类推,直至某一节点存储的资源使用者的数据作为临时边界资源使用者的数据满足不等式三。再判断该临时边界资源使用者的数据是否满足不等式四。If the temporary boundary resource user is used as the boundary resource user so that Inequality 3 does not hold, then the resource usage stored in the direct child node on the side where the resource saturation of the node where the temporary boundary user is located is less than or equal to its resource saturation as temporary border resource users. Substitute the data of the new temporary boundary resource user in the sorted binary tree into the third inequality again, and so on, until the data of the resource user stored in a node as the data of the temporary boundary resource user satisfies the third inequality. Then judge whether the data of the temporary border resource user satisfies inequality four.
若将临时边界资源使用者作为边界资源使用者使得不等式四不成立,则将该临时边界使用者所在的节点的资源饱和度大于其资源饱和度的一侧的直接子节点所存储的资源使用者作为临时边界资源使用者。将排序二叉树中新的临时边界资源使用者的数据再次代入不等式四,依此类推,直至某一节点存储的资源使用者的数据作为临时边界资源使用者的数据满足不等式四。再判断该临时边界资源使用者的数据是否满足不等式三。If the temporary boundary resource user is used as the boundary resource user so that Inequality 4 does not hold, then the resource user stored in the direct child node on the side where the node where the temporary boundary user is located has a resource saturation greater than its resource saturation is taken as Temporary border resource consumer. Substitute the data of the new temporary boundary resource user in the sorted binary tree into Inequality 4 again, and so on, until the data of the resource user stored in a certain node satisfies Inequality 4 as the data of the temporary boundary resource user. Then judge whether the data of the temporary border resource user satisfies inequality three.
能够使得不等式三和不等式四都成立的临时边界资源使用者即为边界资源使用者。The temporary boundary resource user who can make both inequality 3 and inequality 4 hold true is the boundary resource user.
将资源饱和度小于或等于所述边界资源使用者的资源饱和度的资源使用者称为B类资源使用者,将资源饱和度大于所述边界资源使用者的资源饱和度的资源使用者称为C类资源使用者。也即在排序的二叉树中边界资源使用者所在节点一侧的节点所存储的为B类资源使用者的数据,另外一侧节点存储的为C类资源使用者的数据。A resource user whose resource saturation is less than or equal to the resource saturation of the boundary resource user is called a type B resource user, and a resource user whose resource saturation is greater than the resource saturation of the boundary resource user is called a class B resource user. Class C resource users. That is to say, in the sorted binary tree, the node on one side of the node where the boundary resource user is located stores the data of the B-type resource user, and the other side node stores the data of the C-type resource user.
根据申请资源的资源使用者的申请资源量,最小资源配额量,最大资源配额量及其资源饱和度的值,将其归类为相应类的资源使用者。也即,若申请资源的资源使用者的申请资源量小于或等于其最小资源配额量,则将该申请资源的资源使用者归为A类资源使用者。若申请资源的资源使用者的申请资源量大于其最小资源配额量,且资源饱和度小于或等于边界资源使用者的资源饱和度,则将该申请资源的资源使用者归为B类资源使用者;若申请资源的资源使用者的申请资源量大于其最小资源配额量,且资源饱和度大于边界资源使用者的资源饱和度,则将该申请资源的资源使用者归为C类资源使用者。According to the application resource amount, the minimum resource quota amount, the maximum resource quota amount and the resource saturation value of the resource user who applies for resources, it is classified into the corresponding class of resource users. That is, if the amount of resources requested by a resource user who applies for resources is less than or equal to the minimum resource quota, the resource user who applies for resources is classified as a type A resource user. If the amount of resources requested by the resource user applying for resources is greater than its minimum resource quota, and the resource saturation is less than or equal to the resource saturation of the border resource user, then the resource user applying for resources is classified as a B-type resource user ; If the requested resource amount of the resource user applying for resources is greater than its minimum resource quota, and the resource saturation is greater than the resource saturation of the border resource user, then the resource user applying for resources is classified as a C-type resource user.
步骤S305,对A类资源使用者和B类资源使用者,以其申请资源量作为其资源配额向其分配资源;对于C类资源使用者,将系统资源总量减去所述按照为A类资源使用者和B类资源使用者分配的所有资源量后,再减去C类使用者的最小资源配额量的总和后,获得剩余资源量;将所述剩余资源量,按照该C类资源使用者的最大资源配额量占所有C类资源使用者的最大资源配额量的总和的比例,作为其超出最小资源配额量的资源分配量,以所述其超出最小资源配额量的资源分配量加上该C类资源使用者的最小资源配额量的和作为该C类资源使用者的资源配额向其分配资源。Step S305, for resource users of type A and resource users of type B, allocate resources to them with the amount of resources they apply for as their resource quota; After subtracting the sum of the minimum resource quotas of C-type users from all the resources allocated by resource users and B-type resource users, the remaining resource amount is obtained; the remaining resource amount is used according to the C-type resource The ratio of the maximum resource quota amount of the user to the sum of the maximum resource quota amounts of all C-type resource users is taken as the resource allocation amount exceeding the minimum resource quota amount, and the above-mentioned resource allocation amount exceeding the minimum resource quota amount plus The sum of the minimum resource quota of the C-type resource user is used as the resource quota of the C-type resource user to allocate resources to it.
当申请资源的资源使用者属于A类或B类资源使用者时,为其分配其所申请的资源量。When the resource user applying for resources belongs to category A or category B resource users, allocate the amount of resources they apply for.
当申请资源的资源使用者为C类资源使用者时,将系统资源总量减掉所有A类资源使用者和B类资源使用者的申请资源量的和后,再减掉所有C类资源使用者的最小资源配额量后的差值作为系统剩余资源量,将系统剩余资源量,按照该资源使用者的最大资源配额量占所有C类资源使用者的最大资源配额量的总和的比例分配给该资源使用者作为其超出最小资源配额量的资源配额,将所述超出其最小资源配额量的资源配额加上其最小资源配额量作为其资源配额,向其分配资源。即按照下述公式为其分配资源量:When the resource user applying for the resource is a class C resource user, subtract the sum of the application resources of all class A resource users and class B resource users from the total system resources, and then subtract all the resource usage of class C The difference after the minimum resource quota of the resource user is used as the remaining resource of the system, and the remaining resource of the system is allocated to the resource user according to the ratio of the maximum resource quota of the resource user to the sum of the maximum resource quota of all C-type resource users. The resource user takes the resource quota exceeding the minimum resource quota as its resource quota, and allocates resources to the resource user by taking the resource quota exceeding the minimum resource quota plus the minimum resource quota as its resource quota. That is, the amount of resources is allocated to it according to the following formula:
资源配额公式二:Resource quota formula 2:
进一步地,对上述公式进行合并同类项的操作,能够将上述资源配额公式二简化为下述形式:Further, the operation of merging similar items on the above formula can simplify the above resource quota formula 2 into the following form:
其中Resourcex:资源饱和度大于边界资源使用者的资源饱和度的C类资源使用者x的资源配额;MinQuotax:资源饱和度大于边界资源使用者的资源饱和度的C类资源使用者x的最小资源配额量;MaxQuotax:资源饱和度大于边界资源使用者的资源饱和度的C类资源使用者x的最大资源配额量;ToatalResource:系统资源总量;Requestk:申请资源量小于其最小资源配额量的第k个A类资源使用者的申请资源量;MinQuotai:资源饱和度小于或等于其边界资源使用者的资源饱和度,且申请资源量大于其最小资源配额量的,除边界资源使用者以外的第i个B类资源使用者的最小资源配额量;Requesti:资源饱和度小于或等于边界资源使用者的资源饱和度,且申请资源量大于其最小资源配额量的,除边界资源使用者以外的第i个B类资源使用者的申请资源量;MaxQuotaj:资源饱和度大于边界资源使用者的资源饱和度的第j个C类资源使用者的最大资源配额量;MinQuotaj:资源饱和度大于边界资源使用者的资源饱和度的第j个C类资源使用者的最小资源配额量;Requesth:边界资源使用者申请资源量;s:系统内申请资源量小于其最小资源配额量的A类资源使用者的数量;m:系统内资源饱和度小于或等于边界资源使用者的资源饱和度,且申请资源量大于其最小资源配额量的,除边界资源使用者以外的B类资源使用者的数量;n:系统内资源饱和度大于边界资源使用者的资源饱和度的C类资源使用者的数量;∑:求和运算。Among them, Resource x : the resource quota of class C resource user x whose resource saturation is greater than the resource saturation of the border resource user; MinQuota x : the resource quota of class C resource user x whose resource saturation is greater than the resource saturation of the border resource user The minimum resource quota; MaxQuota x : the maximum resource quota of class C resource user x whose resource saturation is greater than the resource saturation of the boundary resource user; ToatalResource: the total amount of system resources; Request k : the amount of requested resources is less than its minimum resource The application resource amount of the kth class A resource user of the quota amount; MinQuota i : resource saturation is less than or equal to the resource saturation of its boundary resource user, and the application resource amount is greater than its minimum resource quota amount, except for boundary resources The minimum resource quota of the i-th class B resource user other than the user; Request i : if the resource saturation is less than or equal to the resource saturation of the boundary resource user, and the amount of requested resources is greater than its minimum resource quota, except for the boundary The application resource amount of the i-th class B resource user other than the resource user; MaxQuota j : the maximum resource quota of the j-th class C resource user whose resource saturation is greater than the resource saturation of the boundary resource user; MinQuota j : the minimum resource quota of the jth class C resource user whose resource saturation is greater than the resource saturation of the boundary resource user; Request h : the amount of resources requested by the boundary resource user; s: the amount of resources requested in the system is less than its minimum resource The number of class A resource users with a quota amount; m: If the resource saturation in the system is less than or equal to the resource saturation of boundary resource users, and the amount of applied resources is greater than its minimum resource quota, B other than boundary resource users The number of class resource users; n: the number of class C resource users whose resource saturation in the system is greater than that of the boundary resource users; ∑: summation operation.
为简化计算,在步骤S303中插入或更新树节点时,可以将不等式三和不等式四中的求和项的值分别保存或更新到被插入或更新的节点中,这样,所述排序二叉树的每个节点除保存有资源使用者的最大资源配额量,最小资源配额量,申请资源量和资源饱和度外,还可以保存有下述数据:资源饱和度小于或等于该节点所对应的资源使用者的资源饱和度的资源使用者的申请资源量之和,资源饱和度小于或等于该节点所对应的资源使用者的资源饱和度的资源使用者的最小资源配额量之和,资源饱和度大于该节点所对应的资源使用者的资源饱和度的资源使用者的最大资源配额量之和,资源饱和度大于该节点所对应的资源使用者的资源饱和度的资源使用者的最小资源配额量之和,申请资源量小于其最小配额量的资源使用者的申请资源量之和。这样,当利用上述不等式三和不等式四查找边界资源使用者和利用资源配额公式二计算资源使用者的资源配额时,能够起到节省时间的效果。In order to simplify the calculation, when inserting or updating tree nodes in step S303, the values of the summation items in Inequality 3 and Inequality 4 can be saved or updated respectively in the inserted or updated nodes, so that each of the sorted binary trees In addition to saving the maximum resource quota, minimum resource quota, application resource and resource saturation of the resource user, a node can also save the following data: the resource saturation is less than or equal to the resource user corresponding to the node The sum of the application resources of the resource users whose resource saturation is less than or equal to the resource saturation of the resource user corresponding to the node is the sum of the minimum resource quotas of the resource users, and the resource saturation is greater than the The sum of the maximum resource quotas of resource users corresponding to the resource saturation of the resource user corresponding to the node, and the sum of the minimum resource quotas of resource users whose resource saturation is greater than the resource saturation of the resource user corresponding to the node , the sum of the requested resources of the resource users whose requested resources are less than their minimum quota. In this way, when using the above inequalities 3 and 4 to search for boundary resource users and to use resource quota formula 2 to calculate resource quotas of resource users, time can be saved.
在上述的实施例中,提供了一种计算机系统资源分配方法,不仅能够达到降低计算资源使用者的资源配额的时间复杂度,满足实时计算的要求和无需计算所有资源使用者的资源配额的效果,还能够起到满足资源使用者的最小资源配额量配置的作用。与之相对应的,本申请还提供一种计算机系统资源分配装置。请参看图4,其为本申请的一种计算机系统资源分配装置的实施例的结构示意图。由于装置实施例基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。下述描述的装置实施例仅仅是示意性的。In the above embodiments, a computer system resource allocation method is provided, which can not only reduce the time complexity of calculating the resource quotas of resource users, but also meet the requirements of real-time computing and the effect of not needing to calculate the resource quotas of all resource users , and can also play a role in satisfying the resource user's minimum resource quota configuration. Correspondingly, the present application also provides a computer system resource allocation device. Please refer to FIG. 4 , which is a schematic structural diagram of an embodiment of an apparatus for allocating computer system resources according to the present application. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and for relevant parts, refer to the part of the description of the method embodiment. The device embodiments described below are illustrative only.
本申请提供计算机系统资源分配装置,包括:获取单元U401,资源饱和度计算单元U402,排序单元U403,分类单元U404和资源分配单元U405。The present application provides a computer system resource allocation device, including: an acquisition unit U401, a resource saturation calculation unit U402, a sorting unit U403, a classification unit U404 and a resource allocation unit U405.
所述获取单元U401,用于获取系统资源总量和有权提出资源申请请求的资源使用者的资源分配相关数据,所述资源使用者的资源分配相关数据包括资源使用者的最小资源配额量,最大资源配额量和申请资源量。The acquiring unit U401 is configured to acquire the total amount of system resources and resource allocation-related data of resource users who have the right to make resource application requests, and the resource allocation-related data of resource users includes the resource user's minimum resource quota, The maximum resource quota and the amount of requested resources.
所述资源饱和度计算单元U402,用于利用所述资源使用者的申请资源量减掉最小资源配额量的差除以最大资源配额量,计算得出该资源使用者的资源饱和度。The resource saturation calculation unit U402 is configured to calculate the resource saturation of the resource user by dividing the difference between the resource user's application resource amount minus the minimum resource quota amount by the maximum resource quota amount.
所述排序单元U403,用于以所述资源使用者的资源饱和度为依据,对申请资源量大于其最小资源配额量的资源使用者进行排序。The sorting unit U403 is configured to sort the resource users whose application resources are greater than their minimum resource quotas based on the resource saturation of the resource users.
所述分类单元U404,用于将申请资源量小于或等于其最小资源配额量的资源使用者,称为A类资源使用者;根据资源使用者排序,以设定条件确定一个边界资源使用者,对于资源饱和度小于或等于所述边界资源使用者的资源饱和度的资源使用者,称为B类资源使用者;将资源饱和度大于该边界资源使用者的资源饱和度的资源使用者称为C类资源使用者。The classification unit U404 is used to classify resource users whose application resource amount is less than or equal to the minimum resource quota amount as type A resource users; determine a boundary resource user by setting conditions according to the sorting of resource users, A resource user whose resource saturation is less than or equal to the resource saturation of the boundary resource user is called a type B resource user; a resource user whose resource saturation is greater than the resource saturation of the boundary resource user is called Class C resource users.
所述资源分配单元U405,用于对A类资源使用者和B类资源使用者,以其申请资源量作为其资源配额向其分配资源;对于C类资源使用者,将系统资源总量减去所述按照为A类资源使用者和B类资源使用者分配的所有资源量后,再减去所有C类资源使用者的最小资源配额量的总和后,获得剩余资源量;将所述剩余资源量,按照该C类资源使用者的最大资源配额量占所有C类资源使用者的最大资源配额量的总和的比例,作为其超出最小资源配额量的资源分配量,以所述其超出最小资源配额量的资源分配量加上该C类资源使用者的最小资源配额量的和作为该C类资源使用者的资源配额向其分配资源。The resource allocation unit U405 is used to allocate resources to Class A resource users and Class B resource users using their application resources as their resource quotas; for Class C resource users, subtract the total amount of system resources from After subtracting the sum of the minimum resource quotas of all C-type resource users from the amount of all resources allocated to A-type resource users and B-type resource users, the remaining resource amount is obtained; the remaining resource amount, according to the ratio of the maximum resource quota of the C-type resource user to the sum of the maximum resource quotas of all C-type resource users, as the resource allocation amount exceeding the minimum resource quota, and the above-mentioned minimum resource quota The resource allocation amount of the quota amount plus the minimum resource quota amount of the C-type resource user is used as the resource quota of the C-type resource user to allocate resources to it.
本申请虽然以较佳实施例公开如上,但其并不是用来限定本申请,任何本领域技术人员在不脱离本申请的精神和范围内,都可以做出可能的变动和修改,因此本申请的保护范围应当以本申请权利要求所界定的范围为准。Although the present application is disclosed as above with preferred embodiments, it is not used to limit the present application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the present application The scope of protection should be based on the scope defined by the claims of this application.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。Memory may include non-permanent storage in computer readable media, in the form of random access memory (RAM) and/or nonvolatile memory such as read only memory (ROM) or flash RAM. Memory is an example of computer readable media.
1、计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非暂存电脑可读媒体(transitory media),如调制的数据信号和载波。1. Computer-readable media include permanent and non-permanent, removable and non-removable media. Information storage can be realized by any method or technology. Information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Flash memory or other memory technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cartridge, tape magnetic disk storage or other magnetic storage device or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media excludes non-transitory computer-readable media, such as modulated data signals and carrier waves.
2、本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。2. Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems or computer program products. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Claims (18)
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510571508.1A CN106528287B (en) | 2015-09-09 | 2015-09-09 | Resource for computer system distribution method and device |
TW105106903A TWI690851B (en) | 2015-09-09 | 2016-03-07 | Computer system resource configuration method and device |
PCT/US2016/051113 WO2017044854A1 (en) | 2015-09-09 | 2016-09-09 | System, method, and apparatus for computer system resource allocation |
US15/261,431 US10178042B2 (en) | 2015-09-09 | 2016-09-09 | System, method, and apparatus for computer system resource allocation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510571508.1A CN106528287B (en) | 2015-09-09 | 2015-09-09 | Resource for computer system distribution method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106528287A CN106528287A (en) | 2017-03-22 |
CN106528287B true CN106528287B (en) | 2019-10-29 |
Family
ID=58189570
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510571508.1A Active CN106528287B (en) | 2015-09-09 | 2015-09-09 | Resource for computer system distribution method and device |
Country Status (4)
Country | Link |
---|---|
US (1) | US10178042B2 (en) |
CN (1) | CN106528287B (en) |
TW (1) | TWI690851B (en) |
WO (1) | WO2017044854A1 (en) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10164861B2 (en) | 2015-12-28 | 2018-12-25 | Silver Peak Systems, Inc. | Dynamic monitoring and visualization for network health characteristics |
US10805840B2 (en) | 2008-07-03 | 2020-10-13 | Silver Peak Systems, Inc. | Data transmission via a virtual wide area network overlay |
US9948496B1 (en) | 2014-07-30 | 2018-04-17 | Silver Peak Systems, Inc. | Determining a transit appliance for data traffic to a software service |
US10432484B2 (en) | 2016-06-13 | 2019-10-01 | Silver Peak Systems, Inc. | Aggregating select network traffic statistics |
CN107424001A (en) * | 2017-04-17 | 2017-12-01 | 中国工商银行股份有限公司 | The control method and system of production marketing amount |
US11075801B2 (en) * | 2018-04-17 | 2021-07-27 | Hewlett Packard Enterprise Development Lp | Systems and methods for reconfiguration control using capabilities |
CN110532087B (en) * | 2018-05-24 | 2023-04-07 | 阿里巴巴集团控股有限公司 | Resource allocation method and resource manager |
CN109815021B (en) * | 2018-12-18 | 2021-03-23 | 深圳先进技术研究院 | Resource critical tree method and system for recursive tree modeling program |
US12309078B2 (en) | 2019-08-09 | 2025-05-20 | Oracle International Corporation | System and method for supporting a quota policy language in a cloud infrastructure environment |
US11546271B2 (en) * | 2019-08-09 | 2023-01-03 | Oracle International Corporation | System and method for tag based request context in a cloud infrastructure environment |
CN112883239B (en) * | 2021-01-26 | 2023-07-18 | 北京升哲科技有限公司 | Resource allocation method and device, computer equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101291254A (en) * | 2008-05-30 | 2008-10-22 | 华为技术有限公司 | Method, device and system for resource management |
CN102103522A (en) * | 2009-12-18 | 2011-06-22 | 中兴通讯股份有限公司 | Resource management method and system |
CN103227809A (en) * | 2011-12-19 | 2013-07-31 | 西门子公司 | Method and system for managing resources among different clients for an exclusive use |
CN103473137A (en) * | 2013-09-16 | 2013-12-25 | 东软集团股份有限公司 | Deadly embrace avoidance resource allocating method and system |
Family Cites Families (35)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5455821A (en) * | 1994-11-10 | 1995-10-03 | Motorola, Inc. | Communication system resource allocation method |
US6601083B1 (en) | 1996-08-29 | 2003-07-29 | Frederick John Reznak | Multitasking data processing system and method of controlling allocation of a shared resource |
EP0938714B2 (en) * | 1996-11-22 | 2006-10-04 | @Road, Ltd | Resource allocation |
US6223041B1 (en) * | 1997-08-06 | 2001-04-24 | Nortel Networks Ltd | Dynamic radio resource allocation in a wireless communication system |
US6345287B1 (en) * | 1997-11-26 | 2002-02-05 | International Business Machines Corporation | Gang scheduling for resource allocation in a cluster computing environment |
US6262980B1 (en) * | 1997-12-02 | 2001-07-17 | At&T Corp | Dynamic resource allocation method and apparatus for broadband services in a wireless communications system |
FR2771830B1 (en) * | 1997-12-03 | 2000-02-11 | Remi Despres | DEVICE FOR SHARED MANAGEMENT OF A RESOURCE BETWEEN MULTIPLE USERS |
US6278983B1 (en) * | 1999-01-11 | 2001-08-21 | Owen Edward Ball | Automated resource allocation and management system |
US6483820B1 (en) * | 1999-03-22 | 2002-11-19 | Ericsson Inc. | System and method for dynamic radio resource allocation for non-transparent high-speed circuit-switched data services |
US6907243B1 (en) * | 1999-06-09 | 2005-06-14 | Cisco Technology, Inc. | Method and system for dynamic soft handoff resource allocation in a wireless network |
US6771595B1 (en) * | 1999-08-31 | 2004-08-03 | Intel Corporation | Apparatus and method for dynamic resource allocation in a network environment |
US6714515B1 (en) * | 2000-05-16 | 2004-03-30 | Telefonaktiebolaget Lm Ericsson (Publ) | Policy server and architecture providing radio network resource allocation rules |
US7380039B2 (en) * | 2003-12-30 | 2008-05-27 | 3Tera, Inc. | Apparatus, method and system for aggregrating computing resources |
EP2546765B1 (en) * | 2008-09-19 | 2018-05-09 | Oracle International Corporation | Storage-side storage request management |
US7996546B2 (en) | 2008-10-02 | 2011-08-09 | Ray-V Technologies, Ltd. | Dynamic allocation of a quota of consumer nodes connecting to a resource node of a peer-to-peer network |
EP2360866A1 (en) | 2010-02-12 | 2011-08-24 | Panasonic Corporation | Component carrier activation and deactivation using resource assignments |
FR2959091B1 (en) | 2010-04-16 | 2014-06-20 | Inst Nat Rech Inf Automat | COMPUTER RESOURCE AND INFRASTRUCTURE MANAGEMENT TOOL AND NETWORKS |
EP2771991B1 (en) | 2011-10-24 | 2018-12-19 | LG Electronics Inc. | Method and apparatus for allocating resources in wireless communication system |
CN103095741A (en) * | 2011-10-27 | 2013-05-08 | 阿里巴巴集团控股有限公司 | Handling method and system of distributing limited resources by multi-user |
US9027006B2 (en) | 2012-08-09 | 2015-05-05 | Apple Inc. | Value profiling for code optimization |
US8825550B2 (en) | 2012-08-23 | 2014-09-02 | Amazon Technologies, Inc. | Scaling a virtual machine instance |
US9396030B2 (en) * | 2013-03-13 | 2016-07-19 | Samsung Electronics Co., Ltd. | Quota-based adaptive resource balancing in a scalable heap allocator for multithreaded applications |
US9485196B1 (en) | 2013-08-01 | 2016-11-01 | Juniper Networks, Inc. | Internal packet steering within a wireless access gateway |
CN104714846B (en) | 2013-12-17 | 2018-06-05 | 华为技术有限公司 | Method for processing resource, operating system and equipment |
US9330263B2 (en) | 2014-05-27 | 2016-05-03 | Intuit Inc. | Method and apparatus for automating the building of threat models for the public cloud |
US10057828B2 (en) | 2014-06-02 | 2018-08-21 | Intel IP Corporation | Communication systems and methods |
EP3001761B1 (en) | 2014-09-26 | 2019-10-23 | Alcatel Lucent | Allocating resources to user equipment for uplink cellular and direct device to device communications |
US9483207B1 (en) | 2015-01-09 | 2016-11-01 | Qlogic, Corporation | Methods and systems for efficient caching using an intelligent storage adapter |
US10489444B2 (en) | 2015-04-21 | 2019-11-26 | Style Hunter, Llc | Using image recognition to locate resources |
US10282236B2 (en) | 2015-04-21 | 2019-05-07 | International Business Machines Corporation | Dynamic load balancing for data allocation to servers |
US9894653B2 (en) | 2015-04-24 | 2018-02-13 | Intel IP Corporation | Apparatus, computer readable medium, and method for multi-user request-to-send and clear-to-send in a high efficiency wireless local-area network |
US10623481B2 (en) | 2015-04-27 | 2020-04-14 | Microsoft Technology Licensing, Llc | Balancing resources in distributed computing environments |
EP3089094A1 (en) | 2015-04-29 | 2016-11-02 | Amadeus S.A.S. | Implementing a database of pricing records |
CN106211330B (en) | 2015-04-30 | 2019-09-13 | 华为技术有限公司 | Method, device and system for resource allocation |
WO2016172893A1 (en) | 2015-04-30 | 2016-11-03 | 华为技术有限公司 | Data transmission method and device |
-
2015
- 2015-09-09 CN CN201510571508.1A patent/CN106528287B/en active Active
-
2016
- 2016-03-07 TW TW105106903A patent/TWI690851B/en active
- 2016-09-09 US US15/261,431 patent/US10178042B2/en active Active
- 2016-09-09 WO PCT/US2016/051113 patent/WO2017044854A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101291254A (en) * | 2008-05-30 | 2008-10-22 | 华为技术有限公司 | Method, device and system for resource management |
CN102103522A (en) * | 2009-12-18 | 2011-06-22 | 中兴通讯股份有限公司 | Resource management method and system |
CN103227809A (en) * | 2011-12-19 | 2013-07-31 | 西门子公司 | Method and system for managing resources among different clients for an exclusive use |
CN103473137A (en) * | 2013-09-16 | 2013-12-25 | 东软集团股份有限公司 | Deadly embrace avoidance resource allocating method and system |
Also Published As
Publication number | Publication date |
---|---|
US20170070445A1 (en) | 2017-03-09 |
TW201712537A (en) | 2017-04-01 |
WO2017044854A1 (en) | 2017-03-16 |
TWI690851B (en) | 2020-04-11 |
CN106528287A (en) | 2017-03-22 |
US10178042B2 (en) | 2019-01-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106528287B (en) | Resource for computer system distribution method and device | |
US8726290B2 (en) | System and/or method for balancing allocation of data among reduce processes by reallocation | |
CN106407207B (en) | Real-time newly-added data updating method and device | |
US10680975B2 (en) | Method of dynamic resource allocation for public clouds | |
CN106406987A (en) | Task execution method and apparatus in cluster | |
US20150381453A1 (en) | Integrated global resource allocation and load balancing | |
CN108416615A (en) | A Tree-Based Resource Allocation Method | |
CN109788013B (en) | Method, device and equipment for distributing operation resources in distributed system | |
CN111190696A (en) | Deployment method, system, device and storage medium of Docker container | |
CN109669995A (en) | Data storage, quality calculation method, device, storage medium and server | |
WO2022016833A1 (en) | Graph computing method and apparatus, and device and storage medium | |
CN102306205A (en) | Method and device for allocating transactions | |
CN113835823A (en) | Resource scheduling method and apparatus, electronic device, computer-readable storage medium | |
CN106407007B (en) | Cloud resource configuration optimization method for elastic analysis process | |
CN108845860B (en) | Method and device for managing quota and electronic equipment | |
US12182633B2 (en) | Method, system, computer readable medium, and device for scheduling computational operation based on graph data | |
WO2025103132A1 (en) | Resource allocation | |
Giannoutakis et al. | Evaluation of self‐organizing and self‐managing heterogeneous high performance computing clouds through discrete‐time simulation | |
CN112988367B (en) | Resource allocation method and device, computer equipment and readable storage medium | |
CN106201655B (en) | Virtual machine allocation method and virtual machine allocation system | |
Al-Yatama et al. | Memory allocation algorithm for cloud services | |
CN108197229A (en) | The balance method and system of a kind of data in magnetic disk | |
US7546308B1 (en) | Model and method of an n-tier quality-of-service (QoS) | |
CN103970768B (en) | Obtain the method and system of ranking | |
CN112346861A (en) | Resource allocation method, device, equipment and super-fusion system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | 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 |