Question: Please Implament heap. there is a spot where you would input the code. this is c++ programming (Shell) Operating system task scheduling simulation // //

 Please Implament heap. there is a spot where you would input

Please Implament heap. there is a spot where you would input the code. this is c++ programming (Shell) Operating system task scheduling simulation // // // Simulates an operating system's use of a priority queue to regulate // access to a system resource (printer, disk, etc.). #include #include #include PriorityQueue.epp #include using namespace std; // // // // Declaration for the task data struct // struct TaskData { int getPriority () const { return Priority;} // Returns the Priority, Needed by the heap. int Priority, // Tasks Priority arrived; // Time when task was enqucued }; // int main() { PriorityQueue >taskPQ; // Priority queue of tasks TaskData task; // Task int simLength, // Length of simulation (minutes) minute, // Current minute numPty Levels, // Number of priority levels numArrivals, // Number of new tasks arriving j; //Loop counter // Seed the random number generator srand (unsigned int)time(NULL); cout > numPtyLevels; count > simLength; for(minute = 0; minute

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!