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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started