Created
July 8, 2011 23:03
-
-
Save ELLIOTTCABLE/1073039 to your computer and use it in GitHub Desktop.
Paws.c staging semantics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Stages | Queue ... <added> (Note) | |
| A B C | |
| [. . .] | |
| [. . .]<1 2 3> (Adding three new executions) | |
| [1 2 3] (No conflicts, so all are staged) | |
| [1 2 3]<4 5> (Adding two new executions) | |
| [1 * 3] 4 5 (Stage B is finishing, and will acquire a new work unit off the bottom of the queue next) | |
| [1 4 3] 5 | |
| [* 4 *] (A and C finish, but there’s only one piece of work in the queue) | |
| [5 4 .] (A takes 5, leaving C empty) | |
| [5 4 .]<2 2> (An old execution is now re-staged, twice! Presumably with new results) | |
| [* 4 2] 2 (C takes one instance of 2, and A clears up) | |
| [. 4 2] 2 (There is nothing stage-able in the queue, so A remains empty, even though the queue is *not* empty) | |
| [. 4 2] 2<6 7 2 5> (Many new executions added, some new, some old) | |
| [6 * 2] 2 7 2 5 (A takes 6, the bottom-most queued execution that is stage-able, and B finally finishes 4) | |
| [6 7 *] 2 2 5 (B takes 7, and C finishes the current staging of 2) | |
| [* 7 2] 2 5 (C takes a *new staging* of 2, so it continues executing it, and A unstages 6) | |
| [6 7 2] 2 5 | |
| [6 7 2] 2 5 | |
| [* * 2] 2 5 (A and B unstage) | |
| [5 . 2] 2 (A takes 5, leaving a still-unstagable 2) | |
| [5 . *] 2 (C clears up the previous staging of 2, immediately taking the last staging) | |
| [* . 2] (The queue is empty, and A finishes, remaining empty) | |
| [. . 2] | |
| [. . *] (C finally finishes executing the last re-staging of 2) | |
| [. . .] (... and with an empty queue and empty stages, the world is complete.) | |
| [. . .] | |
| Key: | |
| . → Stage empty | |
| 3 → Stage executing execution-termed-number-three | |
| * → Stage finished execution |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment