Information Technology Reference
In-Depth Information
Locking and unlocking mechanism. A processor p that wants to execute a feature
must first obtain the request queue locks of a number of processors
{
q 1 ,...,
q n }
.For
this, p adds
on top of its obtained request queue locks stack. Only then can
p issue statements to these processors. The lock
{
q 1 ,...,
q n }
operation serves this
purpose. The operation requires that none of the request queues is already locked.
( {
q 1 ,...,
q n } )
Lock Operation
¬∃ q i ∈{ q 1 ,..., q m } :
σ . rq locked ( q i )
de f
= σ . lock rqs ( p , { q 1 ,..., q m } )
Γ p :: lock ( { q 1 ,..., q m } ) ; s p , σ p :: s p , σ
Once p is done with the execution of the feature, it asks
σ
to unlock their
request queues once they are done with the issued statements. For this purpose, the
unlock operation unlocks the request queue. Processor p issues the unlock opera-
tiontoprocessors
{
q 1 ,...,
q n }
. This operation requires that the request queue is indeed
locked and that no processor possesses the request queue lock.
{
q 1 ,...,
q n }
Unlock Operation
σ . rq locked ( p )
q σ . procs :
¬ σ . rq locks ( q ) . has ( p )
de f
= σ . unlock rq ( p )
Γ p :: unlock ; s p , σ p :: s p , σ
After p issued the unlock operations, it can remove
σ
{
,...,
}
from its stack of ob-
tained request queue locks using the pop obtained rq locks operation. This ensures
that the unlock operations can proceed.
q 1
q n
Pop Obtained Request Queue Locks
de f
= σ . pop obtained rq locks ( p )
Γ p :: pop obtained rq locks ; s p , σ p :: s p , σ
Brooke, Paige, and Jacob [5] noticed that unlock operations are not optimal. In essence,
it could be possible to unlock the request queue of a processor q i directly after p issued
all statements. The request queue lock is important to guarantee exclusive access on
q i 's request queue. However, as soon as p issued all statements on q i , this lock is no
longer needed. Unlocking the request queue right away could improve the performance
in some situations because q i 's request queue could be locked again earlier and hence
another processor that is waiting for this lock could proceed earlier.
σ
Write and read mechanism. A processor p can use the write
operation to set a
value v of an entity with name x . This operation uses the set val command. Hence, p can
both set attribute values of its current object and values of entities in its top environment.
(
x
,
v
)
Write Value Operation
de f
= σ . set val ( p , x , v )
Γ p :: write ( x , v ) ; s p , σ p :: s p , σ
σ
 
Search WWH ::




Custom Search