CEG 7370 Distributed Computing

2015 Spring • Final Exam • 100 points

Given to you: April 30, 2015, 8:00 PM;
Due: May 01, 2015, 11:59 PM.

This take-home exam permits the use of a Linux/Windows laptop/PC running javac, g++, scala, Eclipse, Idea, and other software development and drawing tools. You are welcome to refer to your notes in a way equivalent to using a simple cheatsheet to solely help you only to remember the syntax of the various notations and langauges. It is otherwise a traditional closed book, closed notes exam. In particular, you are honor bound *not* to Internet surf or access any content already existing (other than as indicated) once you access the final until you turnin the answers. The primary reasons in making this a take-home are to relieve time pressure and give you a comfortable (computing/home) environment. Do not give or take help from others.

Submit your answers on thor.cs.wright.edu using ~pmateti/ceg7370/turnin Final answers.pdf bounded-buffers-with-actors.scala

  1. (5 * 8 points) The following statements may or may not be (fully or partially) valid. Explain the underlined technical terms occurring in each statement. Explain/ discuss/ dispute the statement. It is possible to write no more than, say, five, lines each, and yet receive full score.
    1. A "safety'' property is defined thus: Let  bad be a predicate characterizing a "bad" state of program code segment S. Assume that {P} S {Q} holds. Assume that I is a global invariant. If I implies the  negation of bad, we say that not bad is a safety property for S. Thus, it all depends on whether  we consider a certain property good or bad.
    2. In a collection of semaphores that constitutes a split binary semaphore, at least one of them must be 1.
    3. The happened before relation, as discussed, requires a logical clock for every process. But a typical machine (node) in a distributed system runs several processes. So, it is sufficient to maintain a logical clock per node that is shared by all processes running on that node.
    4. In the context of our distributed semaphore implementation, not all fully acknowledged messages are necessary.
    5. Detection of termination is difficult only in peer-to-peer distributed computing not in client-server computing.
    6. RPC/RMI based solutions are distributed, but not parallel.
    7. We wish to maximize (a) concurrency, we prefer (b) symmetric solutions, we rate (c) correctness much higher than efficiency, and cannot tolerate (d) deadlocks or (e) livelocks. Defend why for each of these five.
    8. "A distributed system is one in which the failure of a computer you didn't even know existed can render your own computer unusable." Is this a good definition?
  2. (15 * 4 points)
    1. Describe the idea(s) behind Hadoop.
    2. Describe the use of semaphores in the Pass-the-Baton technique (deployed in the Readers/Writers Problem) in converting an await based solution to a semaphore based one.
    3. int x := 0; int y := 1;
      do true → x := x + 2 ;
      []  true → y := y + 3 ;
      od
      Consider the code block at left. Do any of the temporal assertions
      (a) (5 points) always x %2 == 0
      (b) (5 points) eventually x > 5
      (c) (5 points) eventually always y = 3
      hold? Where? When? How? Under weakly fair scheduling?
    4. Implement the standard Producer/ Consumers example in Scala using Akka Actors. Use either become or FSM or neither. You may want (but not required) to see an implementation using threads and synchronize: bounded-buffers-with-threads.scala. The solution to this question is to replace the threads with actors. Feel free to use (or ignore) portions of this source code. Submit your file of Scala code as a separate file named bounded-buffers-with-actors.scala
  3. (0 points) [For survey purposes only.] Please record your effort in minutes for each of the above items. Other feedback you wish to give is also welcome.

Copyright © 2015 Prabhaker Mateti ; April 30, 2015