Docsity

Operating system Previous year Questions, Exams of Operating Systems

Partial preview of the text

Download Operating system Previous year Questions and more Exams Operating Systems in PDF only on Docsity!

Total Pages : 3 018404 August/September 2022 B.Tech. (CSE(AIMLYCE/CSE/IT) TY SEMESTER Operating System (PCC-CS-403) Time : 3 Hours] [Max. Marks : 75 Instructions : 1. It ts compulsory to answer all the questions (1.5 marks each) of Part-A in short. 2, Answer any four questions from Part-B in detail, 3. Different sub-parts of a question are to be attempted adjacent to each other PART-A 1. (a) Define context switching. as) (b) What is the function of kernel? (1,5) (¢) Define interrupt. (1.5) (J) What is response time in CPU scheduling algorithm? (1.5) (@) Define thrashing. (13) (Explain test and swap hardware solution for critical section problem? (1.5) 018404/880/1 11/303 ALIP.T.O. & 806/11 /088/rORS 10 ita9) “wa[gorg UoRDAg TRONUD (I) “ssaooy Almay org (1m) “smippodyy Suynpoys st ©) 1 SULMOTIOJ 9y7 UO aJOU YOYS eA, 99) sgoustibes yes oy] pul Ospy 4JOU Io oyR]s QJUs BUT st UIMSAS OU] JT 4891 OF WAPLOS]e JoyTEQ at as/) €€ bp 10 T Sd € ¢ £0 7% € td 76 6 2 0 € fd 9 BEC EM f@€ € €9$ 0 1 @ Id oO av aqvouv aiqeyreay xe uone2o1ry rapes weysds SurMolfoy ayy DARY dan ‘ay ant Ty (8 = 9 '8= © G1 = ¥) seomnosar Jo sodA € pur ‘cq nom ag ‘sossoo0rd ¢ age aualp Fey oUMESY (s) daipeeq oF SO 4g uoypy sds oy are reay gstnaoo yney aBed op way (a) a S06/LL OBB70FE LO op ‘perp uy ovo wep ysstmays woNeooTye AJOMNOUE snonAWOO-LOU are Ty (8) cD ‘sp Supe oBtaAe OU} PUY Os[y tz = uumenb um) WH pure Ars ‘sdd oH Sutsn sessasoid Oy) JO UOTIMASYS OY} SAIBNISMITE JU) ITeYo WHEE B MEI v & s 6 AWIL LSHne £0 70 Ww O | GALL TVARRTY vd Ed td | Id ssdooud (SPUOOASTTTRE ur wing Nd Jo pfusy oy] WE ‘vesseo0zd Jo yes SuIMaTToy ap Jopysuoy @) {uoneuow3ery yo sadA) quasayip ore ym (4) (a1) “rexdeip ayeys ssooord ayeys-/, 8 aveiq] (2) @) {uenvero ssanaid Jo} mayss Sunesodo Sq posayyo saopazas juoIOR Ip ame WIAA (4) (ov wou) ureydxe guoisks Buyesedg jo sammjonys maroyyp ase wy (¢) aLavd cn juoneurys stay (D) op ESA] Jo suorsstaued sysooe are yA (OD) (nD {Ainddnss &q veow nos op wy (i) GD antq Sap Sq weour n04 op reg (8) '§ @ (2) () (by 3% ‘What are the necessary conditions for the occurrence of a deadlock? (L.5} ‘What is thrashing? How it can he resolved? (1.5) What is the difference between First-fit and Best-fit memory allocation methods? (15) What is the difference between a binary semaphore and counting semaphore? (1.5) Differentiate between External & Internal Fragmentation? (5) PART -B Explain the concept of Long term, middle term and short term scheduling with the help of suitable diagram. a What is meant by Process Control Block (PCB). Draw ‘P-state process state diagram considering suspended states. (8) Consider the following scenario of processes with time quantum = 2: Process Arrival Time | Execution Time Pi 0 5 P2 L 9 P3 2 7 P4 3 2 PS 4 4 301403/130/114/272 2 Draw Gantt Chart for execution of processes showing their start time and end time using FCFS and Round Robin CPU scheduling. Calculate turnaround time, normalized tumaround time and waiting time for each process. Also calculate average turnaround time, average normalized turnaround time and average waiting time for the system. (10) (b) What is a system call? Explain, with the help of an example, how it is executed? (5) (a) Consider a system with three resources and four processes and the following information. Total_Res Rl R2 | R3 3 4 11 Process Max Alloc RL R2 } R3 RL R2 R3 PL ty] 0 1 ie) 0 1 P2 1 7 3 1 9 Oo P3 2 3 3 1 3 5 P4 Qo 6 3 9 6 3 Determine the contents of Matrix Need. Find out whether the system is in safe state or not? (10) 301403/130/1 11/272 3 [P.T.0. ‘Old! 222 /1 OE L/EDb LOS CD gureoud densyoog Jo aor op ureideq (a) cD é8uynpeyos aandteard ~vort pur aandurserd weemyeq aonazagrip ap st TeuA\ (p) wr) yssaoord U pus wewoid & UseMiog TURTATTIP su) st-JeuAA (9) ou (worsks Zunesedo Suppsernnyy poe Surmueseidynpy useaisq aauaraynp ay) st yeqAA (q) (SP) Esuonouny sit are Tey, jOnIIshG TuNeIdC surged] (8) v- avd uae 10u fi Vodinbas seaaieyan DIP pavpuMts ojqoiins aunssy . sayse ysoa 04 juaspipp paiduag aq of aap uensenb n Jo sund-qns mosaffig. “polap ul g-Ling wouf suonsanb tof cup samsuy ‘Moys ut WeLing fo (yore sya cy) suoisanh ays jyo samsup of Cuospndwos st ty T J SHOYORSUT SL: STEW, EW] [smoy ¢ : eum, (€0F-SO-00a) arsdg SupardO UPLSHWGS Al - CLVASOVAD) Walsh 0707 “2qQ9RQ COPLOE : saBeg peqoz, “ON TOW v ZLZ/L OE L/SO8 LOE ‘waTgosg seudosopd Sunn “SpeaML], JeAe]-oUISy pure yeagT-7289 “MOTRIOT Te PEXUT] pur uorwooTpR snonsnuoD Qe) @) F) GD 2 JOU UE ssnasi] (s) -apdurexa arqeans yay soroyod Farnpeyss ASIP HOOT PUE NVOS 241 [erep UT meydey oD “symey afed yo Jaquinu ays 07 yodsar YILM soWeUopied Tam aredwop -¢ = eziy swe mA suyoSys quetuzorydas aded Cert pue Punds ‘Quy wemerduy GETLEEGLE TTC OS TTP ETT (07 = ) Sums sousajau aded SMOAoy stp JepisuoD (gised. sit are yaya, Le0usIaJal Jo ATO] ST FET AA (on) “SUNPLOTTE FuyMpoys Josssooud [NY Oat Aue urerdxg -sunpuospy Suynpeyos sosseooudnynyy AIUMY-qop pue PUI] g-qor weemjeq ayPNUaIOTIC: ico] "SO 4° AMNSSTYOIE jMTAPOIONAL pur onpTPOUGW, OEldyg () @) ws Roll No. .. Total Pages : 3 301403 May, 2019 B, TECH(CE/IT/CSE) - 4th semester Operating System (PCC-CS-403) Time : 3 Hours) [Max. Marks : 75 Instructions : L it is compulsory to answer all the questions (1.5 marks each) of Part-A in short. Answer any four questions from Part-B in detail. Different sub-parts of a question are to be atrempted adjacent to each other. PART-A 1, (a) Explain context switching. (1.5) tb) Briefly explain the necessary conditions for Deadlock to occur. (1.5) (©) Explain briefly External fragmentation and its solution. (5) (d) Briefly explain the file operations. (1.5} (©) Differentiate Paging and Segmentation. (1.5) (2) Differentiate between Pre-emptive and Non-preemptive scheduling. (5) 301403/870/1 11/32 PTO. 214 g ZE/LLLOLBEOP LOE (sh) -mays&s ayy yeatsyd pure wrarshs ofty Horo] ersduod “wars4s ary Jo Jopow Teranad uretdyg (q) ‘aotAap [eNUILA pue pazeys pueduiog ‘maweSruem dataap Jo senbwysoy urepdxg (&) *Z GL) ‘voneiuania[dun Arojesic] pue words at yy sturerBerp Aressaoon Jo djoy ayy ym urepdxg (a) LD “spoqout SUOHRIOTE si pue asmonsys uroisds ayy uredxq (@) °g oD “SOUBplOA® YOOIPESC pure uonueaord yootprad urefdxg {s_oojpead Sulppuey Joy spoyyeu yweragzip ey ore wy (q) (9) ‘sumpiosye quauraceydal a8ed oui ssnosiqg ,SuTmsaiy} Jo ssnea aml st weOAA (8) *S (st) ‘MOOT-O (4) WOOT @D ALss Sdod wos LBL ‘Th “ZET “68 “EZ PULy ‘QOL Jequinu ye sra3s pwaT, SH 2U) GGT-O Wosy porsquine sxopuqhs OO? ae NUL, 'b z Ze/} L WOZS/EOr LOE (on "uonwoolty pexepuy pue payary (A) “uonesoT fe Par] pu snonEnveD |) 1 stmita} SUTMOTTOT oY) wesAIeg o1eTUEIARTC () “Iampayos Uua1-oys: pur cual Bo} Ueamiag eredimog IsTHpayos ouyed (s) “wigoy panow (i) ars @ $dda £ £ 9 ra @ T Suny, sg ‘S5a00Ig supose Surpayos Surmoqjoy sujsn Aq we[qgoid Butmoypoy ay sATos Dp “sopdunexa qin supuogye Suynpeyos juaregp urepdxg {2aynpsyos NAD Aq wesul st wey AN aLavd (1). "sassaoord uo suonerado urerdxe pur erg cD “urerseqp 3IqeAs WM spod> asNg O/T pur dD wefdxg ep “Supssesoid yoweq sued, cn “Snrumrexsoid -Hynu pue Surysenypam oaamjog e1emusssyjid @ ®) @) oO o @ 8) € (g) What do you mean by dirty bit? (h) What do you mean by swapping? (i) What are access permissions of files? (j) What is starvation? PART-B 2. (a) What are different structures of Operating i | Explain them. ( (b) What are different services offered by operating a for process creation? (a) Draw a 7-state process state diagram. 3. (b) What are different types of fragmentation? 4. Consider the following set of processes, with the length] CPU burst in milliseconds: PROCESS Pl ARRIVAL TIME} 0 | O1 | 02 | 9% , BURST TIME .| 9 | 5 3.1 4.]9 Draw a Gantt chart that illustrates the execution of te processes using the FCFS, SJF and RR (time quantum=)) (15) Also find the average waiting time. P2 P3 P4 5. (a) What fe) are non-contiguous memory allocation sche! » », Explain one in detail. ) _-018404/880/11 1/303 F 6. 7. -(b) When do page fault occurs? What ate the steps taken by OS to handle? (3) Assume that there are 5 processes, PO through P5, and 3 types of resources (A = 15,B =8,C = 8). At time TO, we have the following system state: Allocation Max... ‘Available A BCABC ABC Pile? 12055. 6-3 3 3.2 p23 23 8 5 6 p33 0249 2 P43 207 4 3 ps 1:01 4 3 3 Use the banker algorithm to test if the system is in a safe state or not? Also find the safe sequence. (15) Write short note on the following : (i) Disk Scheduling Algorithms. (ii) Direct Memory Access. (ii) Critical Section Problem. (15) —— 6) Q2 (a) (b) Q3 (a) (b) (c) Q4 farsa SSat FAT F? What is a race condition? (1.5) da paler Fa 8? PART -B Explain the architecture of a microkernel based operating system. (10) wa nieHiacter srenfta sitatiea fees & anfeteax Ht area Ht What is semaphore? Explain its initial implementation. What is the problem (5) faced in this implementation? Give the final implementation. Saree aur 8? seh ORs aaiedua a GASISAl Se Heda A aT AEM Hi El 8? sift fated Sve! : Write the algorithms for providing synchronization solution to dining- (5) philosopher problem using semaphore. The solution must be free from deadlock/livelock. SATB HT STAT HLA ST ST fascias VASA & fare Rsptassteret Sarna vera axa & fae vealar ea aaa sselten orsacitn S AeA Bet afer) Explain the concept of paging. (7) Ofsier At Hato HT BASSS | In a system, the following state of processes and resources is given: R2>P1,P1>R2, P2>R3, R1>P2, R3>P3, P3>R4, P4DR3, R49P4, (3) P45R1, R19P5. Draw a RAG and check the deadlock condition. wen eer A, ofeasit ste Garett A Prrafafaa fete at ag &: R2>P1,P1>R2, P2>R3, R1IDP2, R3DP3, P3DR4, P4OR3, R4DP4, P4>R1, R1DP5. Wah RAG date iz asain a feafe A are ae Consider the following scenario of processes with their priority. (15) oirenait & Grafataa oftees oy sacht oreafanan & re fea eI Proces | Arrival Execution | Priority | s time time qraftsat Uissat | Hera ToqSoTeot | SAT FAT Bi 0 8 4 Be 1 20 3 | |. P3 2 S 2 P4 3 ies 6 a) oe eee eee di Draw the Gantt chart for the execution of the processes showing their start time and end time using priority-number based scheduling(preemptive), Shortest Job First (preemptive and without considering the priority number), Round Robin with time quantum=8. Calculate turnaround time, normalized turnaround time, waiting time in each scheduling for each process and average turnaround time, average normalized turnaround time and average waiting time for the system. qaiaaen-aen snake dsalert Gare), area aia wee (MraTEeea), (arerfetenat ox ferare feu feet), qa aaien = 8. ure WSs Viaa HI SIT anc ofirensit & Rrmaat & few ale are ward cass Ba, BTA cans aa, gate Vira & fae veer ae Se sila eeisISS TA, shea areca eatarerse ara 3k fecar & fare attaat acer wares Fr Ure LY Q5 (a) Explain the hierarchical page table structure. (8) arena Ist Caer Baa Al CATT HL (b) Consider a system with following information. (7) Pease aera & sre vs gore a ae HI | Proces | Max See [ Alloc [s [psc td | | iE Ri eR? “ihe so Rae RA Res cRos . | Rae | P41 4 2 0 2 [4 2 [0 [2 P2 41 it) 0 i) 4] i) 0 0 P3 3 1 es 4 0 41 3 a P4 1 0 z 0 i) i) 0 10 [P5 ie Se if i ii 0 4 {2 i)What is the content of matrix need? ii) Is the system in safe state? iii)A request from process P1 arrives for [0 2 0 4], can the request be granted immediately? i) Ae Afera faa) er Beca art Bit Hae HF? iii) war P1 SH Bree [0 20 1) & fae aret 8, Fa seer ate fee ST Hea B? Q6 (a) Consider the following page reference string: (9) farafafaa yo wast Rea we faa wt 4,0,5,1,1,3,5,1,5,3,4,5,2,1,3,0,1,4,0,5 Implement FIFO, Optimal, LRU page replacement algorithms and compare the performance based on the number of page faults with frame size 3 and 4 PUY, SCAM, TAIRA ISS WATT Wea OTE HE SH Sha HTT 3 HA 4B MA FSS AST HY Tea He HVAT A Geaehet SH Fora HL Total Pages : 04 - 003403 Operating System (PCC-CS$-403) Time : 3 Hours] vi, va, viv, Ta a areres any four questions from Part B in detail = _ > =e Different sub-parts of a. question are to be eS : attempted adjacent to each other. bed y PartA a fed La Differentiate between kerne] and shell. 1,5 te (b) What is device controller en Fa (C) Define Pcp. 1 hes} - “a (d) Define system call. 1.5 ; (ec) What is a Suspended process 2 1.5 (f) What is a context switch time ? 15 —sen ae ‘the rules: for Selecting a time nattin quantum’ in round robin _ process scheduling ? 15 825-047) C.003403 PO = Uelall.