0% found this document useful (0 votes)
2K views14 pages

OS Past Papers

Uploaded by

Rais Ali
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)
2K views14 pages

OS Past Papers

Uploaded by

Rais Ali
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
LAHORE COLLEGE FOR WOMEN UNIVERSITY MID EXAMINATION 2014 Class: BS-CS Semester: V Course code: CS 314 Q.2 What are the properties of real time systems? Total Marks: 25 SUBJECTIVE Q.3 Explain 7-state process model in detail. Q.4 Shortly illustrate multithreading models. Q.5 What is deadlock prevention? Q.6 Apply the following using Round Robin scheduling algorithm where quantum(q) is 3 Paper Title: Operating Systems Time: 1 hr 45 min 2 EY Processes Arrival Time(s) Service Time(s) | [A 0 8 | 'B 5 6 | Ic 9 4. | (D ll 3 | Find dispatch time and turnaround time and average waiting time. Q.7 what is critical section problem? Describe Shortly. | - a, ‘3 i & 2 — Scanned with CamScanner Bra Se Z LAHORE COLLEGE FOR WOMEN UNIVERSITY MID EXAMINATION 2014 Class: BS-CS Semester: V Paper Title: Operating Systems Course code: CS 314 Total Marks: 25 Time: 1 hr 45 min SUBJECTIVE, Q.2. What are the properties of real time systems? Gt Q.3 Explain 7-state process model in detail. C oh bi Q.4 Shortly illustrate multithreading models. oe Q.5 What is deadlock prevention? b/s Q.6 Apply the following using Round Robin scheduling algorithm where quantum(q) is 3 Processes Arrival Time(s) Service Time(s) | A 0 8 4 B 5 6 | Cc 9 4 | D ay 3 | Find dispatch time and turnaround time and average waiting time. Q.7 what is critical section Problem? ms Shortly. L- x 3 § —- a ae ¥ % nh fae be & a it ~ Ary ARE ars SpAan ey vi Lo = ‘ et VY © al Ste oO 3 fr | i fi 374 z 2 wpa APN ele 3 : >) BRE * : y Kee s a7 ty Ref MulsR 0 = Hb Ge TS “el, 2 a ee s Py a ty By . is bi a aanas, 7s CE ry 216 ae ’ ae Me 16 "7 Scanned with CamScanner “03 of -of-»S™, +y ») For each process in each schedule above, calculate the walt time. [3] Scheduler iT 3 Ps Pa PE FCES Wait RR Wait Q4.Recall the various deadlock detection and prevention algorithms we've discussed in this course, and consider the following snapshot of a system with five processes (P1, P2, P3, P4, PS) and four Tesources (RI, R2, R3, R4). There are no current outstanding queued unsatisfied requests. Currently Available Resources Ri [Rr [as Tea 2 fa To Current Allocation Max Need Still Needs tere Frees [Rie [RS 2 [RS [Ra [er [eo [as [ee FL (0 10 o_{3 2 fo “fo 2 To m 2 fo 7 {5 }o fo —|7 15 fo] oes 0 fo 6 [ste 6 [es [32a Pe 2 [3 3_ [5 [6 [2 [ojo 72 od fos 62 fo 3 275 ‘Is this system currently deadlocked, or can any process become deadlocked? Why or why not? Ifnot deadlocked, give an execution order. ~ BI 5 b,_Ifa request from a process Pl arrives for ) cam the request be immediately granted? I , can the re ¢ imme granted? Why or why not Ifyes, show an execution order, Gat pee — QS. Explain what semaphores are, their usage, implementation given to avoid busy waiting and binary 4 5] Sale Seay? 20, Po ts Per P. Ean LE, shots TH" 27 H-26 Scanned with CamScanner LAHORE COLLEGE FOR WOMEN UNIVERSITY, LAHORE Mid Examination 2016 Class: BSCS ‘Subject: Computer Science Semester: V ‘Term: Mid Paper No: CS-314 Paper Title: Operating Systems No. of Credit Hours: 3 Max Marks: 30 Time Allowed: 15 Minutes Objective Key 1. Inter process communication is required for all processes bb. is usually done via disk drives c._ is never necessary, G. allows processes to synchronize activity 2, Producer consumer problem can be solved using semaphores event counters monitors all of the above None of the above 3, ‘The CPU, after receiving an interrupt from an U/O device halts for a predetermined time hands over control of address bus and data bus to the interrupting device branches off to the interrupt service routine immediately branches off to the interrupt service routine after completion of the current instruction None of the above peose 44, The strategy of allowing processes that are logically run able to be temporarily suspended is called ‘a. preemptive scheduling b. non preemptive scheduling c. shortest job first first come first served fe. None of the above 5, What is the name ofthe technique in which the operating system of @ computer executes several programs concurrently by switching back and forth between them? a ning b. Multitasking ¢. Windowing d. Paging €. None of the above 6, Toavoid the rave condition, the number of processes that may be simultaneously inside their critical section is a 8 bt ce. 16 40 e, None of the above Scanned with CamScanner 10. ‘The dispatcher a, actually schedules the tasks into the processor b. puts tasks in 1/O wait c. is always small and simple <._ never changes task priorities c. None of the above Swapping ‘a. works best with many small partitions b. allows many programs to use memory simultaneously ¢. allows each program in turn to use the memory d, does not work with overlaying ¢. None of the above When a child process is created, which of the following is a possibility in terms of the execution or address space of the child process? ee a, The child process runs concurrently with the parent b. The child process has a new program loaded into it. c. The child is a duplicate of the parent. d. Allof the above Medium-term scheduling is performed a. typically on submitted jobs b. when processes must be moved from waiting to ready state ¢. on processes in the ready queue d. None of the above Scanned with CamScanner LAHORE COLLEGE FOR WOMEN UNIVERSITY, LAHORE Final Examination 2017 Class: BSCS Subject: Computer Science Semester: V ‘Term: Final Paper No: CS-314 Paper Title: Operating Systems No. of Credit Hours: 3 Max Marks: 35 Time Allowed: 3 hours Qi. a) ») Q. a) b) Q3. a) b) Qs. a) b) Qs. a) b) Subjective Section [35 Marks] (6+2) For the following page reference string: 2, 0,3, 4, 2,3, 0,3, 7, 1, 2,0, 1, 7,0, 1 Calculate the page faults applying the following Page Replacement Algorithms for a memory with three frames: (i) Optimal (ii) LRU (iii) FIFO ‘What is called TLB? How does it help to speed up paging? 6+3) Explain Virtual Memory Management with Paging in detail. Explain how Virtual Address is translated into Physical Address. Explain how DMA works (4+3) Define Distributed System. Explain the characteristics of distributed system. Explain the goals of Operating System Security. (+4) Describe various directory organization techniques. ‘What is fragmentation? What is the need of fragmentation? Explain the difference between internal and external fragmentation Explain the following terms. (2x2) Compaction VO Buffering > | A aent-03- aS FOO? Scanned with CamScanner AHORE COLLEGE FOR WOMEN UNIVERSITY, LAHORE Final Examination Fall 2018 Subject: Computer Science Semester: V Term: Final ‘Class: BSCS Paper No: CS-314 Paper Title: Operating Systems No. of Credit Hours: 3 Max Marks: 55 ‘Time Allowed: % hour Objective Section (Key) Choose the correct option (is) 1. With a page is brought into main memory only when a reference is made to a location on that page. —_——. a. Prepaging b. Demand paging c. Page buffering z 2. The selectors for replacement that page for which the time to the next reference is longest. a. Clock Policy CP. Optima poiey— c. Least Recently Used (LRU) Policy First in first out (FIFO) Policy 3A chooses only among the resident pages of the process that generated the page fault in selecting a page to replace. . a. Global replacement policy b.CLocal replacement poliey ) 7c. Fixed-allocation d. Variable-allocation 4. In_____y the processor issues an I/O command on behalf of a process, continues to execute subsequent instructions and interrupted by the W/O module when the latter has completed it’s work. a. Programmed I/O b. Interrupt driven I/O c. Direct Memory Access [Virtual Memory Access 5. The module deals with the device as a logical resource and is not concerned with the details of actually controlling the device. a. Directory Management b. Logical I c. Device I/O d, Scheduling and control 6. The Hardware mechanism that enables a devi tify the CPU is called i b. Interru) b 1 . 7 Satan Call 4d. None of the above Scanned with CamScanner % begins at the root and follows a path down to the specified file a, Relative path name b. Absolute path name> c. Standalone name ‘Of the above ‘on the head at the track is known 8, Ona movable head system, the time it takes to p a — “ Ca Seok time > b. Rotational delay “Recess time 4. Transfer time “9. The policy is to select the disk 1/O request that requires the least movement of the disk arm from its current position. a a. Last in first out b. Shortest service time first c. Priority by process naling 10.___ begins at the root and follows a path down to the nected Mie a, Relative path name b. Absolute path name c. Standalone name he above nL. page replacement algorithm suffers from Belady's anamoly. S- & b. MRU (ei d 4, LIFO (ec 2 allocates the largest hole (free fragment) available in the memory. — Cex ae a. Best Fit b. Worst Fi "c. First Fit Chen lyr A 13. Which directory implementation is used in most Operating System? a,_ Single level directory stmcqure b. Two level directory structure ¢. Tree directory structure d. Acyclic directory structure 14, The term "Operating System" means : 5 a rar Cooma es b. The way a computer operator works computer working e vorofhigivievelTamguage into d. The way a floppy disk drive operates machine level language 15. In RR scheduling, the time quantum should be the context-switch time. a, Small with respect to respect to c. The same size as Scanned with CamScanner R WOMEN UNIV, xamination Fall 208 LanoRE Semester: y, Oh pu ence . mputer Se Paper Title o4,.T0m: vag Time Allowed? syeX8 Steg AAHORE COLLEGE } Fina Class: BSCS Subject: Paper No: CS-314 No. of Credit Hours: 3 Max fyparks: 55 frbjective Section [40 Marks] Qi. (+2) a) There are five processes A to E to run. Their arsval times are 0, 1, 3, 9 and 12+seoonds respectively. Their proctssing times are 3, 5, 2, § and 5 seconds respectively. What is the average turnaround timeusing Shortest Job First (non-preemptive) and Round Robin with ee ‘one second quantum (pre™Ptive) scheduling? age ww b) Explain Acyclie-Graph Diectories and General Graph Directories, - Ds Aroray t \ eis® 5 ng Consid + the following seg nce of disk track sues: 27 , 186; 147, 41, 10, 2 ‘igitially the hdd is at track 30 pice noving i | ute te neni wack the hea syverges using ‘en00K and’ Si algorithms. es . ~ b) Explai is tic, categories. . i, _ SOT aS ie \ . = . hie é 5+3) daa smatfGosfputerag bee A process makes the follo ing/list of page references: |, (2 yqr2 8h h9, >? Doe Tay page faults occur using LRU (using Clock) and Counting Algorithms. Show status of the. ames at each reference. Go fags co) b) What is the cause of ‘Thrashing? ) o ae ot : Vv ’ \ Oe * é a) A system has four processes pl, ei a on andthe Pes of dedicated resources aM et me Pee ee is B= (3, 3, 2). holds one unit of RI ‘andre, soe one it of R2 \ number Scanned with CamScanner a. oe College w) Co -® Process p3 holds one unit of R1 and requests one wal of R2. Process p4 holds two units of R3 and requests one unit of R1. Compute the availability vector and determine whether this State of system is deadlocked or not. b) Explain the Encryption and its types in detail. ? Qs. \ (+4) 4) Explaii how Peterson Solution manages synchronization betw¥eh tWo processes. ' b) Discuss the primary differences between Network Opersiting System “and Distributed Operating System?) } Svouldd be_ NS foaredt . s Yt >. = — pibepe me CP Fp FP ODER hn: 4 itn A ans. Wt Scanned with CamScanner

You might also like