Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write a java program that simulates the CPU Scheduler of an operating system. The program implements the following CPU scheduling algorithms. 1. First-Come-First-Serve (FCFS)

Please write a java program that simulates the CPU Scheduler of an operating system. The program implements the following CPU scheduling algorithms. 1. First-Come-First-Serve (FCFS) 2. Shortest-Job-First (SJF) 3. Round-Robin with time slice = 3 (RR-3) 4. Round-Robin with time slice = 5 (RR-5) The program will read process burst times from a file (testdata.txt). A sample input file of four jobs is given as follows (burst time in ms).: [Begin of testdata.txt] Job1 5 Job2 3 Job3 8 Job4 6 [End of testdata.txt] Note: You can assume that (1) there are no more than 30 jobs in the input file (testdata.txt). (2) processes arrive in the order they are read from the file for FCFS, RR-2 and RR-5. (3) all jobs arrive at time 0 for SJF. Compare the average completion times of all jobs for each scheduling algorithm. Output the details of each algorithm's execution.

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_2

Step: 3

blur-text-image_3

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

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

Students also viewed these Databases questions

Question

Timeline for progress report

Answered: 1 week ago

Question

Define and measure service productivity.

Answered: 1 week ago