Assignment 3 Solutions

Due Wednesday, March 12, 2007 8:25pm in class
(at the start of recitation)

Questions

Each question is worth 4 points for a maximum assignment grade of 24.
  1. Read Lamport's paper on Time, Clocks, and the Ordering of Events in a Distributed System.
    1. What is Lamport's definition of concurrent events using the happened before relation?

      An event a is concurrent with an event b if a neither a happened before b nor b happened before a (neither ab nor ba).
    2. What is Lamport's definition of concurrent events using the concept of causality?
      Two events are concurrent if neither can causally affect the other event.
  2. A system of four processes, (P1, P2, P3, P4), performs the following events:

    1. P1 sends a message to P3 (to event e).
    2. P1 receives a message from P3 (from event g).
    3. P2 executes a local event.
    4. P2 receives a message from P3 (from event f).
    5. P3 receives a message from P1 (from event a).
    6. P3 sends a message to P2 (to event d).
    7. P3 sends a message to P1 (to event b).
    8. P4 executes a local event.

    When taking place on the same processor, the events occur in the order listed.

    Assign Lamport timestamps to each event. Assume that the clock on each processor is initialized to 0 and incremented before each event. For example, event a will be assigned a timestamp of 1.

    a. 1
    b. 5
    c. 1
    d. 4
    e. 2
    f. 3
    g. 4
    h. 1
    1. Assign vector timestamps to each event in question 2. Assume that the vector clock on each processor is initialized to (0,0,0,0) with the elements corresponding to (P1, P2, P3, P4). For example, event a will be assigned a timestamp of (1, 0, 0, 0).
      a. (1, 0, 0, 0)
      b. (2, 0, 3, 0)
      c. (0, 1, 0, 0)
      d. (1, 2, 2, 0)
      e. (1, 0, 1, 0)
      f. (1, 0, 2, 0)
      g. (1, 0, 3, 0)
      h. (0, 0, 0, 1)
    2. Which events are concurrent with event d?
      b, g, h.
  3. You are synchronizing your clock from a time server using Cristian's algorithm and observe the following times:
    • timestamp at client when the message leaves the client: 10:44:20.400
    • timestamp generated by the server: 9:20:10.200
    • timestamp at client when the message is received at client: 10:44:21.200
    1. To what value do you set the client's clock?

      The elapased time is 21.00 - 20.400 = 0.800. The time is set to the server's time + ½(elapsed time) = 9:20:10.200 + ½(0.800) = 9:20:10.600.

    2. If the best-case round-trip message transit time is 124 msec (0.124 sec), what is the error of the clock on the client?

      The error is ±½(the region of uncertainty). This region is (the elapsed time) - (the best-case round-trip time) = 0.800 - 0.124 = 0.676 sec. The error is half of that, or ± 338 msec.

      Note that you have to be careful if you want to plug numbers into the formula. 124 msec is not Tmin. It's the round-trip latency, or 2Tmin.

  4. Look at the intel 8254x family of Gigabit Ethernet controllers ( datasheet). Explain the multicast support available in these chips (e.g., filtering by hashing an address? ... exact addresses?).
    These controllers allow:
    1. 16 exact matches of an address.
    2. A 12-bit hash lookup onto a 4096-bit table.
    3. Promiscuous multicast to accept all multicast ethernet packets.
  • While IP multicast failed to gain widespread use for many "generic" IP-based applications, it is a key component of IPTV (TV broadcast over IP) deployments. Read:
    1. According to the second article, how much network bandwidth is needed for 100 channels?
      Assuming 4 Mbps MPEG-2 streams, 100 channels would require a capacity of around 400 Mbps.
    2. What is an advantage of using multicast for IPTV?
      The advantage is that you can transmit a single stream of data (content) for many users.
  • Contents

    CS 417

    CS 417 background

    CS 417 Assignments

    CS 417 Miscellaneous