You are on page 1of 8
1 Basie. Tho. Pragrdsamiuad, AIM :- ae ~ Siete. Progsidmt _for inplementocbon. | rom ming of Basic Ih Prog A..GoritHM: ~ Prog vows etme aes — Step 1: Start He ir ip Vaziobles we, ee ob Slap 2 Di chow io Nasioble buf! bug 2, dad + ‘ ‘ . fo file & rend and torte 10,0.m 9 DWR ssi siep 3- To open pone ere of iE Siena eae = om AM. np, © ln Finds Hea Cu echelon PS apelin Aen } Firek {eon = velo on) * FAS eaten « Care Stok He Process. oe ae He subtnin Peathasies ced a ei ees Pcp Oe buxale bio os Stork fhe Reocly ee eee ee Bea? Hi fs ALGORITHM: 22/68 Step 1: Inside the structure declare the variables, Step 2: Declare the variable i,j as integer,totwtime and totttime is equal to zero. Step 3: Get the value of ‘n’ assign pid as I and get the value of p[i].btime. Step 4: Assign p[0] wtime as zero and tot time as btime- and inside the loop calculate wait time and turnaround time. Step 5: Calculate total wait time and total turnaround time by dividing by total number of process. Step 6: Print total wait time and total turnaround time. Step 7: Stop the program. AIM: To write a C program for implementation of Round Robin scheduling algorithms. ALGORITHM: Step 1: Inside the structure declare the variables. ‘Step 2: Declare the variable i,j as integer, totwtime and totttime is equal to zero. Step 3: Get the value of ‘n’ assign p and allocate the memory. Step 4: Inside the for loop get the value of burst time and priority and read the time quantum. Step 5: Assign wtime as zero Step 6: Check pfi].pri is greater than p[j].pri ‘Step 7: Calculate the total of burst time and waiting time and assign as turnaround time. Step 8: Stop the program. AIM: To write a C program for implementation of Priority scheduling algorithms. ALGORITHM: Step |: Inside the structure declare the variables. Step 2: Declare the variable i,j as integer, totwtime and tomtime is equal to zero. Step 3: Get the value of ‘n' assign p and allocate the memory. Step 4: Inside the for loop get the value of burst time and priority. Step 5: Assign wtime as zero . Step 6: Check pfi).pri is greater than p[j].pri . Step 7: Calculate the total of burst time and waiting time and assign as turnaround time. Step 8: Stop the program, SSO WRITER Propel (a R, ~Reave Junrren Pao SD AM ee i ee pn ak ade) write problem a = A) Gori THM - Sips tip 2+ 1 2 Slee 3 23 x Skp Ho Paces. cy ahaeie Hens Poaeacs : Declare Re Variable read Con} pale = —_yincibecomsbs i peal fe zeny daskalipe sap te adbee aad E Thom a i> ©. So inl ib Conan eee Ml eee Pro CorSen _- Rob ose. excluuaie es Digs ey = Relrore ex classe ies E dabane

You might also like