# Non Preemptive Priority Scheduling in Operating System

now let us see the non-preemptive version of this clarity so here once we take a you I’m going to take a process which is having the highest priority we are going to run it till completion without any preemption so now it is a priority based algorithm where we are going to see non preemption okay and and then I’ll see one more thing whenever priorities are given you should always know which one is high priority and which one is low priority sometimes what happens is people will take the low number as high priority and high number of low pride it might happen therefore here they have clearly mentioned x12 is highest priority and to his lowest priority.
we can start from first one so I am going to start at time zero and now at time 0 t1 has a arrived process p1 has arrived and it’s priority is to and I do not have any other option now so only one force is available so I am going to shade unit process p1 and it is going to finish my curls time is four therefore for all right yes now by the time for actually till p5 till this point all the processes are available 2 3 4 5 now among this 2 3 4 5 I had to take the one with the highest priority and in this algorithm they are saying that higher number is higher priority therefore 2 3 4 5 the highest one is 4 therefore I am going to schedule p4 next about it because it is having highest priority and I could run it till t4 can be run until 4 5 which means 9 boss time of p4 is 5 so you can just you can know what is the worst time of corresponding process Lissette okay I know p4 is over so p1 is over and then p4 is over completed right and now what is the time line so by the time line all the process are available so other than 1 and 5 just see what are the priorities other than 1 and 5 30 1 & 4 1 & 4 are over right so force eight or twelve and nine obviously 12 is the highest parity which is P six therefore next for this is P 6 and if first time is four therefore it is going to be finished by thirteen so P six is also over right so now this is over and P 4 is over and then.
One is over so in the remaining ones you pick up the one with the highest priority which is now T 7 right which is having nine therefore P 7 can be scheduled which is having priority nine and which is having the worst time of six which means by 19 it is going to be finished and now next one is among these you can pick the next next minute match maximum so next maximum is 8 so I can pick 8 therefore P 5 is a priority for 85 is the process and it’s burst time is 8 so 90 plus 8 is 27 right oh it’s burst time is not nine it’s box time is it’s burst time is P 5 is 1 which means by 20 it is over right and next one is next one and they are among the available next one is 6 therefore I am going to take P 3 and whose the first time is 3 therefore by 23 tis over and the only one remaining is P 2 finally speed 2 has to be scheduled and its burst time is 2 therefore 25 right so this is how we could schedule all the process maybe you could just transfer by it cp1 Boston is 4 therefore 4 and P for Boston is Phi therefore 96 first time is 4 therefore 13 P 7 birthday message therefore 19 and P Phi first time is a 1 there for 20 and P 3 first time is 3 therefore 23 and P 2 verse 10 is 2 therefore 25 all right so this is all we got to obtain all the process and after this we can see the completion times what is the completion time.