Question: Question 1 : Assignment 2: Description: You will create processes, run processes in parallel, and pass information between processes. The data to be processed are

Question 1 : Assignment 2:

Description: You will create processes, run processes in parallel, and pass information between processes.

The data to be processed are lines of CSV separated values, we wish to sort these.

1. Get one, or more, of these data sets:

http://earthquake.usgs.gov/earthquakes/feed/v1.0/csv.php (all quakes last 30 days)

or

major league baseball (here)

If you sort the earthquake data, sort by latitude, in ascending order, if you sort the mlb stats, sort by

Team1 name, or rating1 for first team, in ascending order.

2. Either: sort by hand, or write a two loop (bubble or insertion) sort program to sort the data.

3. Instrument your program (time it).

4. Create a program that will, in turn, run multiple processes concurrently using fork( ) and exec( )

(there are several variants of exec (execl, execv, etc.) Please do not use threads (yet).

5. Do the sort, again, in parallel for 2 concurrent processes, then 4, and 8 processes.

6. Instrument those sorts (above).

7. (?) How will you pass data (parts of the array) to each process (IPC)?

(Files, pipes, shared memory, message queues?)

8. You may if you wish (not required) to use a menu to select number of processes, size of data, etc.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!