Question: Need in java programming And multi threading is not required , it can be done with data structurs too Purpose: Write a program simulating a
Need in java programming
And multi threading is not required , it can be done with data structurs too

Purpose: Write a program simulating a simple CPU scheduler to calculate average waiting time. Problem: Initial ready queue has 5 processes where each process has the following attributes: an identifier (value between 0 and 10, randomly assigned however, no two processes can have the same id), a burst length between 20 100, randomly assigned when it is created, a priority between 1 and 10, randomly assigned when it is created, and low value indicates higher priority. Two or more processes may have same priority rank. Requirement: Display initial snapshot of the system as follows: Process ID I Priority I Burst-length Allow user of the program to enter attributes of another process (make sure to have proper check for duplicate process ID). If duplicate ID entered, allow user to enter a correct process ID Display updated snapshot of the system in the same format as above Assuming all processes are ready for scheduling, calculate individual waiting time for each process and average waiting time using the following algorithms: (i preemptive SJF (ii) Non-preemptive priority, and (iii) round robin with time quantum 20 Display the following: Process ID I Priority I Burst-length l Scheduling algorithm I Total waiting time Based on your snapshot and calculations, display average waiting time for each algorithm and order the algorithms from lowest to highest average waiting time. Notes: You may work with absolute values ignoring the time unit. That is, a process may have burst length 46-you may ignore whether it is 46 seconds or 46 milliseconds. This program may not even need multithreading. Simple data structures (arrays, lists etc.) should be fine
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
