Next: Constructing and Destroying SoftwareResourceDescription
Up: The Resource Management Package
Previous: Resource Broker
  Contents
Now, as the turbid, conceptual backwaters of the resource management package are,
hopefully, a little less murky, we can move on to the process of putting all these abstractions
into practice. We will begin this process by examining the creation and destruction
of a GATHardwareResourceDescription.
The class GATHardwareResourceDescription can most simply be conceptualized as
a container for a GATTable, a class covered in Appendix .
So, it's a small wonder that to create a GATHardware Description instance
one uses a function of the following form
GATHardwareResourceDescription
GATHardwareResourceDescription_Create(GATTable_const attributes)
The first argument to this function is a GATTable instance. This GATTable instance,
the contents of which we will cover below, contains the description of the hardware
resource we are trying to represent. This function returns a GATHardwareResourceDescription
or NULL upon the occurrence of an error.
A hardware resource, at least as far as GAT is concerned, can be described by a set
of name/value pairs. For example, one could specify that a hardware resource has
a PowerPC CPU through the following name/value pair
cpu.type=powerpc
One similarly could specify that a hardware resource be a Power Macintosh by using
the next name/value pair
machine.type=Power Macintosh
To construct a GATHardwareResourceDescription, as we saw above, one requires a
GATTable instance. It is this GATTable instance which contains the
various name/value pairs describing the resultant GATHardwareResourceDescription.
So, you may ask, can I place any name/value pairs in such a GATTable.
Well, the answer is yes; however, GAT is only required to support a certain set
of name value pairs. The extra name/value pairs may be ignored by GAT. The
full set of supported name/value pairs, along with each value's type, can be found in
table .
Table:
Hardware Resource Description: The minimum set of supported name/values.
| Name |
Type |
Description |
memory.size |
Float |
The minimum memory in GB. |
memory.accesstime |
Float |
The minimum memory access time in ns. |
memory.str |
Float |
The minimum sustained transfer rate in GB/s. |
machine.type |
String |
The machine type as returned from uname -m. |
machine.node |
String |
The machine node name as returned from uname -n. |
cpu.type |
String |
The generic cpu type as returned from uname -p. |
cpu.speed |
Float |
The minimum cpu speed in GHz. |
disk.size |
Float |
The minimum size of the hard drive in GB. |
disk.accesstime |
Float |
The minimum disk access time in ms. |
disk.str |
Float |
The minimum sustained transfer rate in MB/s. |
|
If a particular name/value pair is not specified in a particular GATTable instance,
then GAT assumes that this name/value pair can take on any value. So, for example, if
the there is no key disk.accesstime in a GATTable instance, then GAT
assumes that this property can take on any value. In addition, if one specifies a particular
name/value pair, say memory.size=1024, GAT will make the obvious assumption
that this specification would describe a hardware resource with or more GB of
memory.
To destroy the so created GATHardwareResourceDescription one uses the following function
void GATHardwareResourceDescription_Destroy(GATHardwareResourceDescription *resource)
This function takes as its first argument a pointer to a GATHardwareResourceDescription. This
points to the GATHardwareResourceDescription to be destroyed. Upon successful completion
this any resources this GATHardwareResourceDescription maintained will be released.
Next: Constructing and Destroying SoftwareResourceDescription
Up: The Resource Management Package
Previous: Resource Broker
  Contents
Andre Merzky
2004-05-13
|