Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Instructions: (1) implement Round Robin Scheduling 35% (2) Implement Multi-level feedback queue 35% (3) For each, show cpu utilization when all processes are finished (15%)

Instructions: (1) implement Round Robin Scheduling 35%

(2) Implement Multi-level feedback queue 35%

(3) For each, show cpu utilization when all processes are finished (15%)

(4) For each, show average wait time when all processes are finished (15%)

the answer like this program i want it in java

package scheduler; /** * Created by po917265 on 2/12/20. */ public abstract class Scheduler implements Iterable { protected int contextSwitchTime; //how long a context switch takes. protected int clock; //the number of cycles since the system was "started" (the current time). public Scheduler(int contextSwitchTime) { this.contextSwitchTime = contextSwitchTime; clock = 0; } public abstract void add(ProcessControlBlock pcb); public abstract ProcessControlBlock next(); public abstract boolean isEmpty(); public abstract void execute(ProcessControlBlock pcb); public void execute() { System.out.println("Executing Processes"); while(!isEmpty() && clock < 100) { updateProcessControlBlocks(); System.out.println("---------Current Processes----------(CLOCK: " + clock + ")"); for(ProcessControlBlock pcb : this) { System.out.println(pcb); } ProcessControlBlock pcb = next(); clock += contextSwitchTime; //a context switch is happening... if(pcb == null) { tick(); continue; } System.out.println(pcb + "@" + clock); execute(pcb); add(pcb); } } public void tick() { clock++; } public void tick(int time) { clock += time; } public void updateProcessControlBlocks() { //System.out.println("Updating Processes (CLOCK: " + clock + ")"); for(ProcessControlBlock pcb : this) { pcb.update(clock); } } } 

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

Visualizing Health And Healthcare Data Creating Clear And Compelling Visualizations To See How Youre Doing

Authors: Katherine Rowell ,Lindsay Betzendahl ,Cambria Brown

1st Edition

1119680883, 978-1119680888

More Books

Students also viewed these Databases questions

Question

Find Vo in the network shown using Thevenins Theorem 12V 4KLO vo

Answered: 1 week ago

Question

8.10 Explain several common types of training for special purposes.

Answered: 1 week ago

Question

1. I try to create an image of the message

Answered: 1 week ago