Scheduler Sim
A CPU Scheduling Algorithm Simulator in C++.
Loading...
Searching...
No Matches
RR.cpp File Reference
#include "scheduler.hpp"
Include dependency graph for RR.cpp:

Functions

std::ostream & operator<< (std::ostream &os, const RRProcess &rrprocess)
 
int compareReentryTime (const std::unique_ptr< RRProcess > &a, const std::unique_ptr< RRProcess > &b)
 Compare two RRProcess objects by their reentry time. If the reentry times are equal, compare by arrival time.
 

Function Documentation

◆ compareReentryTime()

int compareReentryTime ( const std::unique_ptr< RRProcess > &  a,
const std::unique_ptr< RRProcess > &  b 
)

Compare two RRProcess objects by their reentry time. If the reentry times are equal, compare by arrival time.

Returns
-1 if a < b, 1 if a > b, otherwise by arrival time, -2 if a < b, 2 if a > b, 0 if a == b

◆ operator<<()

std::ostream & operator<< ( std::ostream &  os,
const RRProcess rrprocess 
)