Give a man a program, frustrate him for a day. <i>Teach</i> a man to program, frustrate him for a lifetime.

Assignment 3: A Divide-and-Conquer API

Purpose

Specification

The DAC API

Design a DAC API. For design ideas, please see the Cilk paper. Cilk allows any acyclic directed graph of threads. Your api needs to support only "fully strict" (i.e., purely DAC) programs. You may require that a task either:

Fibonacci dag: n = 4

The implementation of this API involves the cooperation of the Task, the Computer, and the Space. Please look at the specification of a Closure in the Cilk paper. Relate this to the infomation requirements of a Task in your system. The Space needs to distinguish between tasks that have all their arguments (and thus are ready to be executed by Computers) from those that do not. The scheduling algorithm you use to distribute ready tasks to Computers is unspecified: You can do whatever you want.

If task t computes an output o (as opposed to computing subtasks), it must communicate o to its successor task s, which needs o as an input: When t produces o, the Space needs to know which task is s. Thus, you may need some form of task identifier. The Space also needs to know which of s's inputs o is, so the Space can set the appropriate input element of s.

If your DAC api is different for different DAC problems, then it is not truly an "api."

Fault tolerance

Although your system needs to tolerate faulty Computers in the same sense as the previous programming assignment, it does not need to be robust in the presence of faulty application programs.

Application development

The clients

By client, I mean the class that uses the Space to solve a problem. You may wish to refactor your work from previous assignments to serve this purpose.

For each application, define a client that:

Experiments

Perform the same experiments as you did in the last programming assignment for TSP, but adding the Fibonacci application, and for c = 1, 2, and 4 (Computers) for both applications. Although it is fine for the client and Space to run in separate JVMs on the same physical machine, the Space and each computer run in different physical machines.

Let P be a problem instance (e.g., an instance of the TSP). Let TC be the elapsed time to complete P using C Computers. For each problem, P, plot P's parallel efficiency: EP{C) = T1 / (C TC).

Design

Provide a design document that is at most 2 pages in which you:

  1. Identify the key deisgn issues;
  2. Provide an architecture and high level object-oriented design - diagrams welcome;
  3. Explain how your architecture & design address the key issues that you identified.

Deliverables

The deliverables are the same as those for the previous programming assignment. Make sure that you provide your:



 cappello@cs.ucsb.edu © Copyright 2010 Peter Cappello                                           2016.04.22