Question: Modify your assignment 2 solution to use FORK instead of FORALL to implement the parallel rank sort. You may use the posted solution to Assign

Modify your assignment 2 solution to use FORK instead of FORALL to implement the
parallel rank sort. You may use the posted solution to Assign2 if necessary. If it has
not been posted because of late assignments still to be submitted, ask the TA for a
copy. Assume that only seven (7) processors (in addition to the main processor) are
available and design the solution to run on 7(plus the main) processors. Set the
number of processors as a #define value so you can change the number of
processors. Also test your code with 5 processors, but submit the 7 processor
solution. Count the number of JOIN's that are executed and write them out after the
sorted display. For 7 processors, the output should look something like this.
TS 5S,KH,8H,3H, JD 6D,AC,C4C9 QS 7S,2S
TH 5H KD 8D 3D JC 6C AS 9S 4S QH 7H 2H
TD 5D KC 8C 3C JS 6S AH 9H 4H QD 7D 2D
TC 5C KS 8S3S JH 6H AD 9D 4D QC 7C 2C
2C 3C 44C 55C 66C 77C 8C,9C TC JC QC KC AC
2D 3D 4D 5D 6D 7D 8D 9D TD JD QD KD AD
2H3H4H,5H6H7H8H9H TH JH QH KH AH
2S,3S,4S,5S,6S,7S,8S,9S TS JS QS KS AS
 Modify your assignment 2 solution to use FORK instead of FORALL

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!