0% found this document useful (0 votes)
51 views35 pages

2023 Pyq

amity operating system question papers

Uploaded by

Parikshit Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
51 views35 pages

2023 Pyq

amity operating system question papers

Uploaded by

Parikshit Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 35
RBBBAAA’E (No. of Printed Pages — 6] ce CSE202 [ET] Enrol. No. . END SEMESTER EXAMINATION : April-May, 2023 OPERATING SYSTEM Time: 3 Hrs. Maximum Marks : 60 Note: Attempt questions from all sections as directed. Use of Scientific calculator is allowed. SECTION — A (24 Marks) Attempt any four questions out of five. Each question carries 06 marks. 1. (a) How does the distinction and user mode function as a system protection. (b) During the life time of a pi one of the two modes, user mode. For the following seg language program, briefly de during its execution, as far a execution mode are concel WriteToScreen(i); Read FromK eyboard(j); eS ) 2. Describe a mechanism for enforcing memory Protection j (a) Explain the Possible ways to structure directories, G) (b) What are the various steps taken by Operating system to handle page fault? (3) Compare the various memory allocation techniques used by operating system. 5. (a) In a paging scheme, 16-bit address are used with a page size of 512 bytes, if the logical address is 0000010001111101, how many bits are used for the page number and offset 9 Compute the Page 20 Caeulate Averag Time for Non-pr Wd Round py Hh 3 214 CSE202 (b) Compare the different ways to structure the page table. GB) SECTION - B (20 Marks) Attempt any two questions out of three. arks Back question carries 10 ™ a set of 5 processes whose arrival time, 6 @ Consider 5 needed are given below : CPU Time: CPU Arrival Process Time Time Priority Pl 10 0 5 P2 I 0 2 P3 3 2 1 p4 20 5 4 PS 2; 10 3 Time for Non-premptive SJF, pre-Empuved P and Round Robin (Time Quantum=4) (b) A system is having 3 user processes Pl, P3 where Pl requires 2 units of resoule requires 3 units of resource R, P3 teaun : of resource R, What is the minimum a units of R that ensures no deadlock? Ho: is different fro} mM starvation? be prevented? n? How dea 4 CSE202 244 dO tg 7. Suppose that a disk has 100 cylinders, number, INE a request at o 40 and the disk arm is moving towards 9 of pending request is: Is disk scheduling, im a single-user environment? Optimal Page repla cement algorithm. 5 stem that supports the strate ion, W ding which Strate; is best utilized for a particular file? ked, and indexed aljog, sriteria shou d be used in de By (6) (c) Consider the following Snapshot of a system, ster (5) Allocation Max Available ABCD ABCD ABCD TO 41 6473 2224 TI O12 4232 72 13 2a: "3 10 6303s ga 2 22a 56 7 5 may complete. (ii) If a request from thread e, 2, 2, 4), can the reques immediately? 6 214 om thread T2 arrives ¢, or (ii) 1f a request the requ quest be granted Cet one immediately? m thread T3 arrives fo; ir uest fro an the request be granted can tl 1 (iv) If a req (2, 2, 1, 2) immediately? {woyshs Sunviodo te yoke] Youd JO Ayyeuonouny 94} ure;dxo vig (®) “€ |, JO anjoop your parade] Oy} 11 ST MOY pur Arowow jenjya sr wey saishs oy} puke sasn oy} O} wash Sunriodg Aq papraoad soo1atos jo yas om) uredxg oT “syapue 90 8ajsiva uolisonb Yyoor gay fo ino suonsanb anos dun rdwony (suavIN 67) v - NOLLOUS *paj2a.1p sp suoysas [jp woaf Suopsanb ydmany :2,0N 09 1 yan wnuLXDW Sap © S awLy $LddONOO WALSAS ONILVAAdO (U0t ‘AVIA > NOLLVNIANVX@ UALSANAS GN ‘on “10848 a a [y—soeq porta Jo -on) a 1360 esiT123 ) pe 4, Describe the Indexed and Linked File allocation & methods available for allocating disk space to vatioug Gi) D files. 5. Discuss different methods of communication between sup cooperating processes strate just dire’ SECTION - B (20 Marks) give Attempt any two questions out of three. allo No" Each question carries 10 marks me! 6. How many page faults would occur for the following w page replacement algorithms, assuming three frames? so your Q Remember that all frames are initially empty, first unique pages will cost one fault each. (1) LRU replacement (2) FIFO replacement The reference string is as follows: 9 7, 0, 1, 2, 0, 3, 0, 45:25 35 O73, 2a ends 157, Ot . 7. Explain the following terms - (i) Deadlock Avoidance CS1r123 Gi) Deadlock Prevention Gil) Deadlock Recovery Suppose a file system can have three disk allocation strategies, contiguous, linked, and indexed, We have Just read the information for a file from its parent directory. For contiguous and linked allocation, this sives the address of the first block, and for indexed allocation this gives the address of the index block. Now we want to read the 10th data block into the memory. (1) Explain all file allocation strategies: (2) How many disk blocks (R) do we have to read for each of the allocation strategies SECTION - C (Compulsory) CSIT123 4 1360 (a) When the page number N associative memory (b) the time to access a page when it is not in associative memory. (c) Find the effective memory access time. (8) (b) Consider a system with four processes Pl, P2, P3 and P4, and two resources, RI and R2, tespectively. Each resource has two instances. Furthermore: - PI allocates an instance of R2, and requests an instance of R1; - P2 allocates an instance of R1, and doesn't need any other resource; - P3 allocates an instance of R1 and requires an instance of R2; - P4 allocates an instance of R2, and doesn't need any other resource Draw resource allocation diagram and check if there is deadlock or not; Also explain how to use resource allocation graph for deadlock avoidance? (8) (100) OPERATING SYSTEMS-THEORY AND PRACTICES Time: 3 Hrs. Note: Attempt questions from all sections as directed. Use of Standard Calculator is allowed. SECTION - A (20 Marks) Attempt any four questions out of five. Each question carries 05 marks. |. “Operating system is resource manager” Justify this statement with suitable functionality of OS. With a neat diagram, explain various states of a wv process. hat ways resource allocation graphs are used for 3, In wh ) Write the algorithm. detection of deadlocks’ ne of memory management, ‘What s implementation? POS 4, Explain paging scher hardware support is needed for it CSIT641 2 2109 Name the di y fe different file allocation methods. Explain the li ‘ inked allocation of file implementation with merits and demerits. 5. SECTION - B (16 Marks) Ales any) toiquesiions out of emFee. Each question carries 08 marks 6. Consider the following page reference string Dee 5, 6, 21,2376 3? Te aac How many page faults would occur for the following replacement algorithms, assuming frame size of three. Remember that all frames are initially empty, SO your first unique pages will all cost one fault each. « FIFO replacement + LRU replacement Assume the following workload in a system + Process Arrival Time Burst Time Pl 5 5 P2 4 6 P3 3 7 p4 1 9 PS 2 2 P6 6 3 Draw a Gantt chart illustrating the ex ia e jobs using SJF and Round robin sched: and also Calculate the average wa average turnaround time, Cution of these uling algorithm iting time and below the other & filled them with red, gree; yellow respectivel shat g. (a) Consider a logical address space of 64 Pages with 1024 words per page, mapped onto a physical memory of 32 frames. (i) How many bits are requisrtfred in the logical address? (ii) How many bits are required in the physical address? (4) (b) Explain Critical Section problem. Give the conditions that a solution to the 1 tical section @ problem must satisfy. — 2109 CSIT641 4 4 [No 55, 58, 39,18, 90, 160, 150: 3% es 4 por at 100. Find the ee Seek 6 Initially arm is CAN and C-SCAN {E length using FIFO. ssTF; 7 algorithm. a fa system: (b) Consider the following snapshot © ; Tin Availabk Processes | Allocation Me s BBC. | tube AEC No P Hee uae Zi > 5 P, 212 32 a P, 401 902 oa | P 020 ise) P, ye? 2 (i) Calculate the content of the need matrix? 1 (ji) Determine the total amount of resources of each type? @) 2 (c) Explain different types of Threads with benefits of multithreaded programming, (5) (100) —-oyep Sueur ‘do ‘aur <(ereuayeouoo)wo “(puadde)reo “{vo :spuruMtos Burmoyjoy fo aBesn oy) ssnosiq {ume[goid woNsas [BONO PloAe 04 pasn oq soroydewios ues MOH {so1oydeuios 91P JEAN ssulojsAg Josnij[ny pue suieishg qossoooidiy [Nyy woaMjeq ysingursiqg ‘syapu 99 sotsv9 wousonb yooq ‘aay fo mo suoysanb amoy Kup sdwoyy (sqavt +2) Vv - NOILOAS ‘parvaap sv suopoas 119 moss suopsonb rduany 910 09 5 yan wnunxDyy Sup] § : Ly SWALSAS DNILVAAMO LO SATION e207 ‘SeW-dy | NOMLVNINVXS MALSAINAS GNA (1a) ON "TOsug OSILISo ger [p-soBeq por Jo “oN] CSITI50 + 159 5. Discuss the preem, ti ‘“— os St ee Ls tive and pes-erernirad Versions itst scheduling algorithm, (a) DE SECTION - B (20 Marks) pe? Attempt any two questions out of three. Each question carries 10 marks. (») Gt 20' Compare and contrast File Allocation Methods: Contiguous, Linked and Index Allocation. Also list the most common schemes for defining the logical Structure of a directory. - ef 7. Write a Shell Script that accepts a filename as a_ (Cc c command line argument and finds out if its a regular file or a directoiy. If its a regular file, then performs various tests to see if it is readable, writeable, executable, Discuss one classical syncronization problem with respect to processes. How it is being handled by an operating system? Give an example to justify your answel- 3 138 SECTION ~ ¢ (16 Marks) (Compulsory) (@) Describe the services that an operating system provides to users, processes and other systems Oy (b) Given memory partitions of 100KB, 500KB. 200KB, 300KB and 600KB (in order), how would each of the first fit, best-fit, worst-fit algorithm place processes of 212KB, 417KB, 112KB and 426KB(in order). Which algorithm makes the most efficient use of memoty? Explain, (4) (c) Consider the following snapshot of a system: Sa 2st it ht b bb algorithm 4 23g the content of the matrix Neeqy Is the system in a safe state? (ii) Would the request be granted in the curren, State if process P1 requests (0,4,2,0)? -g66 o1dn s19d9}ul UaAa yn 9 qeuuresd v yoRNSUOD (q) soyeraued Yo! *soyduie xo oyqeyins asf) ‘108 aiqvrauinus A[oAisansay PUP 19S aIsm9oy. uaamjag sooudsaj ip OU) uodn ojesoqejq (8) “7 © gM JO UONALIOp OY) ur sdays Jo Jaquinu oy} ynoge Aes nok ues yey “qUioy [RULIOU YORQTOIH (11) “WAoJ ;eUOU Aysuioyy, @ ui stp es9ym Y=|m] pue (D)T> & JI) © sajduexo ajqeyins Buisn urepdxg gsouryse, Bung yo yxo}u09 oy) UL ,,Wo;qorg Argepisapuy,, aAa A -> Sb | bCC | DaA C> abb | DD E > aC D> aDA 6) 8. State and prove Arden’s theorem that is generally taken into consideration for computing the regular expression. Further Construct a regular expression corresponding to the state diagram described as under : CSE204 a 25 SECTION ~ c 16 Mag, i) (Compulsory) 9% (a) Let x and y be two positive inte Bers "Presenieg in wnary notation. Construct a turing ma, Ching that will halt in final state qy if x s. Y and that will halt for non-final state qn if x < a More Precisely, the machine is to Perform the computation: gOw(x)Ow(y) if X>=y qOw(x)Ow(y) x IW (x)Ow(y) . * qnw(x)Ow(y): if x (q > =a (vr) (i) ~POD=OVQOA~Pag= (a) Write an algorithm by Welch and Powell for a coloring of a graph G, Apply that algorithm on the given graph to fi nd how many colours are needed, (a) A (ii) Find the ato (b) Find the type o set of all intege SE 5 218 Tet R be a relation defined on set of integers iguch that aRb iff a = b (mod m) where m is an integer. Prove that R is an equivalence relation Also, find equivalence classes of relation R @) a) Set D,, of divisors of m is a bounded, distributive lattice with a + b = av b = cm (a, b) and sa*b = anb = ged(a, b). Q) @ Show that D, is a Boolean algebra if m is ‘square free, i.e., if m is a product of distinct @) SECTION - C (16 Marks) (Compulsory) { CSE208 6 red | S and 10, a wo. of aa 06 Gii) Find glb of 5 and 10, core en) si / Gv) Determine the greatest and AS clement exp seme ¥ , ¥) Find the complement of G mplement of each clement inb,,. ee. 3 Hrs. (vi) Is De, Distributed? Justify your answer. es Attempt (0) im (©) Explain the Warshall Algorithm to compute the: Attemp transitive closure. And, apply it to find the oma i | transitive closure of Relation R={(1,1), (1,3), (2,2), (3,1), (3,2)} on the set A={1,2,3}. 6) 1. State and 2 Prove th k compe edges, Prove th (0-1) ed Let (A, and p i END SEMESTER BXAMINAT DISCRETE MATHEMATICS FOR IT Hrs Maximum Marks : 60 Attempt questions from all sections as directed. SECTION - 4 (24 Marks) Attempt any four questions out of five. Each question carries 06 marks. State and prove De Morgan’s Law. Prove that a simple graph with n vertices and k components can have at most % (n-k) (n-k+1) edges Prove that if G is connected graph with n vertices & (n-1) edges then G is a tree, Let (A, *) be a semi group, further more for every a and b in A, if a#b, then a*b#b*a, Jf the flood destroy my house my house, Statement, SECTION ~ 5 (20 Marks) Attempt any two questions out of tl bree, Each question carries 10 marks, wish between Function and Relation with itable example. Let A = {1,2,3}, B= {p, q) and a {a,b}. Let f: A > B is f = {(1, p), (2, p), G, a)} and g: B — C is given by {(p, b), (q, b)}. Find gof and show it pictorially. isin} stra’s Algorithm, find the shortest distance 7. Using Dijkstra’s Algorithm, find th hortest di: fr source vertex ‘S’ to remaining vertices 1" 9 rom h following graph — 2 Also, write the order in which the vertices are visited Explain the role of Prefix codes and optimal prefix codes. Also explain Invertible funetions and Pigeonhole principle. Let A = {1, 2, 3, 4}, and R is a relation fined by “a divides b”. Write R as a set of ordered ir, draw directed graph. Also find R'. SECTION — C (16 Marks) (Compulsory) (a) Describe steps of Prim’s algorithm for finding Minimum spanning tree of a graph. Apply the algorithm to find the MST of the graph, details of edges as under. SA=2, SF=4, AF=1, AB=5, BC=3, BD=2, BF=1, CD=3, CT=1, DE=3, DT=2, BF=% . 4 CSIT206 241 ary borate Homomorphism and Isomorphism with suitable example. Write oq fe applica of each in real world, () (€) Using Laws of Boolean Algebra, simplity the statement S: (1(P VQ) V ((PAQ)A Q). (3) pnp SE pyNaM Dime? 3 wore:

You might also like