next up previous contents index
Next: Resource Environment Up: System Deployer Previous: Responsibilities of the Deployer   Contents   Index


Resource Types

A resource type describes the common properties of a class of resources. For example, a processor type could be used to describe all kinds of CPUs. The concept of resource types allows a flexible specification of different kinds of resources that might occur in a real world scenario. Component developers and deployers agree on a common set of resource types that is specified within a so-called resource repository.

We distinguish passive and processing resources. Passive resources can only be owned by a process or thread, while processing resources do some work by themselves and offer processing services. A scheduler might decide, which process is handled next by the processing resource. CPUs and hard disks are typical processing resources, while connections to a database or a block of memory are passive resources. Communication links are a special kind of processing resource type used to describe connections between different resource containers.

Figure 3.26: Basic instance of a resource repository.
Image ResourceRepository

Figure 3.26 shows an initial instance of a resource repository. It contains a set of passive and processing resources. The processing resources themselves are subdivided into plain processing resources and communication resources. The latter can only be used to connect two different resource containers. In this example, resource pools and semaphores are the only passive resources. In the following, we describe the different resource types in more detail.

Resource pools manage a limited set of resources of the same type. Typical examples are database connection pools and thread pools. A process or thread can fetch one database connection, use it to read or update some of the database entries and then return it to the pool. If no database connection is available, the process will block until one is available in the pool.

Semaphores are the most basic kind of passive resources. They can be used for synchronisation and limiting access to a resource. Basically, a semaphore is an integer value with an acquire (or p) and release (or v) operation. Intuitively, the value of a semaphore indicates how many instances of a resource are available. If the semaphore is greater than one, the acquire operation reduces the semaphore counter by one and continues the execution. Otherwise, it waits until the counter is greater than zero. The testing and setting of the semaphore's values has to be atomic. The release operation increases the counter by one, which must be atomic as well, and awakes the waiting threads or processes.

Acquire and release actions are used for semaphores as well as for resource pools and can be directly modelled in the service effect specification (see section 3.2.9).

Processors and disks are classical processing resources. They are available in every desktop and server computer system and provide the basic computational and storage functionalities. In figure 3.26, the processing rate of a CPU is specified as the number of cycles per second. Another possible metric is the number of instructions per second.

Disks are used to permanently store data and to retrieve if needed. In figure 3.26, we indicate the speed of a disk (or data storage) in megabytes per second. In our case, we assume that the rate is the same for read and write operations.

For communication resources, we consider any kind of ethernet connection. The rate or throughput of a connection is specified in megabytes per second. This resource type can be used to model most of the common networks. For example, a wireless connection between two nodes can be described as an ethernet connection with a throughput of 11 MB/s.

The resource types described here can be considered as a basic set, which has to be extended and refined in future. Next, we describe how these resource types can be used to specify an execution environment.


next up previous contents index
Next: Resource Environment Up: System Deployer Previous: Responsibilities of the Deployer   Contents   Index
Snowball 2007-03-16