concurent operations

Closed Posted Mar 27, 2009 Paid on delivery
Closed Paid on delivery

In this problem, you will implement a program to handle concurrent processes which perform arithmetic operations. The input to your program is illustrated by the following example: main() { input_var a,b,c,d; process_var p1,p2,p3,p4; read(a,b,c,d); cobegin p1 = a + b; p2 = c - d; p3 = a + 2; coend; p4 = p1 * (p2 + p3); write(a,b,c,d,p1,p2,p3,p4); } The syntax of the concurrent program follows that of C. input_var declares input variables to be read by your program using "read". process_var declares process variables whose values will be computed a process you create. There will be a distinct process to handle the calculation for each process variable. Statements within a cobegin-coend pair can be executed concurrently. Therefore, processes which compute the process variables in these concurrent statements can be executed concurrently. In the above example, processes to compute the values of p1, p2, and p3 can be executed concurrently. However, these 3 processes must complete before the process for computing p4 can start. There can be several levels of nesting cobegin-coend pairs and your program should parse these statements correctly. There may be one level of parentheses in one arithmetic operation, and this also imposes precedence constraints on the processes' arithmetic operations. You may want to create an internal precedence graph to store the dependencies among the [url removed, login to view] synchronize these concurrent processes, you are to use Unix [url removed, login to view] output of your program consists of a printout of the values of all input and process variables as specified by "write". Notes: To keep the input simple: The variables in read(..) will be in the same order they appear in the inputvar declaration. There will be no syntax/semantic errors. Also, these two legal inputs are allowed: read(2,4,1,9) or read(a1,a2,a3,a4)/*a1..a4 stored in the same file or another file or stdin (not read(a1+5)!)

## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.

2) Deliverables must be in ready-to-run condition, as follows? (depending on the nature? of the deliverables):

a)? For web sites or? other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.

b) For all others including desktop software or software the buyer intends to distribute: A software? installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.

3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).

## Platform

Compaq tru64 Unix [url removed, login to view]

Odd Jobs

Project ID: #3764882

About the project

1 proposal Remote project Active Apr 13, 2009

1 freelancer is bidding on average $85 for this job

jack0stone

See private message.

$85 USD in 14 days
(9 Reviews)
3.2