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"
(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:
- Create Binary tree
- Delete
- Scheduling
- Insertion
- Heapify"
Trending now
This is a popular solution!
Step by step
Solved in 2 steps