Question: THIS IS THE MAIN FUNCTION WHERE YOU SHOULD COMPLETE THE PROGRAM THE PROJECT QUESTIONS ARE IN THE FOLLOWING LINES OF THE MAIN FUNCTION: 60, 72,



THIS IS THE MAIN FUNCTION WHERE YOU SHOULD COMPLETE THE PROGRAM
THE PROJECT QUESTIONS ARE IN THE FOLLOWING LINES OF THE MAIN FUNCTION:
60, 72, 95, 110, 127, 139, 178
YOU ONLY NEED TO WRITE THE ANSWERS NOT THE ENTIRE PROGRAM
THANK YOU





Assignment #2 Message Queues and Pipes Objective The goal of this assignment is to familiarize you with some of the inter-process communication methods (IPC) operating systems provide. By the end of the assignment, you will have utilized message queues and named pipes to transfer data from one process to another. Requirements 1. The program must build and run on the Ubuntu MATE 32 bit (i386) VM for VirtualBox 5, release 2017-01-22 VM image, available from https://gamble.ecs.fullerton.edu/resources Use of GNU C/C++ is required 2. Grading Criteria Your program will be evaluated according to the following criteria Correctness-The program must work as described by this document. Correctness also applies to the management of operating system resources. Resources utilized by your program should be properly released after the program ends. No credit will be awarded for programs that fail to compile Error reporting-Implementation of error checking and reporting is required. It is acceptable to report errors to the terminal. Error handling should properly cleanup allocated operating system resources 1. 2. 3. Coding style The program code should be neat, consistently formatted, and well commented. I recommend following Google's C++ style guide documented at https://google.github.io/styleguide/cppguide.html. Program Summary This program demonstrates how IPC can be used to communicate data between two processes You will be using the system calls covered in the slides on inter-process communication to complete this assignment The program will do the following when it runs 1. The user is asked to enter the number of bytes of data that should be transferred. This value is passed to the generate_data function to create a data string of that many bytes to be transferred between the parent and child processes 2. A function named pipe_xfer is called to create a child process and use a named pipe to transfer the data string from the parent process to the child. After the transfer is complete, the child process will verify that it received the data correctly and display the result to the terminal Assignment #2 Message Queues and Pipes Objective The goal of this assignment is to familiarize you with some of the inter-process communication methods (IPC) operating systems provide. By the end of the assignment, you will have utilized message queues and named pipes to transfer data from one process to another. Requirements 1. The program must build and run on the Ubuntu MATE 32 bit (i386) VM for VirtualBox 5, release 2017-01-22 VM image, available from https://gamble.ecs.fullerton.edu/resources Use of GNU C/C++ is required 2. Grading Criteria Your program will be evaluated according to the following criteria Correctness-The program must work as described by this document. Correctness also applies to the management of operating system resources. Resources utilized by your program should be properly released after the program ends. No credit will be awarded for programs that fail to compile Error reporting-Implementation of error checking and reporting is required. It is acceptable to report errors to the terminal. Error handling should properly cleanup allocated operating system resources 1. 2. 3. Coding style The program code should be neat, consistently formatted, and well commented. I recommend following Google's C++ style guide documented at https://google.github.io/styleguide/cppguide.html. Program Summary This program demonstrates how IPC can be used to communicate data between two processes You will be using the system calls covered in the slides on inter-process communication to complete this assignment The program will do the following when it runs 1. The user is asked to enter the number of bytes of data that should be transferred. This value is passed to the generate_data function to create a data string of that many bytes to be transferred between the parent and child processes 2. A function named pipe_xfer is called to create a child process and use a named pipe to transfer the data string from the parent process to the child. After the transfer is complete, the child process will verify that it received the data correctly and display the result to the terminal
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
