Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can you help me with this project? Use JAVA. Please send me original code not from somewhere else or AI Your code should be in
Can you help me with this project? Use JAVA. Please send me original code not from somewhere else or AI
Your code should be in C C or Java. In this project, you will use ordinary pipes to implement an interprocess communication scheme for message passing between processes. Assume there are three directories, d d and d inside your home directory. Initially, directory d has four short text files, named f f f and f Directories d and d are initially empty. You have to use a parent process that forks two children processes.
The parent sends a message using one pipe to the first child. In that message, the parent sends the names of the first two files, namely f and f Similarly, the parent sends a message to the second child, using the another pipe, containing the names of the other two files, namely f and f
On receiving the message from the parent, the first child creates empty files with the names contained in the message, ie f and f in directory d
Similarly, on receiving the message from the parent, the second child creates empty files with the names contained in the message, ie f and f in directory d
The parent process will send to the first child process the contents of files f and f The first child process should store in its copies of f and fin directory d the corresponding contents of the files.
Similarly, the parent process will send to the second child process the contents of files f and f The second child process should store in its copies of f and fin directory d the corresponding contents of the files. After these steps, the directories d and d together should have copies of the four files in directory d In your code you should not make any assumption about the size of files.
Submission Information
The submission should be through eLearning in the form of an archive consisting of:
Files containing the source code.
The makefile or any other scriptinstructions to compile the files and produce the execuable code.
The directories and files you used to test the execution of your code.
Your source code must have the following, otherwise, you will lose points:
Proper comments indicating what is being done
Error checking for all function and system calls
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started