So, we finished The project and it remained mostly the same though the process. The biggest change was that at first one of the processors was going to be running shortest time remaining process scheduling rather than both of them being round robin. Very late in the process after everything but the process manager was written we decided to remove the second processor. So we only had one processor running with round robin. Neither one of us could figure out how to make the algorithm not let both processors work on the same instruction. Other than that, everything else was the same.
There were a few parts of the project that were difficult. First of all just figuring out the overall design was fairly difficult. Although doing a UML was a big help with that. What we ended up deciding that the tables would all be collections of another class. The next part that was difficult was figuring out the data structure for the job and block list. At first we thought we would use an arraylist as the structure but that there was then to find anything the managers would have to run through the entire list. Next we thought what about a map but regular maps are not ordered so the order the jobs went in would remain so we tried a linked list map but this didn’t work because there is no way to get the next or last element in the linked list map. The one we tried that worked was a tree map since tree map are sorted and have methods to get the next and last element in the map. The hardest part by far however was coding the method to run the processors it went through four or five rewrites in the end we managed to get it though.
There were a few important things we learned doing this project. First of all we learned how the different tables interact with the managers and how complicated that interaction is. We also learned how big of a help making a plan for a project is to figure out how to do it. In this case we did it using a UML. We also learned a lot about the different steps each manager has to do. Overall we both really enjoyed the project and learned a lot from it.
There we several things we would do differently or add if we had time. First of all we would figure out how to do the two processors. In addition to that we would have liked to add the job table to the display. The most complicated thing we would have liked to add is an option to select a different operating system configuration. Such as an option for dynamic memory allocation or a paging system. On the processor side we would have liked to add an option to select a number of processors and be able to pick what type of scheduling each processor did. Those are the only things we can think of though.
This is a picture of the full UML
This is a picture of the Application
From the blog CS@Worcester – Tim's WebSite by therbsty and used with permission of the author. All other rights reserved by the author.