Create a circular queue using fixed size array. Each index of your queue should store the execution time of the process. Your task is to provide the implementation of following functions:  constructor should receive the array size and create a dynamic array.  enqueue (function to insert the element into a queue)  dequeue (function to remove the element from the queue)  isEmpty (function to check whether the queue is empty or not)  isFull (function to check whether the queue is full or not)  getLength (function to return the total elements in the queue)  getSize (function to return the size of queue)  reSize (This function should receive the new size as a parameter and resize the queue as per the new size)  getRear (function to return the last elements from the queue)  getMin (function to return the index with least execution time)  getMax (function to return the index with maximum execution time)  getCountofSimilar (function to return the processes with same execution time)  show (this function should only display the process id and execution of time processes in the queue). Assume that there is uni-tasking system. Provide a function that calculates the total time required by the processes in the1 queue to complete their execution. Destructor (delete all the elements from the queue) Your program should not accept any negative value.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Create a circular queue using fixed size array. Each index of your queue should store the execution time
of the process. Your task is to provide the implementation of following functions:
 constructor should receive the array size and create a dynamic array.
 enqueue (function to insert the element into a queue)
 dequeue (function to remove the element from the queue)
 isEmpty (function to check whether the queue is empty or not)
 isFull (function to check whether the queue is full or not)
 getLength (function to return the total elements in the queue)
 getSize (function to return the size of queue)
 reSize (This function should receive the new size as a parameter and resize the queue as per the
new size)
 getRear (function to return the last elements from the queue)
 getMin (function to return the index with least execution time)
 getMax (function to return the index with maximum execution time)
 getCountofSimilar (function to return the processes with same execution time)
 show (this function should only display the process id and execution of time processes in the
queue).

Assume that there is uni-tasking system. Provide a function that calculates the total time required by the
processes in the1 queue to complete their execution.
Destructor (delete all the elements from the queue)
Your program should not accept any negative value.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education