Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please provide source code and screenshot Java You are to implement a simple uni-processor scheduling simulator. Your simulator will step through a sequence of time

Please provide source code and screenshot image text in transcribed
Java
You are to implement a simple uni-processor scheduling simulator. Your simulator will step through a sequence of time units, performing the actions of a simple operating system scheduler. The main input to your simulator will be a file containing process-information. Each line in the file will be of the form: Arrive Priority CPU_Time Examples: process that arrives at time 10, has a priority of 5 and has one CPU burst of duration 8: 10 5 8 process that arrives at time 12, has a priority of 8 and has a CPU burst of duration 72 12 8 72 An example of a complete input file is given below. It contains each of the above three processes wit containing a single value indicating how many processes there are: h first line 10 5 8 12 8 72 15 2 7 Some helpful notes/limitations: nArrival times will be strictly increasing in the input file. 2 Your program should accept any valid input file )There will be at most 100 processes. Lower numbers imply higher priority, with the highest priority a 0 and the lowest priority a 9 Your scheduler should be a preemptive priority scheduler with round-robin as a secondary scheduling criteria. The best solution will allow the user to vary the time quantum but a default of 2 should be used for quantum. Include enough output of your program to show processes being dispatched, preempted, completed, etc. At the end of the simulation, output the turnaround time for each process as well as average turnaround time. Provide an electronic version of your program source You are to implement a simple uni-processor scheduling simulator. Your simulator will step through a sequence of time units, performing the actions of a simple operating system scheduler. The main input to your simulator will be a file containing process-information. Each line in the file will be of the form: Arrive Priority CPU_Time Examples: process that arrives at time 10, has a priority of 5 and has one CPU burst of duration 8: 10 5 8 process that arrives at time 12, has a priority of 8 and has a CPU burst of duration 72 12 8 72 An example of a complete input file is given below. It contains each of the above three processes wit containing a single value indicating how many processes there are: h first line 10 5 8 12 8 72 15 2 7 Some helpful notes/limitations: nArrival times will be strictly increasing in the input file. 2 Your program should accept any valid input file )There will be at most 100 processes. Lower numbers imply higher priority, with the highest priority a 0 and the lowest priority a 9 Your scheduler should be a preemptive priority scheduler with round-robin as a secondary scheduling criteria. The best solution will allow the user to vary the time quantum but a default of 2 should be used for quantum. Include enough output of your program to show processes being dispatched, preempted, completed, etc. At the end of the simulation, output the turnaround time for each process as well as average turnaround time. Provide an electronic version of your program source

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

Sql++ For Sql Users A Tutorial

Authors: Don Chamberlin

1st Edition

0692184503, 978-0692184509

Students also viewed these Databases questions

Question

Supply the intermediate mathematical steps in Justification 21.7.

Answered: 1 week ago

Question

Define science and explain four of its major goals.

Answered: 1 week ago

Question

Does it use a maximum of two typefaces or fonts?

Answered: 1 week ago