Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- +-------------------------+-------------------------+
- | Process X: | Process Y: |
- | private i; | private i; |
- | for (i=0; i < n; i++) { | for (i=0; i < n; i++) { |
- | a[i] = f(i); | EntryY(R, S); |
- | ExitX(R, S); | b[i]=g(a[i]); |
- | } | } |
- +-------------------------+-------------------------+
- +---------------+----------------+
- | ExitX(R, S) { | EntryY(R, S) { |
- | P(S); | V(S); |
- | V(R); | P(R); |
- | } | } |
- +---------------+----------------+
- +---------------+----------------+
- | ExitX(R, S) { | EntryY(R, S) { |
- | V(R); | P(R); |
- | P(S); | V(S); |
- | } | } |
- +---------------+----------------+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement