-
Notifications
You must be signed in to change notification settings - Fork 0
/
output1.correct
126 lines (111 loc) · 2.25 KB
/
output1.correct
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
ENTERED
Submit: A Priority: 1
Submit: B Priority: 2
Submit: C Priority: 3
Submit: D Priority: 1
Submit: E Priority: 1
Submit: F Priority: 3
Submit: G Priority: 2
Submit: H Priority: 1
-------------------------
| CURRENT OFFICE STATUS |
-------------------------
READER : IDLE
INBOX : A B C D E F G H <-TOP
QUEUE 1: EMPTY
QUEUE 2: EMPTY
QUEUE 2: EMPTY
Document D removed from inbox
LEFT
-------------------------
| CURRENT OFFICE STATUS |
-------------------------
READER : ABSENT
INBOX : A B C E F G H <-TOP
QUEUE 1: EMPTY
QUEUE 2: EMPTY
QUEUE 2: EMPTY
READCNT: 0
ENTERED
In Box Sorted
-------------------------
| CURRENT OFFICE STATUS |
-------------------------
READER : IDLE
INBOX : EMPTY
QUEUE 1: A E H <-FRONT
QUEUE 2: B G <- FRONT
QUEUE 3: C F <- FRONT
Document A removed from queue 1
-------------------------
| CURRENT OFFICE STATUS |
-------------------------
READER : IDLE
INBOX : EMPTY
QUEUE 1: E H <-FRONT
QUEUE 2: B G <- FRONT
QUEUE 3: C F <- FRONT
READER : START H
-------------------------
| CURRENT OFFICE STATUS |
-------------------------
READER : READING H
INBOX : EMPTY
QUEUE 1: E <-FRONT
QUEUE 2: B G <- FRONT
QUEUE 3: C F <- FRONT
READER : START E
Submit: I Priority: 1
-------------------------
| CURRENT OFFICE STATUS |
-------------------------
READER : READING E
INBOX : I <-TOP
QUEUE 1: EMPTY
QUEUE 2: B G <- FRONT
QUEUE 3: C F <- FRONT
READER : START G
Submit: J Priority: 1
READER : START B
-------------------------
| CURRENT OFFICE STATUS |
-------------------------
READER : READING B
INBOX : I J <-TOP
QUEUE 1: EMPTY
QUEUE 2: EMPTY
QUEUE 3: C F <- FRONT
In Box Sorted
-------------------------
| CURRENT OFFICE STATUS |
-------------------------
READER : IDLE
INBOX : EMPTY
QUEUE 1: I J <-FRONT
QUEUE 2: EMPTY
QUEUE 3: C F <- FRONT
Submit: K Priority: 3
Submit: L Priority: 2
READER : START J
Submit: M Priority: 2
LEFT
-------------------------
| CURRENT OFFICE STATUS |
-------------------------
READER : ABSENT
INBOX : K L M <-TOP
QUEUE 1: I <-FRONT
QUEUE 2: EMPTY
QUEUE 3: C F <- FRONT
READCNT: 5
Submit: N Priority: 2
Submit: O Priority: 2
Submit: P Priority: 2
-------------------------
| CURRENT OFFICE STATUS |
-------------------------
READER : ABSENT
INBOX : K L M N O P <-TOP
QUEUE 1: I <-FRONT
QUEUE 2: EMPTY
QUEUE 3: C F <- FRONT