Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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 ArrayList for the FIFO and RR scheduling schemes. Implement the SJF using a binary heap (priority heap). Use 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Describe the Indian constitution and political system.

Answered: 1 week ago

Question

Explain in detail the developing and developed economy of India

Answered: 1 week ago

Question

Problem: Evaluate the integral: I = X 52+7 - 1)(x+2) dx

Answered: 1 week ago

Question

What is gravity?

Answered: 1 week ago

Question

What is the Big Bang Theory?

Answered: 1 week ago

Question

LO3 Name the seven categories of HR functions.

Answered: 1 week ago