Search for question
Question

Objective: This assignment will introduce you to interprocess communication mechanisms in UNIX using sockets. 1. Problem: You must write two programs to implement a distributed version of the multithreaded incremental entropy

algorithm you created for programming assignment 1. These programs are: The server program: The user will execute this program using the following syntax: ./exec_filename port_no where exec_filename is the name of your executable file and port_no is the port number to create the socket. The port number will be available to the server program as a command-line argument. The server program does not receive any information from STDIN and does not print any messages to STDOUT. The server program executes the following task: Receive multiple requests from the client program using sockets. Therefore, the server program creates a child process per request to handle these requests simultaneously. For this reason, the parent process must handle zombie processes by implementing the fireman() function call (unless you can determine the number of requests the server program receives from the client program). Each child process executes the following tasks: First, receive the input with the scheduling information of a CPU from the client program. Next, use the incremental entropy algorithm proposed by Dr. Rincon to calculate the entropy of the CPU at each scheduling instant. Finally, return the calculated entropies to the client program using sockets./nThe client program: The user will execute this program using the following syntax: ./exec_filename hostname port_no

Fig: 1

Fig: 2

Fig: 3