Give an example of a problem that can be solved with a compu

Give an example of a problem that can be solved with a computer program. Identify the part(s) of the problem that can be done in parallel, and the part(s) that must be done serially. Speculate on the efficiency of a parallel implementation of this problem.

Solution

Use case scenario

1) Say we have 1000 files in our folder /tmp/FILES
2) To read/modify each file completely it will take 1 sec
3) Now we want to search in all 1000 files and change particular key word say \'ALL THE BEST\' to \'BEST OF LUCK\'

Doing it sequentially
- Each file will take 1 sec
- so over all 1000 sec to complete it

Doing it parallely
- Fork 100 parallel process(Number can go higher also depends on hardware capability)
- Need to fork 100 process for 10 times
- And all 100 process will complete the work in same time
- So time taken on whole will be 10 seconds + time taken to fork process

Give an example of a problem that can be solved with a computer program. Identify the part(s) of the problem that can be done in parallel, and the part(s) that

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site