Return to the Labs and Homework

15-440 Homework #4

  1. In class, we discussed Lamport Logical Time as a technique for ordering events in a distributed system. Is it true that if EventA on one host has a Lamport time stamp lower than EventB on another host that EventA occured in real time before EventB?

    If this is true, please explain how Lamport Logical Time maintains this invariant. If it is not true, please explain why this isn't necessarily the case and please draw a figure depicting one such example.

  2. In class we discussed using a host id, such as IP address, to break ties and impose a total ordering on Lamport time stamps.

    This approach, on its face, is unfair. Some hosts are more likely to win than others. Why don't we just assign random numbers to these events to break the tie, or, more precisely, order concurrent events randomly? Would this approach provide for a total ordering? Why or why not?

    Hint: Although the answer isn't dependent on the type of communication, it might help to consider multicast.

  3. In class, we discussed several techniques for enforcing mutual exclusion. But, we didn't discuss techniques for enforcing other concurrency control policies.

    Please adapt Maekawa's voting district scheme to solve the "at most n users" mutual exclusion problem. In other words, please adapt it so that it allows not more than "n" users to access the shared resource at a time. Your new design should be as loyal to the original design as is practical.

    If it does not make sense to use an adaptation of Maekawa's protocol for this purpose, please explain the reason.

  4. In class, we discussed several techniques for enforcing mutual exclusion. But, we didn't discuss techniques for enforcing other concurrency control policies.

    Please select one among the mutual exclusion protocols from our in class discussion and adapt it to enforce reader-writer locks, instead of mutual exclusion. Needless to say, you should select a protocol which cna be usefully adapted for this purpose. Your new protocol should be as loyal to the original as is practical.

    A read-writer lock allows readers to share an object with other readers, but ensures that a writer excludes both other writers and also readers. Sometimes this protocol is described as "Shared reads, exclusive writes". Readers should starve writers.

  5. Assume that an Applicaton Service Provider (ASP) has a redundant farm of servers distributed across several data centers. Please design a protocol that, baring the failure of each and every one of the servers, ensures that exactly one of the servers is world visible. If you believe this to be impossible, please explain the reason.

  6. Consider the original NFS design as compared to the familiar AFS design. NFS's servers were "stateless". AFS's servers maintain certain state -- what do they "remember" and why? What is the cost-benefit trade-off?

  7. Consider Coda. What do you believe is the biggest choke point? Why? How does disconnected mode address it? Why isn't this medicine used even when strongly connected?

  8. True, atomic DSM would be great. Even a good, generally useful approximation would be great. Why does this seem to be off the table for the forseeable future?