Create a controller class that implements an fcfs schedule


Do a FCFS scheduler with 5 IO bound threads (1 class) and 5 processor bound threads (another class).

a) The IO bound class will be a thread class that runs an IO intensive operation.  You can write to the system out a number of times (ie 1000) or do something like read and write a file.

b) The processor bound class will be a thread class that runs a computationally intensive operation.  You can perform some math computation a number of times. No IO in the loop.

c) Create a controller class that implements an FCFS schedule and instantiates 5 objects of each class and runs each object.

2) Take the start and stop time for each thread and print out the time it takes to run.

3) Take the start and stop time to schedule and run all the threads and print out the time to run.

4) Run the program 3 times.

a) First time intersperse the IO bound and computationally intensive operations (call the start method).

b) Second time run the IO bound threads first and the processor bound second.

c) Third time run the processor bound threads first and the IO bound second.

5) Attach your code as well as a document.  The document should include snapshots (enough to demonstrate it ran) of the running code as well as results in spreadsheet form.  Results should also list the wait time for each thread.  Also calculate for each of the 3 scenarios the average wait time for the IO bound threads, processor bound threads and the overall run time for all of the threads.  Include a lessons learned contrasting how the Java environment handled the 3 scenarios.  

6) Code should follow standard practices with good commenting, variable and method names, and good formatting.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Create a controller class that implements an fcfs schedule
Reference No:- TGS01229313

Now Priced at $65 (50% Discount)

Recommended (91%)

Rated (4.3/5)

A

Anonymous user

2/17/2016 5:39:05 AM

In the given task, perform a FCFS scheduler. Ensure to read all the instructions and provide the solution as per instructions. The task must write up in word document by attaching code as well as the snapshots. The result must as well list the wait time for all thread. Perform a FCFS scheduler with 5 IO bound threads (1 class) and 5 processor bound threads (the other class). 1) The IO bound class will be a thread class which runs an IO intensive operation. You can write to the system out a number of times (that is, 1000) or do somewhat like read and write a file. 2) The processor bound class will be the thread class which runs a computationally intensive operation. You can carry out some math calculation, a number of times. No IO in the loop. 3) Write a controller class which implements an FCFS schedule and instantiates 5 objects of each and every class and runs each object.