N = 32 [The maximum number of nodes in the BST] P = 3 [The number of allowed user processes] **************************************************************************************************** CONTROLLER PROCESS **************************************************************************************************** +++ Controller sets up the shared memory +++ Controller sets up the request queue R 15223 S 15223 163 S 15223 237 R 15224 P 15223 I 15223 266 R 15225 I 15225 168 S 15224 136 S 15225 270 S 15225 253 P 15223 I 15223 182 R 15226 P 15224 S 15224 105 S 15225 265 S 15225 281 I 15223 234 I 15225 277 I 15224 204 S 15225 175 S 15223 274 P 15224 S 15223 115 I 15225 121 I 15223 162 I 15225 282 I 15224 236 S 15224 240 P 15225 P 15224 I 15225 141 I 15225 209 P 15223 P 15225 S 15225 296 P 15224 S 15223 242 P 15225 P 15224 I 15223 140 P 15223 I 15225 141 P 15224 P 15225 I 15223 220 S 15225 167 S 15224 198 P 15225 I 15224 149 P 15223 P 15225 S 15223 185 P 15224 P 15225 I 15224 170 S 15225 246 I 15223 194 S 15224 249 I 15225 299 I 15224 143 S 15224 279 S 15223 222 P 15223 S 15225 172 P 15223 P 15224 I 15224 280 I 15223 283 I 15223 135 S 15225 215 S 15224 261 S 15225 163 S 15223 202 I 15224 219 S 15224 117 S 15225 277 S 15225 124 P 15223 P 15224 I 15224 287 P 15223 P 15225 P 15224 S 15223 151 S 15225 236 S 15223 162 S 15224 228 I 15223 207 S 15225 242 I 15224 268 I 15225 294 S 15223 186 P 15225 I 15224 299 I 15224 118 I 15224 299 P 15224 S 15225 211 P 15223 P 15223 P 15224 I 15225 283 S 15225 198 P 15223 P 15224 S 15224 148 S 15223 196 I 15225 213 S 15223 183 I 15223 285 P 15223 I 15224 118 P 15225 P 15224 I 15225 186 P 15224 S 15225 148 S 15223 210 P 15224 P 15225 I 15225 115 P 15223 S 15224 273 I 15225 129 S 15223 193 S 15223 100 P 15224 S 15224 107 I 15224 112 P 15225 Q 15225 +++ User process 2 with pid 15225 going to exit +++ User process 2 made 18 search, 12 print, and 14 insert requests I 15223 139 P 15223 Q 15223 +++ User process 0 with pid 15223 going to exit +++ User process 0 made 16 search, 15 print, and 12 insert requests P 15224 Q 15224 +++ User process 1 with pid 15224 going to exit +++ User process 1 made 12 search, 18 print, and 14 insert requests **************************************************************************************************** USER PROCESS 0 **************************************************************************************************** +++ User process with PID 15223 gets access to the shared memory +++ User process with PID 15223 sets up the private queues +++ User process with PID 15223 is now registered Search(163): Failed Search(237): Failed Inorder listing of the keys in the BST: Insert(266): Root created Inorder listing of the keys in the BST: 168 266 Insert(182): Right child of 168 created Insert(234): Right child of 182 created Search(274): Failed Search(115): Failed Insert(162): Right child of 121 created Inorder listing of the keys in the BST: 121 141 162 168 182 204 209 234 236 266 277 282 Search(242): Failed Insert(140): Left child of 141 created Inorder listing of the keys in the BST: 121 140 141 162 168 182 204 209 234 236 266 277 282 Insert(220): Right child of 209 created Inorder listing of the keys in the BST: 121 140 141 149 162 168 182 204 209 220 234 236 266 277 282 Search(185): Failed Insert(194): Left child of 204 created Search(222): Failed Inorder listing of the keys in the BST: 121 140 141 143 149 162 168 170 182 194 204 209 220 234 236 266 277 282 299 Inorder listing of the keys in the BST: 121 140 141 143 149 162 168 170 182 194 204 209 220 234 236 266 277 282 299 Insert(283): Left child of 299 created Insert(135): Left child of 140 created Search(202): Failed Inorder listing of the keys in the BST: 121 135 140 141 143 149 162 168 170 182 194 204 209 219 220 234 236 266 277 280 282 283 299 Inorder listing of the keys in the BST: 121 135 140 141 143 149 162 168 170 182 194 204 209 219 220 234 236 266 277 280 282 283 287 299 Search(151): Failed Search(162): Success Insert(207): Left child of 209 created Search(186): Failed Inorder listing of the keys in the BST: 118 121 135 140 141 143 149 162 168 170 182 194 204 207 209 219 220 234 236 266 268 277 280 282 283 287 294 299 Inorder listing of the keys in the BST: 118 121 135 140 141 143 149 162 168 170 182 194 204 207 209 219 220 234 236 266 268 277 280 282 283 287 294 299 Inorder listing of the keys in the BST: 118 121 135 140 141 143 149 162 168 170 182 194 204 207 209 219 220 234 236 266 268 277 280 282 283 287 294 299 Search(196): Failed Search(183): Failed Insert(285): Left child of 287 created Inorder listing of the keys in the BST: 118 121 135 140 141 143 149 162 168 170 182 194 204 207 209 213 219 220 234 236 266 268 277 280 282 283 285 287 294 299 Search(210): Failed Inorder listing of the keys in the BST: 115 118 121 135 140 141 143 149 162 168 170 182 186 194 204 207 209 213 219 220 234 236 266 268 277 280 282 283 285 287 294 299 Search(193): Failed Search(100): Failed Insert(139): Tree full Inorder listing of the keys in the BST: 115 118 121 135 140 141 143 149 162 168 170 182 186 194 204 207 209 213 219 220 234 236 266 268 277 280 282 283 285 287 294 299 +++ User process with PID 15223 going to exit +++ User process with PID 15223 has made 16 search, 15 print, and 12 insert requests **************************************************************************************************** USER PROCESS 1 **************************************************************************************************** +++ User process with PID 15224 gets access to the shared memory +++ User process with PID 15224 sets up the private queues +++ User process with PID 15224 is now registered Search(136): Failed Inorder listing of the keys in the BST: 168 182 266 Search(105): Failed Insert(204): Left child of 234 created Inorder listing of the keys in the BST: 168 182 204 234 266 277 Insert(236): Right child of 234 created Search(240): Failed Inorder listing of the keys in the BST: 121 162 168 182 204 234 236 266 277 282 Inorder listing of the keys in the BST: 121 141 162 168 182 204 209 234 236 266 277 282 Inorder listing of the keys in the BST: 121 141 162 168 182 204 209 234 236 266 277 282 Inorder listing of the keys in the BST: 121 140 141 162 168 182 204 209 234 236 266 277 282 Search(198): Failed Insert(149): Right child of 141 created Inorder listing of the keys in the BST: 121 140 141 149 162 168 182 204 209 220 234 236 266 277 282 Insert(170): Left child of 182 created Search(249): Failed Insert(143): Left child of 149 created Search(279): Failed Inorder listing of the keys in the BST: 121 140 141 143 149 162 168 170 182 194 204 209 220 234 236 266 277 282 299 Insert(280): Left child of 282 created Search(261): Failed Insert(219): Left child of 220 created Search(117): Failed Inorder listing of the keys in the BST: 121 135 140 141 143 149 162 168 170 182 194 204 209 219 220 234 236 266 277 280 282 283 299 Insert(287): Right child of 283 created Inorder listing of the keys in the BST: 121 135 140 141 143 149 162 168 170 182 194 204 209 219 220 234 236 266 277 280 282 283 287 299 Search(228): Failed Insert(268): Left child of 277 created Insert(299): Key exists Insert(118): Left child of 121 created Insert(299): Key exists Inorder listing of the keys in the BST: 118 121 135 140 141 143 149 162 168 170 182 194 204 207 209 219 220 234 236 266 268 277 280 282 283 287 294 299 Inorder listing of the keys in the BST: 118 121 135 140 141 143 149 162 168 170 182 194 204 207 209 219 220 234 236 266 268 277 280 282 283 287 294 299 Inorder listing of the keys in the BST: 118 121 135 140 141 143 149 162 168 170 182 194 204 207 209 219 220 234 236 266 268 277 280 282 283 287 294 299 Search(148): Failed Insert(118): Key exists Inorder listing of the keys in the BST: 118 121 135 140 141 143 149 162 168 170 182 194 204 207 209 213 219 220 234 236 266 268 277 280 282 283 285 287 294 299 Inorder listing of the keys in the BST: 118 121 135 140 141 143 149 162 168 170 182 186 194 204 207 209 213 219 220 234 236 266 268 277 280 282 283 285 287 294 299 Inorder listing of the keys in the BST: 118 121 135 140 141 143 149 162 168 170 182 186 194 204 207 209 213 219 220 234 236 266 268 277 280 282 283 285 287 294 299 Search(273): Failed Inorder listing of the keys in the BST: 115 118 121 135 140 141 143 149 162 168 170 182 186 194 204 207 209 213 219 220 234 236 266 268 277 280 282 283 285 287 294 299 Search(107): Failed Insert(112): Tree full Inorder listing of the keys in the BST: 115 118 121 135 140 141 143 149 162 168 170 182 186 194 204 207 209 213 219 220 234 236 266 268 277 280 282 283 285 287 294 299 +++ User process with PID 15224 going to exit +++ User process with PID 15224 has made 12 search, 18 print, and 14 insert requests **************************************************************************************************** USER PROCESS 2 **************************************************************************************************** +++ User process with PID 15225 gets access to the shared memory +++ User process with PID 15225 sets up the private queues +++ User process with PID 15225 is now registered Insert(168): Left child of 266 created Search(270): Failed Search(253): Failed Search(265): Failed Search(281): Failed Insert(277): Right child of 266 created Search(175): Failed Insert(121): Left child of 168 created Insert(282): Right child of 277 created Inorder listing of the keys in the BST: 121 162 168 182 204 234 236 266 277 282 Insert(141): Left child of 162 created Insert(209): Right child of 204 created Inorder listing of the keys in the BST: 121 141 162 168 182 204 209 234 236 266 277 282 Search(296): Failed Inorder listing of the keys in the BST: 121 141 162 168 182 204 209 234 236 266 277 282 Insert(141): Key exists Inorder listing of the keys in the BST: 121 140 141 162 168 182 204 209 234 236 266 277 282 Search(167): Failed Inorder listing of the keys in the BST: 121 140 141 162 168 182 204 209 220 234 236 266 277 282 Inorder listing of the keys in the BST: 121 140 141 149 162 168 182 204 209 220 234 236 266 277 282 Inorder listing of the keys in the BST: 121 140 141 149 162 168 182 204 209 220 234 236 266 277 282 Search(246): Failed Insert(299): Right child of 282 created Search(172): Failed Search(215): Failed Search(163): Failed Search(277): Success Search(124): Failed Inorder listing of the keys in the BST: 121 135 140 141 143 149 162 168 170 182 194 204 209 219 220 234 236 266 277 280 282 283 287 299 Search(236): Success Search(242): Failed Insert(294): Right child of 287 created Inorder listing of the keys in the BST: 121 135 140 141 143 149 162 168 170 182 194 204 207 209 219 220 234 236 266 268 277 280 282 283 287 294 299 Search(211): Failed Insert(283): Key exists Search(198): Failed Insert(213): Left child of 219 created Inorder listing of the keys in the BST: 118 121 135 140 141 143 149 162 168 170 182 194 204 207 209 213 219 220 234 236 266 268 277 280 282 283 285 287 294 299 Insert(186): Left child of 194 created Search(148): Failed Inorder listing of the keys in the BST: 118 121 135 140 141 143 149 162 168 170 182 186 194 204 207 209 213 219 220 234 236 266 268 277 280 282 283 285 287 294 299 Insert(115): Left child of 118 created Insert(129): Tree full Inorder listing of the keys in the BST: 115 118 121 135 140 141 143 149 162 168 170 182 186 194 204 207 209 213 219 220 234 236 266 268 277 280 282 283 285 287 294 299 +++ User process with PID 15225 going to exit +++ User process with PID 15225 has made 18 search, 12 print, and 14 insert requests **************************************************************************************************** USER PROCESS 3 **************************************************************************************************** +++ User process with PID 15226 gets access to the shared memory +++ User process with PID 15226 sets up the private queues ^C **************************************************************************************************** USER PROCESS WITHOUT THE CONTROLLER RUNNING **************************************************************************************************** *** The controller is not ready yet. Exiting... **************************************************************************************************** DIRECTORY LISTING OF THE FIFO QUEUES **************************************************************************************************** prw-r--r-- 1 abhij abhij 0 Oct 23 21:22 doneQ-15223| prw-r--r-- 1 abhij abhij 0 Oct 23 21:22 doneQ-15224| prw-r--r-- 1 abhij abhij 0 Oct 23 21:22 doneQ-15225| prw-r--r-- 1 abhij abhij 0 Oct 23 21:22 doneQ-15226| prw-r--r-- 1 abhij abhij 0 Oct 23 21:22 grantQ-15223| prw-r--r-- 1 abhij abhij 0 Oct 23 21:22 grantQ-15224| prw-r--r-- 1 abhij abhij 0 Oct 23 21:22 grantQ-15225| prw-r--r-- 1 abhij abhij 0 Oct 23 21:22 grantQ-15226| prw-r--r-- 1 abhij abhij 0 Oct 23 21:22 reqQ|