HW #3 Fibonacci: F0 = 1; F1 = 1; Fi = Fi-1 + Fi-2; In this project you will create two programs - a parent and child that share memory using shared memory segments. (Don't forget to use ipcs and ipcrm before you leave albert!) Program #1 call child.cpp ------------------------- Example execution: ./child 3 5 will compute fibonacci numbers 3,4 and 5 and store them in an attached shared memory segment. The appropriate memory segment is acquired using ftok on parent.cpp for the key. Program #2 call parent.cpp -------------------------- Example: ./parent 0 100 3 (computes fibonacci #s 0 through 100 with 3 children). The parent process will fork some number of children. It must not call (wait) before the last child is forked. Each child is responsible for computing the fibonacci #s in the interval passed as an argument and store them in the attached shared memory array where appropriate. Have your child call your fibonacci function separately for each value in the interval, rather than doing something more clever and efficient. The point is to show the value of shared memory, not clever fibonacci calculations. Also, use an explosive recursive version of fibonacci and not iterative. If you're unsure how to do this, please see me. The parent will wait for all its children to finish. When they have completed, it will output the entire interval requested. Readme: 1. Report any problems you have or suggestions for this assignment. Make some comment here if you want full credit for your readme. 2. Use the unix time command to test timing results for different executions. In particular, run and report the timings below (this will take some time to finish execution, so be patient). If you find that your first process finishes in less than 5 seconds, make sure you're using recursive and separate Fibonacci function calls. If you're convinced that you are, increase the interval size up until you get timings well above 5 seconds. This may result in "fake" Fibonacci numbers, but it will give your timing results more meaning. time ./parent 1 40 1 time ./parent 1 40 2 time ./parent 1 40 3 time ./parent 1 40 10 time ./parent 40 40 1 3. Comment on the difference in time and use your own words to describe that difference. Extra Credit: For hopefully more impressive changes in the results of time, use the modulus operator on the children instead of intervals. In particular, when spawning three children, child #1 would be responsible for 0,3,6,9,12... child #2 for 1,4,7,10,13... child #3 for 2,5,8,11,14... Child calls would likely be ./child interval_start interval_stop num_children modulus