Method and apparatus for determining data center resource availability using multiple time domain segments
First Claim
1. A data processing system comprising:
- a bus;
a memory connected to the bus, wherein a set of instructions are located in the memory; and
a processing unit connected to the bus, wherein the processing unit executes the set of instructions to create a set of segments for a list of reservations;
determine, for each segment in the set, if resources are available based on a number of required resources of the query;
combine adjacent reservationsremove from the list of resource availabilities reservations having shorter durations than duration of the query if resources are available to form a final list of resource availabilities; and
return the final list of resource availabilities;
wherein the processing unit, in executing the set of instructions to determine if resources are available;
determines if a number of available resources is one of greater than and equal to a sum of the number of required resources of the query and a number of allocated resources;
creates a first new reservation entry for duration of each segment if the number of available resources is one of greater than and equal to the sum of the number of required resources of the query and the number of allocated resources; and
adds the first new reservation entry to the list of resource availabilities;
wherein the processing unit, in executing the set of instructions to combine adjacent reservations, determines, for each first new reservation entry in the list of resource availabilities;
if end time of the first new reservation entry is equal to start time of next reservation entry in the list;
creates a second new reservation entry for a combined duration of the first new reservation entry and the next reservation entry; and
sets the second new reservation entry as the first new reservation entry in the list.
0 Assignments
0 Petitions
Accused Products
Abstract
A method, an apparatus, and computer instructions are provided for determining data center resource availability using multiple time domain segments. A reservation class is provided that includes a start time, duration and the number of units required. A scheduled resource class is provided with an availability and an available method. The availability method creates a set of segments for a list of reservations and iterates each segment to determine whether there are enough resources for the required units. The availability method then combines all adjacent reservations and removes reservations that are too short for the duration. The available method provides a way for user to determine if resources are available at and for a given time. A composite resource class is also provided for more than one scheduled resource with an availability and available method.
-
Citations
4 Claims
-
1. A data processing system comprising:
-
a bus; a memory connected to the bus, wherein a set of instructions are located in the memory; and a processing unit connected to the bus, wherein the processing unit executes the set of instructions to create a set of segments for a list of reservations; determine, for each segment in the set, if resources are available based on a number of required resources of the query;
combine adjacent reservationsremove from the list of resource availabilities reservations having shorter durations than duration of the query if resources are available to form a final list of resource availabilities; and return the final list of resource availabilities; wherein the processing unit, in executing the set of instructions to determine if resources are available; determines if a number of available resources is one of greater than and equal to a sum of the number of required resources of the query and a number of allocated resources; creates a first new reservation entry for duration of each segment if the number of available resources is one of greater than and equal to the sum of the number of required resources of the query and the number of allocated resources; and adds the first new reservation entry to the list of resource availabilities; wherein the processing unit, in executing the set of instructions to combine adjacent reservations, determines, for each first new reservation entry in the list of resource availabilities; if end time of the first new reservation entry is equal to start time of next reservation entry in the list; creates a second new reservation entry for a combined duration of the first new reservation entry and the next reservation entry; and sets the second new reservation entry as the first new reservation entry in the list. - View Dependent Claims (2)
-
-
3. A computer program product in a non-transitory computer readable storage medium for determining data center resources availability, the computer program product comprising:
-
first instructions for creating a set of segments for a list of reservations responsive to a query for a list of resource availabilities; second instructions for determining, for each segment in the set, if resources are available based on a number of required resources of the query, wherein the second instructions comprises; first sub-instructions for determining if a number of available resources is one of greater than and equal to a sum of the number of required resources of the query and a number of allocated resources; second sub-instructions for creating a first new reservation entry for duration of each segment if the number of available resources is one of greater than and equal to the sum of the number of required resources of the query and the number of allocated resources; and third sub-instructions for adding the first new reservation entry to the list of resource availabilities; third instructions for combining adjacent reservations and removing from the list of resource availabilities reservations having shorter durations than duration of the query if resources are available to form a final list of resource availabilities; and fourth instructions for returning the final list of resource availabilities, wherein the third instructions comprises; first sub-instructions for determining, for each first new reservation entry in the list of resource availabilities, if end time of the first new reservation entry is equal to start time of next reservation entry in the list; second sub-instructions for creating a second new reservation entry for a combined duration of the first new reservation entry and the next reservation entry; and third sub-instructions for setting the second new reservation entry as the first new reservation entry in the list. - View Dependent Claims (4)
-
Specification