Assignment 2

Assignment 2 - Assignment 2 Due Date February 16 2012 For...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Assignment 2 Due Date: February, 16 2012 For this assignment, you will use Erlang to implement the dining philosophers problem and samefringe. Erlang is available on the departmental machines, but you can download a copy for yourself from here . A quick overview on how to get started with Erlang is available here . Part I Implement the samefringe problem in Erlang. Given two trees (represented as lists), your program should create two threads, each one responsible for traversing one of the trees, communicating with one another using Erlang message-passing primitives. Each thread traverses its respective tree until its encounters an integer leaf node. One of the threads (the master) communicates its leaf to the other (the slave); if they match, an acknowledgement is sent, and both threads continue their traversal. If they do not, a message is sent to terminate the search. Part 2 For this part of the assignment, you will implement the dining philosophers problem in Erlang. The code structure for some of the procedures is given below. You will need to fill in the code for
Background image of page 1

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

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

{[ snackBarMessage ]}

Page1 / 2

Assignment 2 - Assignment 2 Due Date February 16 2012 For...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online