next up previous contents
Next: Integration of Layers Up: COMMON FEATURES OF A Previous: A Layer's Interfaces   Contents

Usage of Resources

OSI resources such as SAPs and CEPs are often dynamically used. Creation, usage and deletion of these resources often follow a common pattern. This common pattern is described in this section.

Usage of resources is often through a descriptor based scheme. Through a create operation a unique descriptor referencing an instance of the resource is obtained. This descriptor is used as a reference to the resource in all future transactions. Two basic variations on this scheme are described below. The one way resource usage model and the two way resource usage model. The one way resource usage is typically more appropriate for interfaces that only requires action primitives. The two way resource usage is typically more appropriate for interfaces that require action and event primitives.

In the one way model, a resource typically has:

FILE fopen(char *filename, char *permissions);
in stdio module is an example of the one way model for resource usage. fileName is the address of the resource and FILE is the provider's reference.

In the two way model, a resource typically has:

Let's consider the case of a Connection End Point.

CepProvRef conReq(CepUserRef cepUserRef, DstAddr dstAddr, ...);
Void (*conCnf)(CepUserRef cepUserRef, ...);
Void dataReq(CepProvRef cepProvRef, ...);

conReq and dataReq are action primitives, conCnf is an event primitive. Prior to the creation of a CEP, the service user prepares its private model of the CEP. During the creation of the CEP (conReq), a reference to this (cepUserRef) is conveyed to the service provider module. The service provider module (conReq) in turn returns a provider reference. All future action primitives dealing with the CEP will use the provider reference. All future event primitives dealing with the CEP will use the user reference.


next up previous contents
Next: Integration of Layers Up: COMMON FEATURES OF A Previous: A Layer's Interfaces   Contents