Skip to content

Commit 795591c

Browse files
committed
adjust mRR output
1 parent 1fe4f52 commit 795591c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Diff for: mRR.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ int mRR(Queue& ready, Queue& io, unsigned int tq) {
118118
}
119119
cpu_util = static_cast<float>(total_cpu_time)/static_cast<float>(p_clock.time); //calculate cpu utilazation
120120

121-
std::cout << std::endl << std::setw(25) << std::setfill(' ') << "Round Robin (" << tq << ") CPU Utilization: " << std::fixed << std::setprecision(2) << cpu_util*100 << "%" << std::endl;
121+
std::cout << std::endl << std::setw(5) << std::setfill(' ') << "RR (" << tq << ") CPU Utilization: " << std::fixed << std::setprecision(2) << cpu_util*100 << "%" << std::endl;
122122
schedulerReport(p_clock, process_complete);
123123
return total_cpu_time;
124124
}

Diff for: main.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
int main() {
1010
//****input of 2-D matrix here in the form ex. (cpu, io, cpu,...,cpu)***
1111
std::vector<std::vector<unsigned int>> p_data = {
12-
12+
1313
};
1414

1515
Queue ready, io;
1616

1717
ready.create(p_data);
1818

19-
//FCFS(ready, io);
20-
SJF(ready, io);
21-
mRR(ready, io, 5);
19+
FCFS(ready, io);
20+
//SJF(ready, io);
21+
//mRR(ready, io, 5);
2222

2323
return 0;
2424
}

0 commit comments

Comments
 (0)