S.Dharani S.

asked • 01/25/22

how to write a C programme which creates two child processes

how to write a C programme which creates two child processes. Accept a file name from the user. First child should read the contents of the file line by line and writes this content in to shared memory space. The second child should read the content and writes it in to a new file. These child processes should be controlled to make sure that the first child reads only one line at a time and it will write the content only when the second child reads the previously written content. Similarly, the second child should not read an already read content from shared memory.

1 Expert Answer

By:

Chris T. answered • 02/11/22

Tutor
0 (0)

Senior Engineer @ Google | Former TA in operating systems

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.