Paper Code: CSF204/CS214 (Back) Printed Page 1 of 2
DIT UNIVERSITY DEHRADUN
B.TECH (CSE/IT) END TERM EXAMINATION, EVEN SEM 2022-23 (SEM IV) Roll No. Subject Name: Operating System Time: 3 Hours Total Marks: 100 Note: All questions are compulsory. No student is allowed to leave the examination hall before the completion of the exam. ______________________________________________________________________________________________________
Q.1) Attempt all Parts :
(a) Draw a neat diagram or write steps to explain the system call for reading a file and display contents on the monitor. (b) “Operating System is a resource manager”- Justify this statement with suitable example. (c) Write any two differences between a process creation by Fork () system call and a thread. (d) Neatly draw a process state diagram showing states of a process. Also, show the placement of each scheduler between states. [4 x 5= 20] Q.2) Attempt all Parts : (a) Differentiate between Non Pre-emptive and Pre-emptive process scheduling algorithm. Give one example of each. (b) Define any four parameters of Process scheduling algorithm, with proper definition and formulas if applicable. (c) Which pre-emptive process scheduling algorithm in an improvement on FCFS algorithm? Write what criteria’s are added for improvement in the algorithm? (d) Write short Notes on any two – 1. CPU bound process and I/O bound process, 2. Scheduler, 3. Degree of multi- programming. [4 x 5= 20] Q.3) Attempt any Two Parts : (a) Define the problem of Producer-Consumer. Write a solution steps of the problem using semaphores. (b) When allocating three resource types—A, B, and C—to three processes—P0, P1, and P2—an operating system manages the allocation of these resources using the banker's method to avoid deadlock. The current system state is shown in table below. Here, the Allocation matrix displays the amount of resources currently allotted to each process, while the Max matrix displays the amount of resources that each process can use at its maximum during execution. There are 3 units of type A, 2 units of type B and 2 units of type C resource is still available. Find which process is going to be scheduled in the last of the safe sequence? Allocation Max A B C A B C P0 0 0 1 8 4 3 P1 3 2 0 6 2 0 P2 2 1 1 3 3 3 (c) Consider the dynamic partitioning is used in Main Memory. Given are free memory partitions – 100K, 500K, 200K, 300K, and 600K in a sequence. How following processes can be placed using the First fit, and best fit algorithms. Also, write which fit gives the best memory utilization? Allocation required for- 212K, 417K, 112K, 426K. [2 x 10= 20] Q.4) Attempt any Two Parts : (a) Find the effective memory access time, where Translation Lookaside Buffer (TLB) hit rate is 80%. TLB and main memory access time is 10ms and 80ms respectively. Consider that there is no page fault in main memory. (b) Explain the reason why address translation is required in paging? Draw address translation diagram in case of paging to show how Logical address is converted into physical address. (c) Calculate the number of pages and frames in the given scenario- Logical address is 32bits, Physical address is 16bits, and size of a page is 2 KB. Note that memory is 2 bytes addressable. [2 x 10= 20] Paper Code: CSF204/CS214 (Back) Printed Page 1 of 2
Q.5) Attempt any Two Parts :
(a) Consider the following reference string – 7,0, 1,2,0,3,0,4,2,3,0,3,2,1,2,0,7,0,1. Find the number of page faults using LRU page replacement algorithm with 4 frames. All frames are initially empty. (b) Suppose disk drive has 200 cylinders starting from 0. The current position of head is at 43. The queue of pending request is – 41, 98, 121, 65, 67, 24, 143, 54, 198. What is the total distance that the disk arm will cover to satisfy all the requests using SCAN algorithm? Assume that head direction is downward (towards 0). Also, find what will be the maximum bounded waiting time to serve a request? (c) Define following terms with respect to Disk management- 1. Seek time, 2. Rotational Latency, 3. Transfer Time, 4. Disk Access Time, 5. Disk Response Time. [2 x 10= 20] -----END OF PAPER ----