Scheduler Sim
A CPU Scheduling Algorithm Simulator in C++.
Loading...
Searching...
No Matches
RR Class Reference

#include <scheduler.hpp>

Inheritance diagram for RR:
[legend]
Collaboration diagram for RR:
[legend]

Public Member Functions

 RR ()
 A Round Robin (RR) scheduler.
 
 ~RR ()
 
std::vector< std::unique_ptr< Process > > schedule (time_unit &currentTime, std::shared_ptr< Logger > logger, time_unit quantum)
 This function represents moving forward by a single unit in time.
 
bool addToReadyQueue (std::unique_ptr< Process > &process, time_unit currentTime)
 This function represents the addition of a newly arrived process to the ready queue.
 

Constructor & Destructor Documentation

◆ RR()

RR::RR ( )

A Round Robin (RR) scheduler.

◆ ~RR()

RR::~RR ( )

Member Function Documentation

◆ addToReadyQueue()

bool RR::addToReadyQueue ( std::unique_ptr< Process > &  process,
time_unit  currentTime 
)
virtual

This function represents the addition of a newly arrived process to the ready queue.

Parameters
processThe process to add
currentTimeThe simulation time when the process arrived, i.e., now

Implements Scheduler.

◆ schedule()

std::vector< std::unique_ptr< Process > > RR::schedule ( time_unit currentTime,
std::shared_ptr< Logger logger,
time_unit  quantum 
)
virtual

This function represents moving forward by a single unit in time.

Parameters
currentTimeThe current simulation time
loggerThe Logger instance to use for event logging
quantumThe time quantum (if required by the scheduler)
Returns
std::vector<std::unique_ptr<Process>> The list of scheduled processes till now

Implements Scheduler.


The documentation for this class was generated from the following files: