Question: Purpose: Write a program to implement deterministic evaluation of CPU scheduling algorithms with the average waiting time criterion. Scheduler Sanpshot: Initial ready queue has 5

Purpose: Write a program to implement deterministic evaluation of CPU scheduling algorithms
with the average waiting time criterion.
Scheduler Sanpshot: Initial ready queue has 5 processes where each process has the following
attributes:
i) an identifier (value between 0 and 10, randomly assigned - however, no two processes
can have the same id)
ii) a burst length between 20-100, randomly assigned when the process is created
iii) a priority between 1 and 10(low value indicates higher priority), randomly assigned
when the process is created (two or more processes may have same priority rank).
Requirement 1: Display initial snapshot of the system with the information of above 5 processes as
following tabular manner (order the entries in increasing ID number):
Process ID
Priority
Burst-length
RUBRIC: Correct values within the range (ID, burst length, priority)[3]
Non-duplicate ID
[1]
Display of the initial snapshot (correct tabular format)
Requirement 2: Now, allow user of the program to enter attributes (id, priority, and burst length) of
another process (the 6th one). Make sure the following are satisfied:
i) user may enter any integer as a process ID. Your program must check the appropriate
range (0 to 10). Also, user entered value should not be a duplicate of already created IDs.
Any of these violated, user must be notified and given chances to enter a valid ID.
ii) User may enter any integer as burst length. Your program must check the appropriate
range (20 to 100). If violated, user gets chances until an acceptable value is entered.
iii) User may enter any integer as a priority value. Your program must check the appropriate
range (1 to 10). If violated, user gets chances until an acceptable value is entered.
Display updated snapshot of the system (with 6 processes now) in the same format as above
(Requirement 1).
RUBRIC: Correct input acceptance implementation
Display of the updated snapshot.
 Purpose: Write a program to implement deterministic evaluation of CPU scheduling

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!