Ii it is itself the co ordinator in this case no

Info icon This preview shows pages 2–4. Sign up to view the full content.

View Full Document Right Arrow Icon
ii. It is itself the co-ordinator. In this case no other participating site can abort/ would have aborted, because abort decisions are made only by the co-ordinator. 19.4 Consider a distributed system with two sites, A and B . Can site A distin- guish among the following? B goes down. The link between A and B goes down. B is extremely overloaded and response time is 100 times longer than normal. What implications does your answer have for recovery in distributed systems? Answer: Site A cannot distinguish between the three cases until communication has resumed with site B. The action which it performs while B is inacces- sible must be correct irrespective of which of these situations has actually
Image of page 2

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Practice Exercises 3 occurred, and must be such that B can re-integrate consistently into the distributed system once communication is restored. 19.5 The persistent messaging scheme described in this chapter depends on timestamps combined with discarding of received messages if they are too old. Suggest an alternative scheme based on sequence numbers instead of timestamps. Answer: We can have a scheme based on sequence numbers similar to the scheme based on timestamps. We tag each message with a sequence number that is unique for the (sending site, receiving site) pair. The num- ber is increased by 1 for each new message sent from the sending site to the receiving site. The receiving site stores and acknowledges a received message only if it has received all lower numbered messages also; the message is stored in the received-messages relation. The sending site retransmits a message until it has received an ack from the receiving site containing the sequence number of the transmitted message, or a higher sequence number. Once the acknowledgment is received, it can delete the message from its send queue. The receiving site discards all messages it receives that have a lower sequence number than the latest stored message from the sending site. The receiving site discards from received-messages all but the (number of the) most recent message from each sending site (message can be discarded only after being processed locally). Note that this scheme requires afixed (and small) overhead at the receiving site for each sending site, regardless of the number of messages received. In contrast the timestamp scheme requires extra space for every message. The timestamp scheme would have lower storage overhead if the number of messages received within the timeout interval is small compared to the number of sites, whereas the sequence number scheme would have lower overhead otherwise. 19.6 Give an example where the read one, write all available approach leads to an erroneous state. Answer: Consider the balance in an account, replicated at N sites. Let the current balance be $100 – consistent across all sites. Consider two trans- actions T 1 and T 2 each depositing $10 in the account. Thus the balance would be $120 after both these transactions are executed. Let the transac- tions execute in sequence: T 1 first and then T 2 . Let one of the sites, say
Image of page 3
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern