Using the data set below as input simulate a server with multiple threads. The data set consists of two integers per line: the first being the arrival time, in milliseconds, of the incoming request, the second being the processing time, in milliseconds, required for that request.
Your project should output the number of threads used, the total runtime for that number of threads and the average requests per second for that number of threads. You should try from 1 thread to *n* threads where after *n* threads the runtime and/or the average requests per second does not improve.
For example: if the first lines in the data set are:
For a server with a single thread the total runtime is 25ms since all requests must be started after the previous one finishes. The requests per second is 3 / ( 25 x 10^-3) = 120 requests/second.
For a server with two theads the total processing time is 20ms since the second request can be serviced by the second thread without waiting for the first request to finish in the first thread. The requests per second is 3 / ( 20 x 10 ^ -3) = 150 requests per second.
You may use any of the languages C, C++, or Java to implement your simulation.
[Data set]. Capture this text file and remove the HTML tags for the data.
I want this program include the following stuff :
Listing of program files with appropriate comments,
Description of the algorithms used,
Expected input format with source,
Expected output format with source,
A capture of the interaction with your program (test cases to demonstrate it works as specified).