ENEE150_S19_HW08 due Thursday 4/25 before 11:59pm General ENEE150 homework rules as usual. -------------------------------------------------------------------------- Problem 1) pipetrip.c, Makefle,...

This homework get extended up to Sunday 28/04/2019


ENEE150_S19_HW08 due Thursday 4/25 before 11:59pm General ENEE150 homework rules as usual. -------------------------------------------------------------------------- Problem 1) pipetrip.c, Makefle, tx1fle1.txt, tx2fle2.txt, readme.txt The goal of this problem is to try out the ‘pipe()’ functon as a method for providing interprocess communicatons (IPC) in a program. The provided program ‘message_pipe.c’ provides an example and jumping-of point for this. The program creates a pipe, forks a child process and places the write-end of the pipe with the child. The read-end of the pipe remains with the parent. Afer a short delay the child reads the program’s text from a fle and sends it to the parent through the pipe. The parent prints out the received data to the console. The child’s sending process has delays inserted to simulate the eventual goal: humans typing chat-text. For this problem you will generate two children of a parent process and connect each to the parent through both read and write pipes. Instead of printng out data sent to it, the parent process will relay any data sent to it by one child to the other child. - Child1 will read tx1fle1.txt and send it to child2 via the parent process, where child2 will save the text fle as rx2fle.txt . - Child2 will read tx2fle.txt and send it to child1 via the parent process, where child1 will save the text fle as rx1fle.txt . Problem 2) nwebXNBtrip.c, clientrip.c, Makefle, tx1fle1.txt, tx2fle2.txt, readme.txt In this problem you will try to repeat the example communicatons of Problem 1 between two processes for clients who are connected to a server by internet sockets. The provided program 'nwebXNB.c' (nwebX NonBlocking) is a modifed version of the program used in HW07 in which the ‘accept()’ call in the server loop has been made non-blocking, and the server loop is now the parent process’ main loop. The reason for these changes is to create an architecture which is similar to that of Problem 1. For this problem you will modify nwebXNB.c and the client.c program from HW07 so that when two client executables and the server executable are run, the test fles will traverse the system as in Problem 1.
Apr 25, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here