Find Jobs
Hire Freelancers

concurent operations

$30-100 USD

Closed
Posted about 15 years ago

$30-100 USD

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 [login to view URL] synchronize these concurrent processes, you are to use Unix [login to view URL] 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 V5.1A
Project ID: 3764882

About the project

1 proposal
Remote project
Active 15 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
1 freelancer is bidding on average $85 USD for this job
User Avatar
See private message.
$85 USD in 14 days
4.7 (9 reviews)
3.2
3.2

About the client

Flag of UNITED STATES
United States
0.0
0
Member since Apr 10, 2006

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.