Question: In C language Summary Frist create processes, run processes in parallel, and pass information between processes. The data to be processed are lines of CSV

In C language

Summary

Frist create processes, run processes in parallel, and pass information between processes.

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

Get on of these data sets

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

or http://www-odi.nhtsa.dot.gov/downloads/flatfiles.cfm and get the FLAT_RCL file (zip) which are all vehicle recalls in the US (the RCL.txt is meta-data)(schema) description of the data)

if you sort the earthquake data, sort by magnitude, in descending order, if you sort the recalls sort by year of recall and manufacturer (first year, then manufacture name). (The specific data set is not as important as having enough data that your program running time can be *instrumented* - accurately measured.)

Sort with bubble sort

Instrument your program (time it)

Create a program that will, in turn, run multiple processes concurrently using fork( ) and exec ( )(there are several variants of exe (exec1.execv, etc) please dont use threads yet.

Do the sort again in parallel for 2 concurrent processes, then 4 and then 10 processes

Instrument these sorts

You will pass data (parts of the array) to each process (IPC)

You dont need to use the menu to select number of processes, size of data.

In C++ language

Second, you will create a process and threads, run in parallel, and pass information between threads. You will use synchronization operations to avoid overwriting shared resources.

Use the same data set as above.

Sort it with bubble sort

Instrument (time program)

Create a program that in return will run multiple threads concurrently using a kernel level threading system.

Do the sort again, in parallel for 2 concurrent threads, then 4, and 10 threads.

Instrument those sorts(above)

(?) How will you pass data (parts of the array) to each thread?

(You will synchronize sharing resources such as memory)

You can use a menu to select a number of threads size of data.

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!