WO2014044301A1 - Method and device for allocating resources - Google Patents

Method and device for allocating resources Download PDF

Info

Publication number
WO2014044301A1
WO2014044301A1 PCT/EP2012/068413 EP2012068413W WO2014044301A1 WO 2014044301 A1 WO2014044301 A1 WO 2014044301A1 EP 2012068413 W EP2012068413 W EP 2012068413W WO 2014044301 A1 WO2014044301 A1 WO 2014044301A1
Authority
WO
WIPO (PCT)
Prior art keywords
share
resources
cycle
allocation
time slot
Prior art date
Application number
PCT/EP2012/068413
Other languages
French (fr)
Inventor
Kari SEPPÄNEN
Jorma KILPI
Tapio Suihko
Original Assignee
Nokia Siemens Networks Oy
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nokia Siemens Networks Oy filed Critical Nokia Siemens Networks Oy
Priority to PCT/EP2012/068413 priority Critical patent/WO2014044301A1/en
Publication of WO2014044301A1 publication Critical patent/WO2014044301A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the invention relates to a method and a device for allocating resources to users.
  • processors CPU - central processing unit
  • the tasks have to share the processing power of a CPU.
  • the processing power (resource) of the CPU may be shared in time and for each time interval or "time slot" a certain task is assigned. This means that in a first time slot a first task is processed, in a second time slot a second task is processed and so on.
  • a control unit allocating the processing power to the tasks may be necessary.
  • a suchlike unit is often referred to as a "scheduler" because a schedule is provided for the different duties or tasks the CPU has to fulfill.
  • an object of the present invention is to overcome the disadvantages mentioned above and, more particularly, to improve an allocation of resources to users .
  • the present invention is not limited to computer systems.
  • the example of allocating time slots of a CPU to tasks is only mentioned as an example.
  • the invention provides for a solution to the problems stated above in any environment wherever a certain resource is shared by multiple consumers .
  • This may be, for example, a computer system, a data
  • inventive method and devices are in no means limited to telecommunications, data transmission or general information technologies.
  • allocating, in cycles, resources to useres comprising the steps of allocating, for each cycle, a share of the resources to each of the users and assessing the allocation depending on the allocation of a previous cycle.
  • the method may also comprise the step of determining, for each cycle, a size of each share depending on a demand of at least one of the users.
  • the allocation can be based on the current needs for each of the users.
  • a seguence of the users in the allocation of a share of the resources to the users may be altered for each cycle.
  • each user may be in different positions in the seguence of allocation, resulting in different resource shares.
  • One aspect of the invention is that the allocation may be assessed for each cycle also in consideration of the shares and the allocation sequence of a previous cycle.
  • a user being first in the allocation of share of resources to users has the right for allocation of at least a minimal share.
  • the minimal share may be at least equal to a default share allocated to said user, for example.
  • allocated to a user being first in the allocation of share of resources to users is allocated according to its current demand, but not greater than the maximum of either its share allocated in the previous cycle or its default share.
  • the share allocated to a user being last in the allocation of share of resources to users could be allocated according to its current demand, for example. It may cover the complete resources not yet allocated to other users for that cycle.
  • the share allocated to a user being neither first nor last in the allocation of share of resources to users is allocated according to its current demand.
  • the share of resources allocated to a user within a cycle may not be greater than its share in the preceding cycle unless that user is first or last in the allocation of share of resources within that cycle.
  • the resources could be a
  • the resources may be shared, for example, with respect to time.
  • a device for allocating, in cycles, resources to users is provided.
  • the device may comprise an allocating unit configured to, for a cycle, allocate a share of the resources to each of users, and an assessing unit configured to assess the allocation depending on the allocation of a previous cycle.
  • determining unit configured to, for each cycle, determine a size of each share depending on a demand of at least one of the users.
  • the assessing unit may be designed such that for each cycle a seguence of the users in the allocation of a share of the resources to the users is altered.
  • a system comprising a suchlike device may be an implementation example of the present invention.
  • Fig. 1 shows usage of resources in a two slot system with fixed, egual size slots, when one of the sources does not fully use its allocated resources
  • Fig. 2 shows an allocation of resources for use by tasks in a two slot system according to the invention
  • Fig. 3 shows an embodiment of a computing system according to the present invention
  • Fig. 4 shows a flowchart illustrating the inventive method.
  • processing resources (processing capacity of processing power) of a processing unit are shared between multiple tasks.
  • the processing power (of a CPU, for example) is shared in the time domain. This means that for each user (or each task, respectively) a certain time slot is used within each cycle. Each task is allocated to a time slot.
  • the invention is not limited to processors .
  • Fig. 1 shows the usage of resources in a two slot system with fixed, egual size slots . In case the capacity of the capacity of the
  • processor is subdivided in time, i.e. the full system capacity is dedicated to one single user only at each specific instance of time, it shows the allocation or assignment of time slots in a system according to current technigues.
  • two tasks (task A from an application A and task B from an application B) share the resources of one CPU.
  • a time slot is defined (time slot 1 for task A; time slot 2 for task B) .
  • Both time slots 1 and 2 have a fixed length 1/2.
  • four consecutive time slot cycles are shown, each time slot cycle having the length 1.
  • the CPU is not only limited to the processing of only two tasks. A plurality of tasks can be processed
  • FIG. 2 shows four time slot cycles according to the present inventive method.
  • two different tasks A and B are allocated to a share of the available processor power (i.e. assigned to two time slots) per cycle.
  • the invention is not limited to only two different tasks and/or two slots per cycle. It is also in the scope of the present invention to provide a method, respective devices and a system using a plurality of different tasks (or users or consumers) and a plurality of slots (or shares) per cycle.
  • the number of slots can be based on or be egual to the number of users, but a variation in the number of users and/or shares per cycle could also occur, for example automatically depending on current needs or
  • time slot assignment i.e. the task allocation
  • task A is assigned its share of the resource first (here: it is assigned to time slot 1) and task B is assigned its share second (here: it is assigned to time slot 2) .
  • the seguence of the assignment is switched, meaning that - in this example - now task A is processed during time slot 2 and task B during time slot 1.
  • the length of the time slots is adapted according to the following rule: the (maximal) length for time slot 1 is defined as the maximum of the length of previous time slot 2 and half of the length of a time slot cycle.
  • the length of time slot 2 is, then, defined as the remaining time of each time slot cycle. Note, however, that this rule is only mentioned as an example. Any rules stated herein may be amended in any way according to current circumstances or to reguests and desire of the computer system or the scheduler.
  • the capacity of the CPU is shared in the time domain using time slot cycles having a fixed length 1 (this means, in other words, that the sum of the lengths of time slot 1 and time slot 2 or the length of one time slot cycle is constant) .
  • time slot 1 the first time slot
  • time slot 2 the second time slot
  • the allocation of CPU power share to tasks is altered in this example, i.e.
  • task A is allocated its share first (task A is processed in time slot 1) and task B is allocated its share second (task B is processed in time slot 2) in a first time slot cycle, then, in the subseguent cycle, task B will be first in the allocation (and processed during time slot 1) and task A will be second in the allocation process (and it will use time slot 2 for processing) .
  • the capacity of the time slot cycles is shared in the following way. For each task at least the length of the previous time slot 2 (i.e. when the respective task was assigned to time slot 2) is stored. When a task turns to be the task now using time slot 1, said time slot 1 is first in the allocation process and gains a - maximal - length which is egual to the maximum of the length of the previous time slot 2 and the half of the length of a time slot cycle (i.e. at least 50% of a time slot cycle) . The remaining part of the time slot cycle is then, as time slot 2, assigned to the other task.
  • the turnaround (the switch from time slot 1 to time slot 2) is either done when time slot 1 is over or, also, directly when all data is processed - i.e. the actual length of time slot 1 may be shorter than the maximum allowed if there is not enough data to be processed to fill the entire time slot.
  • time slot cycle 1 in time slot 1 data of task A is processed, and during time slot 2 data of task B is processed.
  • task B uses the CPU during time slot 1.
  • the maximal length of time slot 1 is defined as the length of previous time slot 2 (which is, in this case, also egual to the half of a time slot cycle) .
  • task B does not have enough data to be processed to fill up the whole time slot
  • time slot 1 is again assigned to task A
  • the length of time slot 1 is egual to the length of previous time slot 2. I.e. that task A gets more than half of the length of the time slot cycle available.
  • the remaining part of the time slot cycle is, again, assigned to task B. If, as in this example, task B meanwhile gets new data to be processed again, time slot 2 is used.
  • task B (now first for allocation and processed during time slot 1) can use not only the length of the previous time slot, but - as always - at least the length of half of the time slot cycle (if needed) .
  • task A may use the remaining time of the time slot cycle (time slot 2) .
  • task A may still use more than half of the time slot cycle capacity as user of time slot 1 as it is first for allocation and allowed to use a time slot length of up to the same length as it used when it was assigned to time slot 2 in the previous time slot cycle.
  • the default capacity sharing may, for example, also be asymmetric so that one task is preferred and gets more capacity when both tasks operate with full load, i.e. in situations where a complete time slot cycle is used and both tasks still have enough data to be processed during the subseguent time slot cycle.
  • predetermined values for the default time slot length for each of the tasks may be used. That means that instead of using half of the length of a time slot cycle for both tasks, task A may, for example, obtain 70% of the time slot cycle (0.7 * "time slot cycle length") and task B may obtain 30% of the cycle.
  • the default (or fair) share of a data stream is the amount of resources made available on average for that data stream, if the system runs under continuous full load conditions.
  • the default share of a data stream is a value between 0 and 1 (or 0 and 100%) and, normally, it is assigned to the data stream before it is accepted for transmission.
  • the default share is used under certain conditions for determining the share of resources allocated to that data stream within a cycle of transmission.
  • the sum of the default shares of all accepted data streams is usually not greater than 1 (100%) .
  • overbooking i.e. an assignment of default shares summing up to more than 100% of the cycle capacity is possible, with the risk of a potential loss of data in case of massive congestion.
  • a further embodiment of the invention could use an additional time slot for idle situations. If all tasks are in an idle state (i.e. no data is to be processed) unnecessary delay may occur when data arrives during a time slot cycle . For such situations a further time slot could be added (time slot 3, when referring to the above example) . If the task currently using time slot 2 has no data to be processed, time slot 2 may be divided into two parts (namely, time slot 2 and time slot 3) and time slot 3 may be assigned to the other task, i.e. a new turnaround is performed. With this the time the other task has to wait until its time slot appears can advantageously be decreased. Time slots 2 and 3 could have egual lengths, for example, but the respective lengths can also be set to any other value as desired.
  • time slot 2 may always be granted a minimal slot length, so that some minimum capacity for the task assigned to time slot 2 is guaranteed. (Or, in other words, the application using time slot 2 always gets some minimal time for data processing.)
  • the amended rule could read as: the length of time slot 1 is defined as the minimum of the maximal length for time slot 1 and the maximum of the length of the previous time slot 2 and half of the length of a time slot cycle. In this case by setting a maximal length for time slot 1 a certain minimal capacity is reserved for time slot 2.
  • the present invention is also applicable with systems when more than two tasks are present, By altering the time slots assigned to the multiple tasks the time slot lengths can automatically be adapted to the different data load situations for the different tasks.
  • One embodiment would be to keep the above rule for time slot 1 (meaning that the length of time slot 1 is depending on the length of the previous time slot assigned to the sender now using time slot 1) and to allocate the remaining time of the time slot cycle to the remaining time slots.
  • This allocation may also be performed according to predetermined rules - the remaining time may be divided egually or again based on the lengths of the respective time slots in previous time slot cycles.
  • the varying of the assignment of tasks to slots may be performed in a cyclic or random way or according to a predetermined rule. For example, for four tasks (A, B, C, D) the succession or seguence of the slot allocation could be changed in a forward direction (ABCD - BCDA - CDAB - DABC) or backwards (ABCD - DABC - CDAB - BCDA) .
  • the change could also follow a certain instruction, for example, in a subseguent cycle slot 1 is allocated to the user of previous slot 3, slot 2 is allocated to user of previous slot 1, slot 3 to the user of previous slot 4 and slot 4 to the user of previous slot 2 (ABCD - CADB - DCBA - BDAC) .
  • priority rights may be assigned to the different senders according to any one or a combination of different criteria such as e.g. a traffic class, specific QoS reguirements , or current traffic demand, that may have been announced or can be measured e.g. by a gueue length. Decision criteria may be modified between the cycles if desired.
  • the present invention has the further advantage that there is no need to transfer any kind of information (like reguests, grants, etc.) in- between the applications sharing the CPU as the present invention can solely rely on implicit information deducted from the resource usage. Also, there is no need to estimate processing intensities, available capacity or the like.
  • the present invention is, moreover, adapting very fast on changed circumstances enabling each system to react in just a couple of cycles to adjust to changes in the data load situation.
  • Fig. 3 shows an implementation embodiment of the example depicted in Fig. 2.
  • a computing system 301 is depicted comprising a CPU 302 and a scheduler 303.
  • Scheduler 303 allocates processing resources of the CPU to two tasks Taskl and Task2 as can be seen on the right side of Fig. 3 represented by the dashed lines.
  • This preparation comprises allocating CPU power to the tasks, i.e. in this case assigning a specific time slot to the tasks. This allocation may be performed according to the method described above.
  • the invention is not limited to allocating processing power to different tasks.
  • the present invention may be used.
  • the invention provides for an allocation process with an improved exploit of the resources that is automatically adapting to changing demands.
  • Fig. 4 shows method steps for one cycle and, more particularly, steps for assessing the allocation of resources.
  • a general rule could be to assign the resources for the first user in the following way: the resource maximum for the first user is defined as the maximum of the assigned resources for the respective user in the previous cycle x-1 and the default share defined for this user. If this resource maximum is greater than the current demand of this user in the current cycle x, then the assigned resources are set as the resources needed for the demand only. If the resource maximum is smaller than the resources needed to cover the demand, then the assigned resources are set to the maximum allowed. In step 405 the next user in the sequence of users is chosen. In step 406 it is determined, for the chosen user, whether this user is the last user in the sequence of users.
  • step 407 resources are assigned to this user according to a specific rule and the method jumps back to step 405 to choose the next user in the sequence.
  • the rule for the user being neither first nor last in the sequence of users may be defined in the following way: the resources assigned to the respective user in the current cycle x are defined as generally being equal to the resources assigned to this user in the previous cycle x-1. Only if the demand is smaller than these resources then the assigned resources are, consequently, only as great as required for the current demand.
  • step 406 If in step 406 it is determined that the next user in the sequence of allocation is the last user to get resources assigned to then the method continues with step 408 and resources are assigned to this user. This may be handled according to the following rule: generally, the resource assigned to the last user is equal to the remaining resources of the current cycle x. If, however, the demand of this last user is smaller than the rest of the resources of this cycle x, then only the required resources are allocated to the last user. After allocation of resources to the last user within cycle x, cycle x ends at step 409.
  • step 402 may only be optional at this point. Checking the current demand before determining the sequence is only necessary in case of prioritized sequencing. If the sequence in the allocation is altered independent of current demands (e.g. in case of a cyclic change in the allocation sequence) step 402 may also be omitted. (However, the demand may always be checked when actually assigning resources according to the rules described above.) Also, if after assigning resources to the last user in step 408 resources are left in the current cycle (i.e. if the demand of the last user is smaller than the remaining resources) the remaining resources of the current cycle may be assigned to any of the further users. This, again, may depend on predetermined rules, i.e. on priority and/or demand, for example.
  • the method as laid out in the flow chart of Fig. 4 may suspend when the remaining resources in cycle x are not sufficient to fully allocate the resources assigned to a user being on turn to get resources allocated. It may happen that a user receives less resources than the rules indicate or even no resources at all for a certain cycle. A suchlike situation is more likely in case of overbooking of resources than with a more conservative admission strategy.
  • ResourceMax Max (Assigned Resources for this user in cycle x-1 / default share defined for this user);
  • Assigned Resources Assigned Resources for this user in cycle x-1;
  • Remaining resources may be allocated to users which did not get sufficient resources to have their demand fully served;
  • the method as laid out above and in the flow chart of Fig. 4 may suspend when the remaining resources in cycle x are not sufficient to fully allocate the resources assigned to a user being on turn to get resources allocated. It may happen that a user receives less resources than the rules indicate or even no resources at all for a certain cycle. A suchlike situation is more likely in case of overbooking of resources than with a more conservative admission strategy.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

A method and a device are provided for allocating, in cycles, resources to users. According to the invention, a share of the resources to each user is allocated for each cycle and the allocation is assessed depending on the allocation of a previous cycle. Furthermore, for each cycle, a size of each share may be determined depending on a demand of at least one of the users and a sequence of the users in the allocation of a share of the resources to the users may be altered.

Description

Description
Method and device for allocating resources The invention relates to a method and a device for allocating resources to users.
For example in current computer systems processors (CPU - central processing unit) have to deal with multiple tasks at the same time. However, if no real parallel processing is possible the tasks have to share the processing power of a CPU. In this case the processing power (resource) of the CPU may be shared in time and for each time interval or "time slot" a certain task is assigned. This means that in a first time slot a first task is processed, in a second time slot a second task is processed and so on.
However, if the tasks have different priorities, for example, or if the tasks have different real time reguirements or comprise a different amount of data to be processed a control unit allocating the processing power to the tasks may be necessary. In communication technology a suchlike unit is often referred to as a "scheduler" because a schedule is provided for the different duties or tasks the CPU has to fulfill.
In current computer systems the scheduler (controller) allocates processor power oftentimes depending on the priority of the tasks or the amount of data to be processed. However, as an overview over all tasks to be performed at one point in time is complicated and the scheduling process may be costly with respect to computing time an improved method for allocating time slots to tasks may be desirable. This is moreover true for any situation wherein (a limited amount of) resources are allocated to multiple users (or consumers) sharing the same resource. Therefore, an object of the present invention is to overcome the disadvantages mentioned above and, more particularly, to improve an allocation of resources to users .
This problem is solved according to the features of the independent claims. Further embodiments are described in the depending claims .
Again, it is to be noted that the present invention is not limited to computer systems. The example of allocating time slots of a CPU to tasks is only mentioned as an example. The invention provides for a solution to the problems stated above in any environment wherever a certain resource is shared by multiple consumers .
This may be, for example, a computer system, a data
communication system (particularly, when sharing one
transmission path) , but, also, any other resource that may be shared. I.e. the inventive method and devices are in no means limited to telecommunications, data transmission or general information technologies.
According to the invention a method is provided for
allocating, in cycles, resources to useres, comprising the steps of allocating, for each cycle, a share of the resources to each of the users and assessing the allocation depending on the allocation of a previous cycle.
The method may also comprise the step of determining, for each cycle, a size of each share depending on a demand of at least one of the users. Thus, the allocation can be based on the current needs for each of the users.
In one embodiment a seguence of the users in the allocation of a share of the resources to the users may be altered for each cycle. Advantageously, each user may be in different positions in the seguence of allocation, resulting in different resource shares. One aspect of the invention is that the allocation may be assessed for each cycle also in consideration of the shares and the allocation sequence of a previous cycle.
In another embodiment of the invention a user being first in the allocation of share of resources to users has the right for allocation of at least a minimal share. The minimal share may be at least equal to a default share allocated to said user, for example.
In yet another embodiment of the invention the share
allocated to a user being first in the allocation of share of resources to users is allocated according to its current demand, but not greater than the maximum of either its share allocated in the previous cycle or its default share.
Furthermore, the share allocated to a user being last in the allocation of share of resources to users could be allocated according to its current demand, for example. It may cover the complete resources not yet allocated to other users for that cycle.
In one embodiment the share allocated to a user being neither first nor last in the allocation of share of resources to users is allocated according to its current demand.
Preferably, it should not be greater than its share allocated in the previous cycle . In another embodiment the share of resources allocated to a user within a cycle may not be greater than its share in the preceding cycle unless that user is first or last in the allocation of share of resources within that cycle. In one exemplary embodiment the resources could be a
processing power. Furthermore, the resources may be shared, for example, with respect to time. According to the invention also a device for allocating, in cycles, resources to users is provided. The device may comprise an allocating unit configured to, for a cycle, allocate a share of the resources to each of users, and an assessing unit configured to assess the allocation depending on the allocation of a previous cycle.
In an embodiment the device further comprises a size
determining unit configured to, for each cycle, determine a size of each share depending on a demand of at least one of the users. The assessing unit may be designed such that for each cycle a seguence of the users in the allocation of a share of the resources to the users is altered. In one example a system comprising a suchlike device may be an implementation example of the present invention.
Embodiments of the invention are now explained in greater detail with the help of the following figures, wherein:
Fig. 1 shows usage of resources in a two slot system with fixed, egual size slots, when one of the sources does not fully use its allocated resources, Fig. 2 shows an allocation of resources for use by tasks in a two slot system according to the invention,
Fig. 3 shows an embodiment of a computing system according to the present invention, and
Fig. 4 shows a flowchart illustrating the inventive method.
In the embodiments described below processing resources (processing capacity of processing power) of a processing unit are shared between multiple tasks. Unless otherwise specified, in the examples below, the processing power (of a CPU, for example) is shared in the time domain. This means that for each user (or each task, respectively) a certain time slot is used within each cycle. Each task is allocated to a time slot. However, the invention is not limited to processors . Fig. 1 shows the usage of resources in a two slot system with fixed, egual size slots . In case the capacity of the
processor is subdivided in time, i.e. the full system capacity is dedicated to one single user only at each specific instance of time, it shows the allocation or assignment of time slots in a system according to current technigues. In the system of Fig. 1 two tasks (task A from an application A and task B from an application B) share the resources of one CPU. In this example, for each task a time slot is defined (time slot 1 for task A; time slot 2 for task B) . Both time slots 1 and 2 have a fixed length 1/2. In Fig. 1 four consecutive time slot cycles are shown, each time slot cycle having the length 1.
Of course, the CPU is not only limited to the processing of only two tasks. A plurality of tasks can be processed
"simultaneously" by allocating a time slot to each task. This can be done by a scheduler controlling all current tasks and allocating to each task their respective share. With respect to the example of Fig. 1 again, assume that task A has enough data to be processed to fill all available time slots 1, whereas sender B only has limited data to be processed. As can be seen from Fig. 1 all time slots 1 are used, but the time slots 2 assigned to task B are only partly filled (see cycle 3) . Thus, processing power actually available but assigned to sender B is not used and wasted.
In contrast to this Fig. 2 shows four time slot cycles according to the present inventive method. Again, two different tasks (A and B) are allocated to a share of the available processor power (i.e. assigned to two time slots) per cycle. Note, again, that the invention is not limited to only two different tasks and/or two slots per cycle. It is also in the scope of the present invention to provide a method, respective devices and a system using a plurality of different tasks (or users or consumers) and a plurality of slots (or shares) per cycle. The number of slots can be based on or be egual to the number of users, but a variation in the number of users and/or shares per cycle could also occur, for example automatically depending on current needs or
reguirements of the consumers. In the embodiment depicted in Fig. 2 seguence of the
allocation (and, in this example, the actual processing seguence of the tasks, respectively) and length of time slots 1 and 2 are varied. Particularly, two variations are
performed in this example. First, the time slot assignment (i.e. the task allocation) is altered. This means that, in this example, in the first cycle task A is assigned its share of the resource first (here: it is assigned to time slot 1) and task B is assigned its share second (here: it is assigned to time slot 2) . In the second cycle the seguence of the assignment is switched, meaning that - in this example - now task A is processed during time slot 2 and task B during time slot 1. Furthermore, the length of the time slots is adapted according to the following rule: the (maximal) length for time slot 1 is defined as the maximum of the length of previous time slot 2 and half of the length of a time slot cycle. The length of time slot 2 is, then, defined as the remaining time of each time slot cycle. Note, however, that this rule is only mentioned as an example. Any rules stated herein may be amended in any way according to current circumstances or to reguests and desire of the computer system or the scheduler.
Note again, however, that in this example the allocation to the time slots (to time slot 1 and time slot 2) do indeed correspond to the seguence of the actual processing of the tasks in the CPU. This, however, is merely shown in the examples depicted in the figures to increase clarity. The main point is a variation in the seguence of allocating the resources to the multiple users per cycle. The actual chronological seguence in which the tasks are processed after being assigned to a certain share of the CPU power may also differ if desired.
The example depicted in Fig. 2 is now described in even greater detail. In the example shown in Fig. 2 it is assumed, again, that task A has enough data to be processed to fill all available time slots. Task B, as above, comprises only a limited amount of data to be processed. Furthermore, in this example, both senders A and B always get a default share or "fair share" (see below) of 50% of the available resources.
In this embodiment, the capacity of the CPU is shared in the time domain using time slot cycles having a fixed length 1 (this means, in other words, that the sum of the lengths of time slot 1 and time slot 2 or the length of one time slot cycle is constant) . Furthermore, referrring to Fig. 2, for each time slot cycle, the first time slot is referred to as time slot 1, the second time slot is called time slot 2. As already mentioned above, the allocation of CPU power share to tasks (which corresponds, in this example, to the assignment of tasks to time slots) is altered in this example, i.e. if task A is allocated its share first (task A is processed in time slot 1) and task B is allocated its share second (task B is processed in time slot 2) in a first time slot cycle, then, in the subseguent cycle, task B will be first in the allocation (and processed during time slot 1) and task A will be second in the allocation process (and it will use time slot 2 for processing) .
The capacity of the time slot cycles is shared in the following way. For each task at least the length of the previous time slot 2 (i.e. when the respective task was assigned to time slot 2) is stored. When a task turns to be the task now using time slot 1, said time slot 1 is first in the allocation process and gains a - maximal - length which is egual to the maximum of the length of the previous time slot 2 and the half of the length of a time slot cycle (i.e. at least 50% of a time slot cycle) . The remaining part of the time slot cycle is then, as time slot 2, assigned to the other task.
Again, the example of "half of the length of a time slot cycle" is only to be considered an embodiment. In this case both tasks could use under normal operation in full mode 50% of the processing resource, i.e. each task could use a time slot with the length of half the length of a full time slot cycle. This share of 50% can be regarded as the default share ( fair share ) .
Note that the turnaround (the switch from time slot 1 to time slot 2) is either done when time slot 1 is over or, also, directly when all data is processed - i.e. the actual length of time slot 1 may be shorter than the maximum allowed if there is not enough data to be processed to fill the entire time slot.
With respect now to Fig. 2 this means that in time slot cycle 1, in time slot 1 data of task A is processed, and during time slot 2 data of task B is processed. In the next cycle task B uses the CPU during time slot 1. The maximal length of time slot 1 is defined as the length of previous time slot 2 (which is, in this case, also egual to the half of a time slot cycle) . As, in this example, task B does not have enough data to be processed to fill up the whole time slot
theoretically available, the turnaround to time slot 2 is done immediately when all data of task B is processed. Time slot 2 is then completely used for task A in this cycle. In the next cycle, cycle 3, task A is again first for allocation (here: time slot 1 is again assigned to task A) . In this cycle the length of time slot 1 is egual to the length of previous time slot 2. I.e. that task A gets more than half of the length of the time slot cycle available. The remaining part of the time slot cycle is, again, assigned to task B. If, as in this example, task B meanwhile gets new data to be processed again, time slot 2 is used. In the next cycle task B (now first for allocation and processed during time slot 1) can use not only the length of the previous time slot, but - as always - at least the length of half of the time slot cycle (if needed) .
This means that the lengths of the different time slots are adjusted dynamically to the needs of the different tasks. With the present method of using an alternation in the seguence of the allocation, i.e. by using alternating processing slots, it is possible that a task that does not need its share of resources or processing power at one moment can temporarily allocate the spare capacity to the other task and automatically regain the capacity when it needs more capacity.
According to the present invention this means that when one task (e.g. task B) has very little or no data to be processed when it is first in the allocation process (and, in the example above, assigned to time slot 1), this time slot 1 will be shorter than half of the length of a time slot cycle. As the switch to time slot 2 is performed immediately when all data for time slot 1 is processed task A may use the remaining time of the time slot cycle (time slot 2) . In the next time slot cycle task A may still use more than half of the time slot cycle capacity as user of time slot 1 as it is first for allocation and allowed to use a time slot length of up to the same length as it used when it was assigned to time slot 2 in the previous time slot cycle. When task B has more data to be processed it can reclaim its share of the time slot cycle capacity the next time it becomes the task that is first for allocation (the task using a time slot 1 in the above example) as it can always use at least one half of the time slot cycle. Thus, a task being first in the allocation process can always gain its fair share, i.e. a minimal share of the resources. As mentioned before, the example described above is only to be seen as one possible embodiment of the invention. It should be noted that it will be obvious for anyone skilled in the art that many variations and modifications can be made to the preferred embodiment - specifically, but not limited to the rules for the length of the time slots - without
substantially departing from the general principles of the present invention. All such variations and modifications are intended to be included herein within the scope of the present invention. For example, further features of the present invention may be as follows.
The default capacity sharing may, for example, also be asymmetric so that one task is preferred and gets more capacity when both tasks operate with full load, i.e. in situations where a complete time slot cycle is used and both tasks still have enough data to be processed during the subseguent time slot cycle. In this case predetermined values for the default time slot length for each of the tasks may be used. That means that instead of using half of the length of a time slot cycle for both tasks, task A may, for example, obtain 70% of the time slot cycle (0.7 * "time slot cycle length") and task B may obtain 30% of the cycle.
Conseguently, this would result in sharing the capacity available in a 70/30 ratio under full load operation.
Generally, the default (or fair) share of a data stream is the amount of resources made available on average for that data stream, if the system runs under continuous full load conditions. The default share of a data stream is a value between 0 and 1 (or 0 and 100%) and, normally, it is assigned to the data stream before it is accepted for transmission. The default share is used under certain conditions for determining the share of resources allocated to that data stream within a cycle of transmission. The sum of the default shares of all accepted data streams is usually not greater than 1 (100%) . However, under the assumption of a statistical behavior of the tasks a so called "overbooking", i.e. an assignment of default shares summing up to more than 100% of the cycle capacity is possible, with the risk of a potential loss of data in case of massive congestion.
A further embodiment of the invention could use an additional time slot for idle situations. If all tasks are in an idle state (i.e. no data is to be processed) unnecessary delay may occur when data arrives during a time slot cycle . For such situations a further time slot could be added (time slot 3, when referring to the above example) . If the task currently using time slot 2 has no data to be processed, time slot 2 may be divided into two parts (namely, time slot 2 and time slot 3) and time slot 3 may be assigned to the other task, i.e. a new turnaround is performed. With this the time the other task has to wait until its time slot appears can advantageously be decreased. Time slots 2 and 3 could have egual lengths, for example, but the respective lengths can also be set to any other value as desired.
In another embodiment time slot 2 may always be granted a minimal slot length, so that some minimum capacity for the task assigned to time slot 2 is guaranteed. (Or, in other words, the application using time slot 2 always gets some minimal time for data processing.) This could be achieved by, for example, setting a maximal length for time slot 1, meaning that, if desired, time slot 1 can never consume the whole (or most of the) time slot cycle , even if the above rule would result in a respectively long time slot 1. For example, the amended rule could read as: the length of time slot 1 is defined as the minimum of the maximal length for time slot 1 and the maximum of the length of the previous time slot 2 and half of the length of a time slot cycle. In this case by setting a maximal length for time slot 1 a certain minimal capacity is reserved for time slot 2.
Moreover, as aiready mentioned, the present invention is also applicable with systems when more than two tasks are present, By altering the time slots assigned to the multiple tasks the time slot lengths can automatically be adapted to the different data load situations for the different tasks. One embodiment would be to keep the above rule for time slot 1 (meaning that the length of time slot 1 is depending on the length of the previous time slot assigned to the sender now using time slot 1) and to allocate the remaining time of the time slot cycle to the remaining time slots. This allocation, in turn, may also be performed according to predetermined rules - the remaining time may be divided egually or again based on the lengths of the respective time slots in previous time slot cycles.
In a system with more than two different tasks the varying of the assignment of tasks to slots may be performed in a cyclic or random way or according to a predetermined rule. For example, for four tasks (A, B, C, D) the succession or seguence of the slot allocation could be changed in a forward direction (ABCD - BCDA - CDAB - DABC) or backwards (ABCD - DABC - CDAB - BCDA) . The change could also follow a certain instruction, for example, in a subseguent cycle slot 1 is allocated to the user of previous slot 3, slot 2 is allocated to user of previous slot 1, slot 3 to the user of previous slot 4 and slot 4 to the user of previous slot 2 (ABCD - CADB - DCBA - BDAC) .
It may also be advantageous to allocate "priority rights" to one or more of the data streams. With a preferred processing the respective data stream could, for example, be allocated to slot 1 of the next cycle (or every second cycle or the like), meaning that said stream obtains the right to claim a minimal slot length corresponding at least to its default share for transmission of its data. These priority rights may be assigned to the different senders according to any one or a combination of different criteria such as e.g. a traffic class, specific QoS reguirements , or current traffic demand, that may have been announced or can be measured e.g. by a gueue length. Decision criteria may be modified between the cycles if desired. By ensuring that the task the being first during share allocation (in the example above, the task assigned to the first slot (slot 1) of a cycle) always gains the right to obtain a certain minimum amount of resources (default or
"fair" share), the respective task always has the possibility to regain transmission capacity lost during cycles with later allocation positions, if necessary. It should be noted again, that it is not reguired to
physically change the seguence of processing of the tasks within the time slots of the different cycles as long as the seguence in the allocation of the slot resources for the different tasks follows the respective change rules. When respective resources for a cycle have been assigned it does not matter whether a tasks gets its data processed first, second, or in a later position within the cycle.
Furthermore, and amongst other things, the present invention has the further advantage that there is no need to transfer any kind of information (like reguests, grants, etc.) in- between the applications sharing the CPU as the present invention can solely rely on implicit information deducted from the resource usage. Also, there is no need to estimate processing intensities, available capacity or the like. The present invention is, moreover, adapting very fast on changed circumstances enabling each system to react in just a couple of cycles to adjust to changes in the data load situation. Fig. 3 shows an implementation embodiment of the example depicted in Fig. 2. In Fig. 3 a computing system 301 is depicted comprising a CPU 302 and a scheduler 303. Scheduler 303 allocates processing resources of the CPU to two tasks Taskl and Task2 as can be seen on the right side of Fig. 3 represented by the dashed lines. Before the actual processing in the CPU the allocation of CPU time to tasks is performed, i.e. the processing is prepared. This preparation comprises allocating CPU power to the tasks, i.e. in this case assigning a specific time slot to the tasks. This allocation may be performed according to the method described above.
It is to be noted again that the invention is not limited to allocating processing power to different tasks. In any environment where available resources are shared among multiple users the present invention may be used. When a share of the available resources is allocated to each of the consumers (or users) the invention provides for an allocation process with an improved exploit of the resources that is automatically adapting to changing demands.
Finally, a more general approach to the inventive method is now presented with help of the flow chart of Fig. 4. Fig. 4 shows method steps for one cycle and, more particularly, steps for assessing the allocation of resources. After start of a cycle x (400) in a first step the seguence of the users in the assignment of resources and the actual resource assignment of the previous cycle x-1 are retrieved (step 401) . In the next step, step 402, the current demands of the users for the current cycle x are checked. From this the seguence of the users in the allocation process for the current cycle x is determined (step 403) . In step 404 the resources for the first user in the allocation process are assigned to the first user.
A general rule could be to assign the resources for the first user in the following way: the resource maximum for the first user is defined as the maximum of the assigned resources for the respective user in the previous cycle x-1 and the default share defined for this user. If this resource maximum is greater than the current demand of this user in the current cycle x, then the assigned resources are set as the resources needed for the demand only. If the resource maximum is smaller than the resources needed to cover the demand, then the assigned resources are set to the maximum allowed. In step 405 the next user in the sequence of users is chosen. In step 406 it is determined, for the chosen user, whether this user is the last user in the sequence of users. If this is not the case then, in step 407, resources are assigned to this user according to a specific rule and the method jumps back to step 405 to choose the next user in the sequence. The rule for the user being neither first nor last in the sequence of users may be defined in the following way: the resources assigned to the respective user in the current cycle x are defined as generally being equal to the resources assigned to this user in the previous cycle x-1. Only if the demand is smaller than these resources then the assigned resources are, consequently, only as great as required for the current demand.
If in step 406 it is determined that the next user in the sequence of allocation is the last user to get resources assigned to then the method continues with step 408 and resources are assigned to this user. This may be handled according to the following rule: generally, the resource assigned to the last user is equal to the remaining resources of the current cycle x. If, however, the demand of this last user is smaller than the rest of the resources of this cycle x, then only the required resources are allocated to the last user. After allocation of resources to the last user within cycle x, cycle x ends at step 409.
As shown above, different rules for the allocation of resources to the users may be applied for the first, the last as well as the remaining users in the allocation process.
Furthermore, note that step 402 may only be optional at this point. Checking the current demand before determining the sequence is only necessary in case of prioritized sequencing. If the sequence in the allocation is altered independent of current demands (e.g. in case of a cyclic change in the allocation sequence) step 402 may also be omitted. (However, the demand may always be checked when actually assigning resources according to the rules described above.) Also, if after assigning resources to the last user in step 408 resources are left in the current cycle (i.e. if the demand of the last user is smaller than the remaining resources) the remaining resources of the current cycle may be assigned to any of the further users. This, again, may depend on predetermined rules, i.e. on priority and/or demand, for example. The method as laid out in the flow chart of Fig. 4 may suspend when the remaining resources in cycle x are not sufficient to fully allocate the resources assigned to a user being on turn to get resources allocated. It may happen that a user receives less resources than the rules indicate or even no resources at all for a certain cycle. A suchlike situation is more likely in case of overbooking of resources than with a more conservative admission strategy.
An example for the principles of the resource allocation is shown below where a succession of different method steps is listed. In the example below " ·.=" stands for "is defined as" / "is set to".
- Begin cycle x;
- Retrieve sequence of users and resource assignments from cycle x-1;
- Optional (in case of prioritized sequencing; not required with default (cyclic) rules for sequencing) : Check demand of users for cycle x;
- Determine sequence of users for resource assignment for cycle x using sequencing rules and information from 1 (and 2) ;
- Select first user to get resources for cycle x, check its demand for cycle x, and assign resources according to the following rules:
ResourceMax := Max (Assigned Resources for this user in cycle x-1 / default share defined for this user);
If ResourceMax > Demand of user for cycle x then Assigned Resources := Demand; else
Assigned Resources := ResourceMax;
- Repeat for further but last user to be served in cycle x:
Assigned Resources := Assigned Resources for this user in cycle x-1;
If Assigned Resources > Demand of user for cycle x then
Assigned Resources := Demand;
- For the last user to be served in cycle x:
Assigned Resources := Remaining Resources of cycle x;
If Assigned Resources > Demand of user for cycle x then
Assigned Resources := Demand;
- Optional (in case there are resources remaining within cycle x) : Remaining resources may be allocated to users which did not get sufficient resources to have their demand fully served;
- Save seguence of users and resource assignments of cycle x;
- End cycle x;
- Repeat for cycle x+1;
The method as laid out above and in the flow chart of Fig. 4 may suspend when the remaining resources in cycle x are not sufficient to fully allocate the resources assigned to a user being on turn to get resources allocated. It may happen that a user receives less resources than the rules indicate or even no resources at all for a certain cycle. A suchlike situation is more likely in case of overbooking of resources than with a more conservative admission strategy.

Claims

Claims :
1. A method for allocating, in cycles, resources to users, comprising the steps of:
- for each cycle, allocating a share of the resources to each user, and
- assessing the allocation depending on the allocation of a previous cycle .
2. The method according to claim 1, comprising the step of, for each cycle, determining a size of each share depending on a demand of at least one of the users.
3. The method according to claim 1 or 2, wherein for each cycle a seguence of the users in the allocation of a share of the resources to the users is altered.
4. The method according to any of the preceding claims, wherein a user being first in the allocation of share of resources to user has the right for allocation of at least a minimal share .
5. The method according to claim 4, wherein the minimal share is at least egual to a default share allocated to said user.
6. The method according to any of the preceding claims, wherein the share allocated to a user being first in the allocation of share of resources to users is allocated according to its current demand, but not greater than the maximum of either its share allocated in the previous cycle or its default share.
7. The method according to any of the preceding claims, wherein the share allocated to a user being last in the allocation of share of resources to users is allocated according to its current demand, but may cover the complete resources not yet allocated to other users for that cycle.
8. The method according to any of the preceding claims, wherein the share allocated to a user being neither first nor last in the allocation of share of resources to users is allocated according to its current demand, but not greater than its share allocated in the previous cycle.
9. The method according to any of the preceding claims, wherein the share of resources allocated to a user within a cycle is not greater than its share in the preceding cycle unless said user is first or last in the allocation of share of resources within that cycle.
10. The method according to any of the preceding claims, wherein the resources are a processing capacity.
11. The method according to any of the preceding claims, wherein the resources are shared with respect to time.
12. A device for allocating, in cycles, resources to users, comprising :
- an allocating unit configured to, for a cycle, allocate a share of the resources to each of the users, and
- an assessing unit configured to assess the allocation depending on the allocation of a previous cycle.
13. The device according to claim 10, further comprising a size determining unit configured to, for each cycle,
determine a size of each share depending on a demand of at least one of the users.
14. The device according to claims 12 or 13, wherein the assessing unit is designed such that for each cycle a seguence of the users in the allocation of a share of the resources to the users is altered.
15. The device according to any of claims 12 to 14, wherein the allocating unit is designed such that a user being first in the allocation of share of resources to users has the right for allocation of at least a minimal share.
16. The device according to claim 15, wherein the allocating unit is designed such that the minimal share is at least egual to a default share allocated to said user.
17. The device according to any of claims 12 to 16 wherein the resource is a processing power.
18. The device according to any of claims 12 to 17, wherein the users are tasks to be processed.
19. The device according to claim 17 or 18, wherein
processing power of a processing unit is allocated to multiple tasks to be processed by the processing unit
20. A computer system comprising a device according to any of claims 17 to 19.
PCT/EP2012/068413 2012-09-19 2012-09-19 Method and device for allocating resources WO2014044301A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/EP2012/068413 WO2014044301A1 (en) 2012-09-19 2012-09-19 Method and device for allocating resources

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/EP2012/068413 WO2014044301A1 (en) 2012-09-19 2012-09-19 Method and device for allocating resources

Publications (1)

Publication Number Publication Date
WO2014044301A1 true WO2014044301A1 (en) 2014-03-27

Family

ID=46980916

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/EP2012/068413 WO2014044301A1 (en) 2012-09-19 2012-09-19 Method and device for allocating resources

Country Status (1)

Country Link
WO (1) WO2014044301A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2558322A (en) * 2016-12-29 2018-07-11 Metaswitch Networks Ltd Resource Allocation
CN111356244A (en) * 2018-12-21 2020-06-30 海能达通信股份有限公司 Resource allocation method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100122263A1 (en) * 2007-04-13 2010-05-13 Sierra Wireless Method and device for managing the use of a processor by several applications, corresponding computer program and storage means
US20120079494A1 (en) * 2010-09-27 2012-03-29 Mark Henrik Sandstrom System And Method For Maximizing Data Processing Throughput Via Application Load Adaptive Scheduling And Content Switching

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100122263A1 (en) * 2007-04-13 2010-05-13 Sierra Wireless Method and device for managing the use of a processor by several applications, corresponding computer program and storage means
US20120079494A1 (en) * 2010-09-27 2012-03-29 Mark Henrik Sandstrom System And Method For Maximizing Data Processing Throughput Via Application Load Adaptive Scheduling And Content Switching

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2558322A (en) * 2016-12-29 2018-07-11 Metaswitch Networks Ltd Resource Allocation
GB2558303A (en) * 2016-12-29 2018-07-11 Metaswitch Networks Ltd Resource allocation
US10154414B2 (en) 2016-12-29 2018-12-11 Metaswitch Networks Ltd. Resource allocation
GB2558303B (en) * 2016-12-29 2019-01-09 Metaswitch Networks Ltd Resource allocation
GB2558322B (en) * 2016-12-29 2019-01-09 Metaswitch Networks Ltd Resource Allocation
CN111356244A (en) * 2018-12-21 2020-06-30 海能达通信股份有限公司 Resource allocation method and device
CN111356244B (en) * 2018-12-21 2023-10-24 海能达通信股份有限公司 Resource allocation method and device

Similar Documents

Publication Publication Date Title
JP4112420B2 (en) Method and system for allocating system resources to applications using weights
CN104102544B (en) Mix the Parallel Task Scheduling Cost Optimization Approach of multi-QoS constraint under cloud environment
CN109582448B (en) Criticality and timeliness oriented edge calculation task scheduling method
CN103793272B (en) Periodical task scheduling method and periodical task scheduling system
US20160378570A1 (en) Techniques for Offloading Computational Tasks between Nodes
EP0666665A2 (en) Method and apparatus for dynamically determining and allocating shared resource access quota
JP2012079124A (en) Job distribution processing system, information processor, and program
CN108268317A (en) A kind of resource allocation methods and device
EP3090339A1 (en) Method and system for allocating resources to resource consumers in a cloud computing environment
US9471387B2 (en) Scheduling in job execution
JP2008242510A (en) System and method of allocating resource to job, and program
CN112749002A (en) Method and device for dynamically managing cluster resources
CN103455375A (en) Load-monitoring-based hybrid scheduling method under Hadoop cloud platform
CN111221631A (en) Task scheduling method, device and storage medium
KR20090029811A (en) Resource-based scheduler
WO2014044301A1 (en) Method and device for allocating resources
CN111240824A (en) CPU resource scheduling method and electronic equipment
WO2019139703A1 (en) Hybrid prioritized resource allocation in thermally- or power-constrained computing devices
CN110213178B (en) Flow management method, integrated chip and device
CN115344350A (en) Node equipment of cloud service system and resource processing method
JP6191361B2 (en) Information processing system, information processing system control method, and control program
SE522876C2 (en) Method for assigning time slots in a data communication system
JP2009199549A (en) Computer system, method and program for allocating resources to virtual machines
CN116431335B (en) Control group-based container message queue resource quota control method
KR101743028B1 (en) Apparatus and method of dynamic resource allocation algorithm for service differentiation in virtualized environments

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12769056

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12769056

Country of ref document: EP

Kind code of ref document: A1