oldques - Old Operating Systems Exam Questions Hanuarfi...

Info iconThis preview shows pages 1–21. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 8
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 10
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 12
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 14
Background image of page 15

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 16
Background image of page 17

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 18
Background image of page 19

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 20
Background image of page 21
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Old Operating Systems Exam Questions Hanuarfi @111, Questlons I. Brexide m M the following terms; n process; n process n imultiprogramming; n time Eharingi E marks 2. Can a process make a transmierfl m the ready share m the [Jacked] sfaiefl Whay en E nojfl Q marks 3. [[EJ rennderehin scheduling, new processes are placed a: the end Bf the gueue2 inathefi than all the beginning. Suggest a reasem fl Lhisj E marks 14s Mimi is the distinction betweerfl user modd ancfl kernefl mode? [1 imark] Papefi 3, 2001, Questions I. What as the M betnLeen Ional and global [gage What are them respectlve advantages and. disadvantages] [g marks 27 Kionsiaer the tollowing Em {a} finternal fragmentationJ (h) process taB e sizeJ (g) I/q Bverfieaa, (g) Ioca iti of reference. Whicheflthesdfaeterscrmldbensedteargugtfnfialargeflggmandmhieheenld be tuserl tn argug fer a Smaller page hizeZ Why? E marks E mmmammwmmmmmammmm nnsafestateZ Emarks Vii Whichmmethodnmnldyounseflasystenrwhesemamtasldisflatahase management? Why? E marks Papefi 4; 2001, Questions I. What is thd m betmeen a [process and a m Deseribfl seme m psing threads E marks 27 [Whyi is it a good ideal trj Write the disk—scheduling algorithm as a separate module & thd operating system ? [g marks 33 Assume that n processes apply the fullfl distributed @pproach for mutuafl Lexclusiorfl irfl a Histrilmted Systemi HE many messages are reguireg m be Bent and reeeiled. byi a single firms tQ entefl HE critieal seetienfl Explainl m am E marks Danuaryl 2002, Questions I. What are the advantages Efl using multitfireaaingl Hive an example when mnlt'k threading E [preferabld to us1ng single—threaded prmesses. E marks 27 [[fil a hateh system7 there are fljobs N through E Mithl 11111 times g 42 llM flz l seconds2 respectively. Iheirl arrinal times are m g E E 3 seeendsl What is the tnrnareund. m usmg the shortest—job—firsii Scheduling algorithm‘fl Is this the optimal turnarode timd arrrorrg HE lnonpreemptivd runs? [5 marks] Bl Consider the Dining {Philosophers [problem with m philosophers billll Mitlfl n + ll forks; tthXtmbrMEEflthelmiddleoflthdltabldahdeanbensedpflmphilosopherE on X E one ofl them at a time Is aeaa OCR lpossible? Exp ain Xour answer. marks] Papefi 3, 2003, Questions I. Describc how System balls Morki E marks ZJ Kliitlind paging in Windows mm marks] 3J Explainl What hard and symbolic links are marks] Vii Describc how acccss control lists and capability lists arc uscd as protection mecha— m E marks Paperi 4; 2003, Questions the m bejmeen internal and. externau iragmentations] Why 1. Explain they be 2 Explain ii M is iii a @008 iaea in genera to separate po icy achieved in process scheduling] E: TIE FAT—16 uses L6 bifl addresses. mm are thd amided. {.4 how meniters are fused in interprocesg mmmunigaliem and 8 KB block sizes; respectively? E K? [6 maximum partitioni sizes should. marks marks from mechanism? Howi cam iii 1% marks] for 2i 4 [4 marks] Danuary, 2004; Questions I. Deseribe mm m bejmeen preemptivg and non—preemptive scheduling algo— rithms Which (1116 E suitable fori a timesharing @Xstem? E marks 27 Kjonsiaer the iollowing [Erogramz Whilei TRUE @fork! y; Deseribe Mhafi the dangeri E E running this program a UNIX machine} and propose a w to limit its 3] Leffecti marks] 3i Name HM) advantages ofl usmg binaryi semaphores in mmde mutual bxelusiorfl among several processes over Peterson’§ so ution. marks] Papell 3, 2004, Questiond LlfherearefifiprocessegmlteEtemm [Iheifiarrivaltimedareg LEE]de second7 respectively. Their process1ng times are 3l H 2, 5 and 5 Seconds} [espectivelyl Mm is the average turnaround timd usingj lfirst—come—first—servedl shortest—job—firsfi fl round—rOBifi {with ]l second Quantum) scheduling] d marks] 2i Explainl lthe concept ef @071ch W, and fleseribe hem E be used inJ page replace— ment a goritfims. ill marks] 3i [[Ifl Linux7 semaphores are numbered and a [prUcess can ask lfen semaphores @1113 inJ ascending brden [Hem dees this help td prevent deadlme fl marks Vii What are lthe respectivg advantages and disadvantages E implementing threads irfl kernel space and ifiJ space? :1 marks Papell 4; 2004, Questions I. Briefifi deseribe [th paging is fimplementefi irfl UNIX E marks 2i Klonsider the following seguencg oil disld track requesfs: 27l [l29l 110, 186, 14H 4h [10, % m AssumdihaiiinitiallylihdheadisaiimkEGandiSmovingfinlthediregiiorl Efl decreasing trash numberl Klompute lthe numberl Bf tracks the head :rarrerses psing FIFOJ SSF and elerrajzorl algorithmsl 5 marks 3 Deseribelthembeimeenlmofieswimhandprocessm Almarks EU Klonsider the dining philosopher probleml Assume hhafl some philosophers leflyS piik their BE HE HE (a e ty 1 and some philosophers always piik gp them @fifififi “rightX’D. Alsoaswmethaiihereisaileasionelafiandone righty all the table Can deadeLk begirZ 1s m possible assuming a fairl mm policylli d marks] Danuarfl 2005, Questions I. Brieflfi deseribe what this is sjored irfl the process and. thread tablesj [3 marks 2J Where are five bobs Mitlfl arrivafl times g 92 g; Q; and 4 minutes and trunnng times 2 g I, Z and Q minutes respectivelyl What as the average Mnarmmd Lime figsing IDJlIHLIQbiIl E marks 33 Explaig how linearly ordering [resources helps R prevenf deadlockl marks] 10 Papen 3, 2005, Questions I. Briefifi explain [th W traps morkl [fl marks 2i How many disk accesses are neededl to read a small file Kielm smaller that the Size Efl a block) m hard. disld irfl UNIX and irfl WINDOWS W007 Elxplaip youn anSMLerJ [fl marks 33 lllll the solution for the lbounded—bufferi problem2 we hised W counting semaphores2 empty and. EH] (besides the flainaryl pemaphorg mutex]. Explain lwhyl iii is [better to use thenfl than keeping tirade ofl the empty slots by us1n§ arr ordinaryi yariablej [g marks Vll A small computer has 4 page m A process makes the following list & pagg M1,; E 42 ll, E E E llz E HE many [page Deenntising FIFO2 beeond. thancel and. least—recently-used [page replacement plgorithms? [g marks M Papefi 4; 2005, Questions 1. 13m supports 833L611 m attriButes must 1% presentr Name tfivd of tfiern. m HEtypesJ threefithem Mafildfisigredfiadatalsimmrflbafledhngdeiindex Anthem structurd cal eEI a file object is breatecF m does this achieve? node . At least rune a process ppens a file, a aata [d marks] 2i Bpih WINDOWS and UNIX brmsi :hd pr10r1ty Qfl I / O—bound [prUcessesq Explain m this is a goocfl ideal am this lead to starvatiorfl of CPU—bgund processes? marks] 3i Whafl E BeladX’s @nomalx Vii Kionsiaer the [a] A starvation—free solutiorfl is also deadlock—free. Kb) LA deadlock—free solutiorfl is starvation—free. Are they frué or falsd irfl general? Explaig youn answer. 12 Q marks rollowing HALO sjaiements abrmfi m problemsJ [(1 marks] Danuary] 2006, Questions 1. Assume a scheduling] [policy that reguires that an unblocked process should. @ the CPUtnextjsiiflwhenaprocesshlockSEEputMthdreadystatemsteadofthe running] state @irectlx. Describe a scheduling knechanism that achieves this goal] [4] marks] 2i Ammthaflammsfimfihmmguardedhyammflficmsa fatal error m causes HE process td bd killed] Explain] how this could efiect Btfiefi processes. Suggest a way the Q3 can eliminate the problem] marks] SJ Desflbflanaflocatiorfloflthafiflieldsmunsafeflhotfleadlockedstatel Show Why it] is not guaranteecfl that] deadlocld will not occur. marks] 13 Paperi 3, 2006, Questiond 1. Each process is created with an address space thali am aeeess to every memory— mapped E the process. Explainl bend a [process can objectfi that not in] its addresd space (g, a file . marks] 27 [IherdarefifiprocessegwitharrmaltimesggEdseeonddandrunningtimedi, 2; m m 2 Seconds} [espectivelfl What 33 the averagg turnaround time usm (a) IQJlDd—JQbiIl [g marks n M] scheduling? SJ A system has fonn processes pupa,ngng and three Mpes ofl dedicated R1], LRjM &. TFe existence vector is E = (a 2, i BmesdplmmeommdflmdrequestdQEMM&q i Broeesdpgholddtnrdfifioflfizandrequeststmonmtsofflbndofiemof &1 i BroeesdpgholdeorremoflflandrequestdQKeMQfflj; i Broeesdpgholddflmnnfisoflflandrequestdonembfj. {a} Compute % avai iBi itX vectorJ [1 finark] @ Explain whetheri the system E deadloekedZ Q marks Determindwhethenthidstatebfthdpxstemifisafefl @marks EU Argud for conditions unden Whicifl thd access control metfiod is finferiori to % capa— bility [list ppproacp for implementing thd protection tmatrix. marks] 14 Paper] 4] 2006, Questions 1. Both Unix and Windows2000 re;calculate the priorities E processes m time to em Briefly describe how this dynamic ireLallocation of prlorltied works and explain] its benefits] marks] 27 Klonsider the iollowing pseudo—code: m m flag; EIEEEO] = fIEQE1] = FALSE; pr6q(inu ED fl while QTRUE) fl while [giggflli+1) mod 2] == IBUE); flag = TRUE; EWME £lg3Ei] = EALSEJ H E Explain Whetheii this codd solves the briticafl sectiorfl problem for W [QFOCGSSGS] [g marks 3t [It a paging system, page boundaries are transparent R thd programmer] Explain hovxfi a loop might cause thrashing irfl a statid allocatiorfl paging system hvhert the memory allocatiorfl is tod SmalL [g marks EU Assume that Wimdoflsm stores a fild on thd hard disk busing the following runs: Ktraclfi E Sectors 174]2 Ktraclfi E Sectors 478]M Ktraclfi E sectors 2710)Z (track E sectors3—7]. MmuclflseeldtimeisneededtoreadthisHEusing (a) thd elevator [2 marks] (b) thd shortest—seek—firsfl [2 marks] a gorithm; in Both cases the initial position of] the head is at tracld 20] HQ initial direction oil thd head is flown] and the track—to—tracld seeld time is Ems. Explain Whether] this computation wouldl hhange E] instead oil using runs2 thd sectors storing the file mere randomly placed irfl tracks 12734? E marks 15 Papen 3, 200?, Questions I. Briefifi desnribe [how three types Bf pagg tables world and compare them m Ki marks 2? Compute thd maximum partition sizes using FAT—16 E 111an sizes Q [KB and 4 K3. A @arks 3J Compute thd turnaround time fon the tfollowing five processes busing the multiplg queues scheduling algorithml W M E and [hand [priority I, and. processes U andEprlorltyO whighenthdmtthethdprocessfi@. [Eheif arrinal tunes are 0,1,2JD End 5 secondsJ hnd their run m are M5; JJ, H.5J M5 and. JJLS Wms, WW 3. marks] Vii Eor thd producericonsumefi probleml hale Solutions us1n§ Semaphores and. usingj message passing BrieflX compare EH3 benefits ofl EH3 two techniques} [4 marks] 16 Paper] 4] 2007, Questiond l. Assume that] the sehednler is implemented] as a process. Deseribe a lmeehanism that mldl enabld thd operatIng system to deeide wherfl to trim thd sehednlen process E marks] m Belady’s hnomaly happen to the pptimal pagg replacement] algorithm] Explain] m answer: Q marks deisenssedianenhannflsselntiontdthdlreaderflnritersmproblem] Em preferencdtdlreaders; mmmflmmfilflgmm trying to enterl the databasel Briefly deserihd hem to @odify thd solutiorfl td amid starvation of eriters. marks] A hard disk sp1nd at 7200 rpm] and tracks m 100 seetors ofl fl L512 bytes. The mags seek time Between tracks is 6 HISBCJ Compute 11W m time] it takes inl averagq R read a fild ofl sizd fl KB E} fifthdbloeksoflthefildmseetorflmonetraek (E if thd bile E stored fl eight equal EiE runs; the are randomly distributed on the dek W a run consists bf hontiguous blocks of] thd same trackl [[rflthdseeondoaseq thaflthereadfidoneiflthdorderthebloeksappearifl the file] i.elM busing lfirst—come—first—served Elgoritfim] marks] 17 Papen 3, 2008, Questions I. Explaip tnhat interrupts are and Briefly describe how the operating system handles them Q marks 27 W heme seen that rmmddobin scheduling can be m by listing ulti 1e occurj rences Efl processes so that lit giv_esl the amonnt & cm to each process according to BE prlorlty. Computd the averagg tnrnartnind m forl the following processes 11:53 ingj this scheduling algorithmi Processes W Bl C, 1] m El are m at OJ OJ 4} 1 and ti minutesl their tuntimes are 1:); El El 5 and 6 minutes and thein priorities are 5’32 ME El [1 and 4 (the higher the priorityl thd more KIPU—time a process gets . marks] 3J Explain @ it makes sense td store recently usedl dataj (egl, recently referenced pages) irfl cachel marks] EU Peterson’s solutiorfl is tised in] m sXstems for achieving mutual exclusioni & itl buffers front the priority inversiorfl problem. Describe tvhati the problem is and explain how it is prevented in modern pperating m (Hint: How dd @ and WindowsZOOO allocate priorities?) [g marks 18 Paperi 4; 2008, Questions I. Kionsiaer the iollowing proposeg solution to thd dining philosophers problem. semapfiore mm; semaphore troom=4g void philosophermint :U) HwhileQTRUEj thhinkfli m; dowanorkEiW; dowanorkEiHJ mod 5m; eaLQ; @(flh @ZEEE m 5111; @(room}; 3' Brieflfl explain Whethen deadlock and starvation can occur. 6 marks] ZEXplainwhatdemgecontmflemandflemgeflmLemwandBrieflfiflesenbethem purposesi 2 marks 3. Deseribe how deadlonk prevention mm byi denxing some E the necessary conditions ofl a fleadionki fl marks Vi. Briefifi comparg tthe ESE alloeatiorfl methods used byi Unix and Windows2000i What are them respective aavantages? :1 marks 19 Papen 3, 2009, Questiond 1. Explain what deadlock amidance is and applyl lit td the @ example. [there are fine processes (A to E) and Eonn M ofl [Resources are @ssigned as folloflsj E (aolumm & (04mm Cl (mm), [m (1,1,0,1), E; (0,0,0,0). Tm mmquest are: E [M041], m (0,1,1,2), Q (3,r,0,0],11 (momma [El (mun). TFe W is Determine Whethen thd flgues bfl A lfon one item oil resource W 4 shonld be grantedl [fl marks 2l Explain the thred fundamental ways l/q can bd performed. [Fon eaclfl method deterl mine hovd muclfl CH] timd is needed E M a lKB document. The initial @ takesflmflhsecondideanlflmifitakesmtnmmsecondeaflaytdimthedatal @ ofl thd controller bf thd prlnter7 and prlntlng one [hm takes 50 millisecondl m m m interrupt service m m runs for KG m E that the data register bf thd bontrollen oil the printed can contain only one bytel marks] 3J Brieflfl Explain W messages can be used to achievd tnutual Lexclusion. m is the maid advantage of messages compared R semaphores and monitors? marks] 2G Papeli 4; 2009, Questions I. boolean test_and_set j.an i] l{ ffi GEE == 0) {l i=1 1; mm true; E E W false; D Explaimhmutestfinmsetbeusedtdhchiegflmnmalexchisiom [Emmmlutionl avoid BusX waitingfl marks] Explainl what lmultilexel aka hierarchical) page tables are and their dvanta e Qflfilflflillflggtflblflfi Emmpagegcanbeiflthdmmmhddmssspaceusmg a two—level page taBle Where every taBlé (both top—level fl second—level} m ELM entries? marks] List HE inain briteria a (short—term) scheduling algorithm Should satist irl a time— sharing system. LAssumd that a process had the following {ZPU burstsi E2 Q; E; g 8 microseconds. Compute the estimated lengthl oil the next CH] flourst usingj simplg and. exponential (aka weighted] averaging Mitlfl parametey [T51 [g marks 21 ...
View Full Document

This note was uploaded on 01/18/2012 for the course INFORMATIK 2011 taught by Professor Phanthuongcang during the Winter '11 term at Cornell.

Page1 / 21

oldques - Old Operating Systems Exam Questions Hanuarfi...

This preview shows document pages 1 - 21. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online