Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need to solve this 2 questions Q1 (20 points)-Explain the role of the init process on UNIX and Linux systems in regard to a)

I need to solve this 2 questions

image text in transcribed

Q1 (20 points)-Explain the role of the init process on UNIX and Linux systems in regard to a) (10 points) process creation b) (10 points) process termination Q2 (20 points)- An echo process echoes back whatever it receives from another process back to Write a C program using ordinary anonymous pipes in which one process continuously inputs a string (1.e., a character array) from the user via the keyboard, sends the string to a second process, and the second process reverses the characters in the string message received, and sends the reversed string back to the first process, i.e, echoes back in reverse form. For example, if process sends the string "Hello", the second process will send back the string "olleH". (We have not covered strings, i.e., character arrays, in our C lectures yet, but there are several examples on reversing a C string in the following web page: https//www.programmingsimplified The first process should print whatever it received from the second process to the console. This should continue until the user types -1 to indicate that the operation is over. Your and the first processes should exit gracefully, meaning that the second process should exit first process should wait for the second one to finish before it exits/returns itself Your program will require using two pipes, one for sending the original message from the first process to the second process, and the other for sending the modified message from the second to the first process. You can write this program using either UNIX/Linux or Windows pipes (Note that we did not cover process creation, and anonymous pipe operations for Windows during the class, but your textbook has examples on both. Alternatively, Windows users can use the Cygwin utility which you should have used for your second assignment to emulate a Linux like development environment for their Windows machines)

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

Students also viewed these Databases questions

Question

Functions of Nonverbal Communication

Answered: 1 week ago