one of the main applications of priority queues is in operating systems for scheduling jobs on cpu in this project you are to build program that schedules simulated cpu jobs your program should run in loopeach iteration of which corresponds to time slice for the cpu each job is assigned prioritywhich is an integer between - (highest priorityand (lowest priority)inclusive from among all jobs waiting to be pro cessed in time slicethe cpu must work on job with highest priority in this simulationeach job will also come with length valuewhich is an integer between and inclusiveindicating the number of time slices that are needed to process this job for simplicityyou may assume jobs cannot be interrupted--once it is scheduled on the cpua job runs for number of time slices equal to its length your simulator must output the name of the job running on the cpu in each time slice and must process sequence of commandsone per time sliceeach of which is of the form "add job name with length and priority por "no new job this slicenotes knuth' book on sorting and searching [ describes the motivation and history for the selection-sortinsertion-sortand heap-sort algorithms the heap-sort algorithm is due to williams [ ]and the linear-time heap construction algorithm is due to floyd [ additional algorithms and analyses for heaps and heap-sort variations can be found in papers by bentley [ ]carlsson [ ]gonnet and munro [ ]mcdiarmid and reed [ ]and schaffer and sedgewick [ the design pattern of using location-aware entries (also described in [ ]appears to be new