Contents
- mutex1000.grs
- mutexStar1000.grs
- mutexStroke1000.grs
- mutexStrokeP1000.grs
mutex1000.grs 1/4
[top][prev][next]
new backend 'grbe_frame_based.so' :
new graph 'gr_model_Mutex_fb.so' 'mutex'
new actions 'gr_actions_Mutex_fb.so'
new node Process
new node Process
new edge next 0 1
new edge next 1 0
custom set_max_matches '1'
grs newRule{998} mountRule requestRule{1000} (takeRule releaseRule giveRule){1000}
quit
mutexStar1000.grs 2/4
[top][prev][next]
new backend 'grbe_frame_based.so' :
new graph 'gr_model_Mutex_fb.so' 'mutex'
new actions 'gr_actions_Mutex_fb.so'
new node Process
new node Process
new edge next 0 1
new edge next 1 0
custom set_max_matches '1'
echo 'Setup graph ...'
grs newRule{998} aux_attachResource*
echo 'Do rewrite ...'
grs requestStarRule{1000} blockedRule waitingRule{999} unlockRule blockedRule waitingRule{999} ignoreRule (giveRule takeRule releaseStarRule){999} giveRule takeRule
quit
mutexStroke1000.grs 3/4
[top][prev][next]
new backend 'grbe_frame_based.so' :
new graph 'gr_model_Mutex_fb.so' 'mutex'
new actions 'gr_actions_Mutex_fb.so'
new node Process
new node Process
new edge next 0 1
new edge next 1 0
custom set_max_matches '1'
echo 'Setup graph ...'
grs newRule{998} aux_attachResource*
echo 'Do rewrite ...'
grs releaseRule{1000} giveRule{1000} requestSimpleRule{1000} takeRule{1000}
quit
mutexStrokeP1000.grs 4/4
[top][prev][next]
new backend 'grbe_frame_based.so' :
new graph 'gr_model_Mutex_fb.so' 'mutex'
new actions 'gr_actions_Mutex_fb.so'
new node Process
new node Process
new edge next 0 1
new edge next 1 0
echo 'set max matches = 1\n'
custom set_max_matches '1'
echo 'Setup graph ...'
grs newRule{998}
custom set_max_matches '1000'
grs [aux_attachResource]*
echo 'Do rewrite ...'
custom set_max_matches '1000'
grs [releaseRule]{1000} [giveRule]{1000} [requestSimpleRule]{1000} [takeRule]{1000}
quit
|