Home
Next:1.3 Resource Sharing with failure
Previous: 1.1 Model of Resource Sharing with function

1.2 The same model without functionnal rates

Consider the example of Resource Sharing that was presented in the previous section. Processes can only acquire a unit of resource if there is at least one available. The corresponding transition can only take place if the other parts of the system, i.e., the other processes, do not already control all resource units. It is natural to model this as a functional transition, which is indeed how we presented it above. The function allows a process to access the resource when the number of other processes already using the resource is strictly less than the total number of units of resource. Let us now look at how this same system may be modelled without using functional transitions. One possibility is to introduce an additional automaton, a resource pool automaton, which counts the number of units of resource available at any moment. The action of a process in acquiring a resource could then be represented as a synchronizing event requiring the cooperation of the demanding process and the resource pool. A further synchronizing event would be needed for a process to return resource to the resource pool.

Figure illustrates the Resource Sharing system modelled using an additional ``resource pool'' automaton and synchronizing events.

Figure: Resource Sharing Model without functions - Mutex2 -
\begin{figure}\centerline{%%
\input{Figs/mutex2.pstex_t}}\end{figure}


In this model, each process $i$ wishing to acquire a resource must synchronize its action (by means of the synchronizing event $s_i$) with that of the resource pool automaton. Likewise, when finished with a unit of the resource, its return to the resource pool is governed by the synchronizing event $t_i$.


The textual .san  files describing this model are:


a. N=20, P=1.    b. N=20, P=5.    c. N=20, P=10.    d. N=20, P=15.    f. N=20, P=19.

f. N=20, P=20.
Where : 
- N  is  the  nomber  of  processes
- P is  the  number  of  resource.


Next: 1.3 Resource Sharing with failure
Previous: 1.1 Model of Resource Sharing with function
Home