CS 6/73201 Advanced Operating Systems Project #2 Due: - final submission to Tom via e-mail by 11:59pm on Tuesday, October 23, 2007 - correctness verification description to Mikhail and Tom via e-mail by 11:59pm on Tuesday, October 9, 2007 In this project you are to implement two algorithms that we study in class. The algorithm assignment is as follows. Alam, Najla Tarry's and Awerbuch spanning tree construction algorithms Hardas, Manas Sudhakar Lamport's scalar clocks, Singhal-Kshemkalyani's implementation of vector clocks Mali, Amitkumar A Ho-Ramammorthy 2 phase snapshot algorithm Chandy-Misra snapshot algorithm Malik, Rizwan Dijkstra-Scholten and Shavit-Francez termination algorithms Lee, Victor E Rikart-Agrawala and Maekawa distributed mutual exclusion algorithms Panchariya, Sagar Raymond and Suzuki-Kasami mutual exclusion algorithms Sehgal, Rahul Christian's and Berkeley time synchronization algorithms Yuan, Man Birman-Schiper-Stephenson causal ordering of broadcasts Schiper-Eggli-Sandoz causal ordering of messages We may not be able to study the algorithms in class in time for you to implement them. Thus, I suggest you read the relevant material in advance. As a starting point, I made the presentation slides that deal with these algorithms available on the course's webpage. Note that these slides may not be sufficient for good understating of your algorithms. You may have to go to the textbook and to the original papers describing the algorithms. Note that the slides are for reference purposes only, I may change them as I prepare for classes. CORRECTNESS VERIFICATION DESCRIPTION It is your responsibility to convince us that your algorithm works as expected. As the first step, you have to prepare a one-page description as to how you are planning to do so for each of your algorithm. This description is to be submitted to Mikhail and Tom by the date indicated above. Note that you may want to submit this description earlier so that you will get feedback from us and start working on the actual algorithm implementation. Find below an example of such description. Note that this description is not final, and you may decide to change what you will be submitting at a later time. Treat it as a guideline. CODING, SUBMITTING THE PROJECT Your submission in part will be judged on elegance, efficiency and clarity of your code. So make sure that the programs you write are of high quality. Code without comments will be substantially penalized. The final project is to be submitted as a tar-archive to Tom by e-mail by the date indicated above. If it works, submit evidence of correct execution. In evidence, submit the expanded correctness verification description and actual run-time sequences (with inserted commentaries if necessary) of correct execution. Note that at this point we are not looking for exhaustive quality analysis. A few representative examples would suffice. Note, however, that the examples should be diverse enough to convince us that your code indeed completely implements the specification of the original algorithm. If the code does not work -- submit your explanation as to why you think it does not and how it may be fixed. Note that is is always better to submit working code a few days late than a non-working project on time. Also, bear in mind that your third project will depend on you finishing your second project. CODE VERIFICATION DESCRIPTION EXAMPLE I am planning to implement the Wave Tree Traversal Algorithm. To show that it works correctly, I am planning to test it on several different tree topologies. Specifically, I will select: a star of eight nodes, a chain of eight nodes and a more generic topology similar to what we used in class. To document correct runs I will make each node print out a debug statement every time it gets a token and when it decides. In the debug statement, I will have the node print its identifier, the contents of its, "rec" array and its next action (if it will forward the token, decide or wait) To ensure that my algorithm accommodates arbitrary computations, I'll have each node wait random time (in the range from 0 to 2 seconds) before proceeding with the next action. For the generic topology I will record a computation where a leaf and a non-leaf node decides. For the final project submission, I will submit the one run for the star topology, one -- for the chain topology, and two for the generic topology (one where leaf decides and one where only non-leaves decide).