C Code / Program For Priority Scheduling with arrival time. I'm trying to implement Priority Scheduling algorithm but with arrival time is giving, that do the first job first but take into consideration the priority of the job and then do the Gantt graph and calculate the waiting time and the average waiting time but I could not sort by the FJS and priority together that's what I reached so far.
↓. shankarConsider a scheduling approach which is non pre-emptive similar to shortest job next in nature. The priority of each job is dependent on its estimated run time, and also the amount of time it has spent waiting. Jobs gain higher priority the longer they wait, which prevents indefinite postponement. The jobs that have spent a long time waiting compete against those estimated to have short run times. The priority can be computed as:????????
= 1 +??????????? /????????????????Using the data given below compute the waiting time and turnaround time for each process and average waiting time and average turnaround time.Process Arrival time Burst timeP1 0 20P2 5 36P3 13 19P4 17 42.