Jump to content
Sign in to follow this  
tudor.timi

Clarification on example 57

Recommended Posts

Here's example 57:

component top {
  resource R {}
  pool[4] R R_pool;
  bind R_pool *;

  action A { lock r R; }
  action B {}
  action C {}
  action D { lock r R;}

  action my_test {
    activity {
      schedule {
        {do A; do B;}
        {do C; do D;}
      }
    }
  }
}

The description states that the following execution orders are valid:

Quote

a) a, b followed by c, d.
b) c, d followed by a, b.
c) a, b in parallel with c, d.

If there were only one resource R, then a, b in parallel with c, d becomes illegal, due to the lock.

Would the execution of a, b and c in parallel and d also be legal? Theoretically, this could happen, since there is no locking going on. If it's not legal, from a PSS semantic point of view, is this because of the statement keeping scheduling dependencies within the sets? If so, an explicit note of this fact would be helpful. Also, what would be a compact way to add the behavior I described?

Share this post


Link to post
Share on other sites

From PSWG:

You are right. The execution of A, followed by B and C in parallel, followed by D, would be legal in this case. The explanation text is not clear enough. We filed a Mantis issue (#6343) proposing a fix to this. It will be fixed in the 1.0 version.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×