Loo-Q: the example in full

Here is our worked example of the Loo-Q system in all its glory!

For simplicity we consider a system of just three seats – A, B and C. The table shows the global history, with a description of the event and the status of the local queues at each time.

The spacetime diagram of the system is on the right, showing the processes for seats A, B and C as vertical lines with time increasing as you move up. Messages sent between processes are shown as dashed lines. An event is shown as green if that seat's Loo-Q button is green.

TimeEventQueue AQueue BQueue C
0.1Start time for A
0.2Start time for B
0.3Start time for C
1.1A: Rule 1
  • Sends message "1.1: A needs loo" to B and C
1.1 A needs loo
1.2B: Rule 2
  • Receives message "1.1: A needs loo"
  • Sends message "1.2: received" to A
1.1 A needs loo1.1 A needs loo
1.3C: Rule 2
  • Receives message "1.1: A needs loo"
  • Sends message "1.3: received" to A
1.1 A needs loo1.1 A needs loo1.1 A needs loo
2.1A: Rule 4
  • First in queue but hasn't received messages from B & C after 1.1
1.1 A needs loo1.1 A needs loo1.1 A needs loo
2.2B: Rule 1
  • Sends message "2.2: B needs loo" to A and C
1.1 A needs loo1.1 A needs loo
2.2: B needs loo
1.1 A needs loo
2.3C: Rule 1
  • Sends message "2.3: C needs loo" to A and B
1.1 A needs loo1.1 A needs loo
2.2: B needs loo
1.1 A needs loo
2.3: C needs loo
3.1A: Rule 6
  • Receives message "1.2: received"
1.1 A needs loo1.1 A needs loo
2.2: B needs loo
1.1 A needs loo
2.3: C needs loo
3.2B: Rule 2
  • Receives message "2.3: C needs loo"
  • Sends message "3.2: received" to C
1.1 A needs loo1.1 A needs loo
2.2: B needs loo
2.3: C needs loo
1.1 A needs loo
2.3: C needs loo
3.3C: Rule 2
  • Receives message "2.2: B needs loo"
  • Sends message "3.3: received" to B
1.1 A needs loo1.1 A needs loo
2.2: B needs loo
2.3: C needs loo
1.1 A needs loo
2.2: B needs loo
2.3: C needs loo
4.1A: Rule 6
  • Receives message "1.3: received"
1.1 A needs loo1.1 A needs loo
2.2: B needs loo
2.3: C needs loo
1.1 A needs loo
2.2: B needs loo
2.3: C needs loo
4.2B: Rule 6
  • Receives message "3.3: received"
1.1 A needs loo1.1 A needs loo
2.2: B needs loo
2.3: C needs loo
1.1 A needs loo
2.2: B needs loo
2.3: C needs loo
4.3C: Rule 6
  • Receives message "3.2: received"
1.1 A needs loo1.1 A needs loo
2.2: B needs loo
2.3: C needs loo
1.1 A needs loo
2.2: B needs loo
2.3: C needs loo
5.1A: Rule 4
  • First in queue and have received messages from B and C after 1.1
1.1 A needs loo1.1 A needs loo
2.2: B needs loo
2.3: C needs loo
1.1 A needs loo
2.2: B needs loo
2.3: C needs loo
6.1A: Rule 2
  • Receives message "2.2: B needs loo"
  • Sends message "6.1: received" to B
1.1 A needs loo
2.2: B needs loo
1.1 A needs loo
2.2: B needs loo
2.3: C needs loo
1.1 A needs loo
2.2: B needs loo
2.3: C needs loo
6.2B: Rule 6
  • Receives message "6.1: received"
1.1 A needs loo
2.2: B needs loo
1.1 A needs loo
2.2: B needs loo
2.3: C needs loo
1.1 A needs loo
2.2: B needs loo
2.3: C needs loo
7.1A: Rule 4
  • Sends message "7.1: A has finished" to B and C
2.2: B needs loo1.1 A needs loo
2.2: B needs loo
2.3: C needs loo
1.1 A needs loo
2.2: B needs loo
2.3: C needs loo
7.2B: Rule 5
  • Receives "7.1: A has finished"
2.2: B needs loo2.2: B needs loo
2.3: C needs loo
1.1 A needs loo
2.2: B needs loo
2.3: C needs loo
7.3C: Rule 5
  • Receives "7.1: A has finished"
2.2: B needs loo2.2: B needs loo
2.3: C needs loo
2.2: B needs loo
2.3: C needs loo
8.1A: Rule 2
  • Receives message "2.3: C needs loo"
  • Sends message "8.1: received" to C
2.2: B needs loo
2.3: C needs loo
2.2: B needs loo
2.3: C needs loo
2.2: B needs loo
2.3: C needs loo
8.2B: Rule 4
  • First in queue and have received messages from A and C after 2.2
2.2: B needs loo
2.3: C needs loo
2.2: B needs loo
2.3: C needs loo
2.2: B needs loo
2.3: C needs loo
8.3CL Rule 6
  • Receives message "8.1: received"
2.2: B needs loo
2.3: C needs loo
2.2: B needs loo
2.3: C needs loo
2.2: B needs loo
2.3: C needs loo
9.2B: Rule 4
  • Sends message "9.2: B has finished" to A and C
2.2: B needs loo
2.3: C needs loo
2.3: C needs loo2.2: B needs loo
2.3: C needs loo
9.3C: Rule 5
  • Receives "9.2: B has finished"
2.2: B needs loo
2.3: C needs loo
2.3: C needs loo2.3: C needs loo
10.1A: Rule 5
  • Receives "9.2: B has finished"
2.3: C needs loo2.3: C needs loo2.3: C needs loo
10.3C: Rule 4
  • First in queue and have received messages from A and B after 2.3
2.3: C needs loo2.3: C needs loo2.3: C needs loo

Back to main article