Question: CIS 340 System Programming Assignment5 Due: 8:00pm, Tue. April 19,2018 100 points In this assignment, you will modify the client and server programs that use
CIS 340 System Programming Assignment5 Due: 8:00pm, Tue. April 19,2018 100 points In this assignment, you will modify the client and server programs that use pipe to communicate 1- 2. The server generates a random key between 0 and 99. It then waits and reads from the pipe. It 3. A sample run of the programs are as follows. The client keeps prompting the user for a number (positive integer) and send the number to the server via pipe. The client exits when the user inputs-1 will compare the number sent and the key and give proper response. On the client side: turing?:-/Documents/Assign5% ./client Please give a number (-1 to exit):33 Please give a number (-1 to exit):72 Please give a number (-1 to exit):96 Please give a number (-1 to exit):84 Please give a number (-1 to exit):83 Please give a number (-1 to exit):-1 turing 3:-/Documents/Assigns% On the server side the key i/Documents/Assign5./server The key is bigger The key is smal1er The key is smaller You got it, The key is 83 turing 3 :-/Documents/Assign5% I. General Requirements Your programs' implementation must include the following features The client will keep prompting the user for a number (positive integer), and then read the number send the number to the server via pipe. If the number is-1, the client exits. . The server generates random key between 0 and 99. It then waits to read from the pipe. .If there is nothing in the pipe, the server waits (blocked). When the server reads a number, it exits if the number is -1. Otherwise, it will compare the number with the key. It will print a message depending on the result of the comparison. Your programs must be compiled from 3 source files: . client.e (Handles user input and write to the pipe) server.c (Reads from the pipe and prints) myfifo.h (Declares global variables and constants). o o o Your myfifo.h file must contain the proper preprocessor directives to prevent multiple inclusion. You must use a makefile to create two executables: client and server
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
