Write a program to test the effectiveness of these


Round Robin (RR): Jobs are processed using a fixed time-slice. The jobs are initially kept in a queue based on the order of arrival. The job at the front of the queue is removed and served similar to the FIFO algorithm. However, unlike the FIFO algorithm, each job is served up to the pre-defined slice of time.

If job can be completed within the allotted time it is fully served and removed from the queue. If the job cannot be completed in the allotted time, it is served for the allotted time and then added to the end of the queue to be served later for the remaining time. This process is continued until the queue is empty.

The total turnaround time is the total time a job spends in the system: Turnaround time processing time = waiting time + (time spend in queue). For example, it the work load is 15 units, but it spends 50 units of time in queue, waiting to be processed, then the turnaround time is equal to 65 units.

A) Write a program to test the effectiveness of these algorithms. Create 100 jobs, each with a random processing time of 0 to 100 time units. Then process the jobs according to the above scheduling methods. You can use an Array List for the FIFO and RR scheduling schemes. Implement the SJF using a binary heap (priority heap) a time slice of 20 units. Compare the average turnaround time for the different strategies.

B) Experiment with different time slices for the RR strategy and compare the results. Use time slices in increments of 5 units and see if there are any differences in the average turnaround time.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a program to test the effectiveness of these
Reference No:- TGS02917969

Expected delivery within 24 Hours