Your task is to create the CPU execution scheduler where the jobs are kept in a priority queue implemented as a binary heap.  Make this a round robin type of execution where the jobs are deleted from the heap, executed for 2 time units, and re-inserted with a lower priority into the priority queue.  Jobs that have completed execution would not be re-inserted into the heap.  New jobs could come in at a priority that might be higher than the aging jobs. .   For example, the following tree represents a Maximum binary heap. Each node indicates the priority and the total execution time of each process. This a round robin type of execution where the jobs are deleted from the heap, The system assigns the next CPU time (time slice) which is 2 unit to the highest priority process. Your code should have the following functions:   Create Binary tree Delete Scheduling Insertion Heapify"

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

(C is the language)

"

Your task is to create the CPU execution scheduler where the jobs are kept in a priority queue implemented as a binary heap.  Make this a round robin type of execution where the jobs are deleted from the heap, executed for 2 time units, and re-inserted with a lower priority into the priority queue.  Jobs that have completed execution would not be re-inserted into the heap.  New jobs could come in at a priority that might be higher than the aging jobs. .

 

For example, the following tree represents a Maximum binary heap. Each node indicates the priority and the total execution time of each process. This a round robin type of execution where the jobs are deleted from the heap, The system assigns the next CPU time (time slice) which is 2 unit to the highest priority process.

Your code should have the following functions:

 

  1. Create Binary tree
  2. Delete
  3. Scheduling
  4. Insertion
  5. Heapify"

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Perception
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE 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