At various points p2 waits for p1 p1 waits for p3 p3

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: This can appear to be a deadlock! At various points, p2 waits for p1; p1 waits for p3; p3 waits for p2. How can we tell what is live? (Need a consistent snapshot.) A bit of notation: happened before: a-­‐>b [b could be caused by a] 1) if a and b are in same process, a before b 2) send before receive 3) transitivity We can use this to build a logical clock, C. Cj is the value of clock C for process j such that if “a happened before b” then C(a) < C(b) [note I haven’t defined < ] sidebar on PL operator redefinition, aka C++ can refine [ IR1: increment on every event within a process IR2: put current timestamp in each message; on receipt, Cj = max(current, message + 1) What is the logical clock for the example above? (assign timestamps to each event.) Counter just keeps going up; ok if multiple (concurrent) processes have a different idea of the current time. If we define a tiebreaking rule, then we get a total order consistent with partial order. We can then use this to build workable distribut...
View Full 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