Question
Write a program in C language to be able to work with processes that run concurrently. (Unnamed Pipes) The function of the different processes will
Write a program in C language to be able to work with processes that run concurrently. (Unnamed Pipes) The function of the different processes will be:
- A: ask the user to enter a number on the keyboard (between 0-9)
- B: Add a (fixed) number to a number (the fixed number is set in the code)
- C: Print a number on the screen
The synchronization between the different processes, and the communication of information between them, should be managed, considering that the communication should be done with unnamed pipes
The result of the program should be:
- Process A will be executed and the number must be sent to process B
- Process B will be executed and the number must be sent to process C
- Process C will be executed
When process C has finished, all processes should end their execution.
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