Answered step by step
Verified Expert Solution
Question
1 Approved Answer
java pgm please provide source code and screenshot You are to implement a simple uni-processor scheduling simulator. Your simulator will step through a sequence of
java pgm
please provide source code and screenshot
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 wil be of the form Arrive Priority CPU Time Examples: process that arrives at time 10, has a priority of 5 and has 10 5 8 process that arrives at time 12, has a priority of 8 and has 12 8 72 An example of a complete input file is given below. It one CPU burst of duration 8: a CPU burst of duration 72: contains each of the above three processes with first line containing a single value indicating how many processes there are 10 5 8 12 8 72 15 2 7 Some helpful notes/limitations: Arrival times will be strictly increasing in the input file 2) Your program should accept any valid input file 3) There will be at most 100 processes. 4) 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 wel 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 wil be of the form Arrive Priority CPU Time Examples: process that arrives at time 10, has a priority of 5 and has 10 5 8 process that arrives at time 12, has a priority of 8 and has 12 8 72 An example of a complete input file is given below. It one CPU burst of duration 8: a CPU burst of duration 72: contains each of the above three processes with first line containing a single value indicating how many processes there are 10 5 8 12 8 72 15 2 7 Some helpful notes/limitations: Arrival times will be strictly increasing in the input file 2) Your program should accept any valid input file 3) There will be at most 100 processes. 4) 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 wel as average turnaround time. Provide an electronic version of your program sourceStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started