Question: #include #include readyqueue.h using namespace std; //You must complete the all parts marked as TODO. Delete TODO after you are done. // Remember to add

#include

#include "readyqueue.h"

using namespace std;

//You must complete the all parts marked as "TODO". Delete "TODO" after you are done.

// Remember to add sufficient comments to your code

/**

* @brief Constructor for the ReadyQueue class.

*/

ReadyQueue::ReadyQueue() {

//TODO: add your code here

}

/**

* @brief Add a PCB representing a process into the ready queue.

*

* @param pcbPtr: the pointer to the PCB to be added

*/

void ReadyQueue::addPCB(PCB *pcbPtr) {

//TODO: add your code here

// When adding a PCB to the queue, you must change its state to READY.

}

/**

* @brief Remove and return the PCB with the highest priority from the queue

*

* @return PCB*: the pointer to the PCB with the highest priority

*/

PCB* ReadyQueue::removePCB() {

//TODO: add your code here

// When removing a PCB from the queue, you must change its state to RUNNING.

}

/**

* @brief Returns the number of elements in the queue.

*

* @return int: the number of PCBs in the queue

*/

int ReadyQueue::size() {

//TODO: add your code here

}

/**

* @brief Display the PCBs in the queue.

*/

void ReadyQueue::displayAll() {

//TODO: add your code here

}

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!