Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[Step 1] Pres Pl.c: Create two files namely, destinationi.txt and destination2.txt with read, write [Step 2] Prcs_P2.c: Copy the contents of source.txt1 into destination1.txt and

image text in transcribed

[Step 1] Pres Pl.c: Create two files namely, destinationi.txt and destination2.txt with read, write [Step 2] Prcs_P2.c: Copy the contents of source.txt1 into destination1.txt and destination2.txt as 1. Read the next 100 characters from source.txt, and among characters read, replace each char- 2. Then the next 50 characters are read from source.txt, and among characters read, replace each 3. The previous steps are repeated until the end of file source.txt. The last read may not have and execute permissions. per the following procedure. acter '1' with character 'A' and all characters are then written in destination1.txt character '2' with character 'B' and all characters are then written in destination2.txt 100 or 50 characters. Once you're done with successful creation of executables for the above two steps do the following Write a C program and call it Parent_Prcs.c. Execute the files as per the following procedure using [Step 3] Fork a child process, say Child 1 and execute Prcs_P1. This will create two destination [Step 4] After Child 1 finishes its execution, fork another child process, say Child 2 and execute execv system call. Use sleep system calls to introduce delays. files according to Step 1 Prcs_P 2 that accomplishes the procedure described in Step 2. [Step 1] Pres Pl.c: Create two files namely, destinationi.txt and destination2.txt with read, write [Step 2] Prcs_P2.c: Copy the contents of source.txt1 into destination1.txt and destination2.txt as 1. Read the next 100 characters from source.txt, and among characters read, replace each char- 2. Then the next 50 characters are read from source.txt, and among characters read, replace each 3. The previous steps are repeated until the end of file source.txt. The last read may not have and execute permissions. per the following procedure. acter '1' with character 'A' and all characters are then written in destination1.txt character '2' with character 'B' and all characters are then written in destination2.txt 100 or 50 characters. Once you're done with successful creation of executables for the above two steps do the following Write a C program and call it Parent_Prcs.c. Execute the files as per the following procedure using [Step 3] Fork a child process, say Child 1 and execute Prcs_P1. This will create two destination [Step 4] After Child 1 finishes its execution, fork another child process, say Child 2 and execute execv system call. Use sleep system calls to introduce delays. files according to Step 1 Prcs_P 2 that accomplishes the procedure described in Step 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Describe process thinking and system boundaries.

Answered: 1 week ago

Question

Explain the causes of indiscipline.

Answered: 1 week ago