Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. +-------------------------+-------------------------+
  2. | Process X: | Process Y: |
  3. | private i; | private i; |
  4. | for (i=0; i < n; i++) { | for (i=0; i < n; i++) { |
  5. | a[i] = f(i); | EntryY(R, S); |
  6. | ExitX(R, S); | b[i]=g(a[i]); |
  7. | } | } |
  8. +-------------------------+-------------------------+
  9.  
  10. +---------------+----------------+
  11. | ExitX(R, S) { | EntryY(R, S) { |
  12. | P(S); | V(S); |
  13. | V(R); | P(R); |
  14. | } | } |
  15. +---------------+----------------+
  16.  
  17. +---------------+----------------+
  18. | ExitX(R, S) { | EntryY(R, S) { |
  19. | V(R); | P(R); |
  20. | P(S); | V(S); |
  21. | } | } |
  22. +---------------+----------------+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement