OS U-5 Lec-2 Notes _38513712_2024_07_13_14_39

You might also like

Download as pdf
Download as pdf
You are on page 1of 24
g ran Operating System Unit — 5 Lecture - 2 CS/IT/CS Allied/MCA LC AC Le M.Tech.(CSE), Ph.D.(CSE) Ble REL Total Head movements = (199-53) + (199-0) +(37-0) Ore 4 va - ro ns GW. ample 6: Consider a disk queue with requests for 1/0 to blocks on cylinder ~ SS "4 Ca x Queue : - 72, 160, 33, 130, 14, 6, 180 CT eee eR Ru ES eu RU CEC position is 50. Find the total head movements using C-SCAN disk scheduling algorithm. The eee ee solution © ¢ (4 33 S° 42 Bo so (80 rr a a a aC eee seer d) s ole red eRe Eu rene i ee eee eee eu uc RL BS ee ee on eee 2 Then, it reverses direction immediately without going all the way to the end of the disk. pinnae eS ues ee ec en ies Pe A Sg Se eRe ae Q Itis similar to SCAN except for the difference that the disk arm in spite of going to the end of the disk goes only to the last request to be serviced in front of the head and then reverses its Cre O Thus it prevents the extra delay which occurred due to unnecessary traversal to the end of the cio Cea disk contains 200 tracks (0 - 199). The request queue contains track numbers - EP SCC CELL) Cre en (i) Calculate total number of R/W head monument using LOOK scheduling algorithm. Mache suc Ecc us DRUG ee RCL Cel oe Sods lara ee RU une RR eC s BCL) Bias rel ee) SCAN except that will not go till the last. (Extra move is not required) a Cy Aa io Cee U Ere Cel eet Pio Cy el aod Tn) er Cou ed eC be PSC Rs Eesti ccau nell} ] Example 8: A disk contains 200 tracks (0-199). The request queue contains track numbers - cS] wy 4 aa 22, 160, 33, 139, 14, 6, 180 Current position of R/W head is 50. Calculate total number of R/W head monument using LOOK Par ne ea UM uk ue se es Ee cee ceemeaeal ° CA iol co mrp SY: Ss JRo - and ?y ee te ers (ole ae eran ea ele ere cr ee OE Ear ae kee ale 2 In CLOOK, the disk arm in spite of going to the end goes only to the last request to be services in front of the head and then from there goes to the other end’s last request. Fn TT Ci eee eee een a SCM Cae et tener eee aa see EU EC ELECT Cee he eC eC Ra cere See ee a ee Ee eee Bris Fs Va ead 2! ORCL C a. Ont Rea beng Pa cone & ] Par CBs CT RRR eC eee vA raed 27, 129, 110, 186, 147, 41, 10, 64, 120 Pee SUe e aC esn mce S CUE a ae cot eS Le ee em enue eo) cS] Cee 10 Co) a eT) SYN ue ues Cee U atc ee) Et eee eld ] eRe Wen Total Head Movements = (100 - 0) + (186 - 0) = 100 + 186 co) i Trad eee teas See TTS ee ee tne er Ce a nce scan till last, like if 200 cylinders from 0-36 then if scanning is in forward direction, scan till 199 & if scanning is in backward direction then go till 0. Te eu ee OPC EUR eR Ug el —— scene service in between. Then again start providing the service. sha Dec ee eit aod es Q CLOOK:- It is like CSCAN but do not go till last. pn Vara (ery Q.1. Suppose the following disk request sequence (track numbers) for a disk with 100 tracks is given: 45, 20, 90, 10, 50, 60, 80, 25, 70. Assume that the initial position of the R/W head is on track Ce eRe eater Rod Oe kere oop Pree Ud 0.2. Ahard disk having 2000 cylinders, numbered from 0 to 1999. The drive is currently serving the request at cylinder 143, and the previous request was at cylinder 125. The status of the queue is as Cr 86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130 What is the total distance (in cylinders) that the disk arm moves to satisfy the entire pending request for each of the following disk-scheduling algorithms? (i) SSTF (Olaesd 2021-22, 10 Marks, 2018-19, 7 Marks ee Le VEU Recreate Me aus OCS UPA ROCCE eur eu Cn a aed at track 143 and the last served request was 135. Consider an ordered disk queue with request De ee RCA ee RC Ce LET) Find the total head movement for the following - (i) SSTF (ii) CSCAN PSB UL LS —_— aad ca aa OS eee ee OE eee ae PCEe Cr Q.6. Suppose the moving head disk with 200 tracks is currently serving a request for track 143 and DOs EU ae SCOR uc ere CL POCORN Lo ee eu er me Ou Ti emo) 2015-16, 10 Marks RAD eet eee) ee CSC BUNS Download Gateway Classes Application From Google Play store Link in Description mela tcc VP eu tel (ols

You might also like