critical_section.mvc 974 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. Place critical_section_1 {
  2. tokens = 0
  3. name = "critical_section_1"
  4. }
  5. Place critical_section_2 {
  6. tokens = 0
  7. name = "critical_section_2"
  8. }
  9. Place lock_available {
  10. tokens = 1
  11. name = "lock_available"
  12. }
  13. Transition release_section_1 {
  14. name = "release_section_1"
  15. }
  16. Transition release_section_2 {
  17. name = "release_section_2"
  18. }
  19. Transition acquire_section_1 {
  20. name = "acquire_section_1"
  21. }
  22. Transition acquire_section_2 {
  23. name = "acquire_section_2"
  24. }
  25. P2T (critical_section_1, release_section_1) {
  26. weight = 1
  27. }
  28. P2T (critical_section_2, release_section_2) {
  29. weight = 1
  30. }
  31. P2T (lock_available, acquire_section_1) {
  32. weight = 1
  33. }
  34. P2T (lock_available, acquire_section_2) {
  35. weight = 1
  36. }
  37. T2P (release_section_1, lock_available) {
  38. weight = 1
  39. }
  40. T2P (release_section_2, lock_available) {
  41. weight = 1
  42. }
  43. T2P (acquire_section_1, critical_section_1) {
  44. weight = 1
  45. }
  46. T2P (acquire_section_2, critical_section_2) {
  47. weight = 1
  48. }