Pokhara University
Bachelor of Engineering in Computer Engineering
Semester 3 · PU Spring
Course Title: Operating System
Candidates are required to give their answers in their own words as far as practicable.
- 2.15
- a) Explain Dining Philosophers Problem. How do you solve it?
- b) What is semaphore? Explain the producer consumer problem and algorithm solving it using semaphore.
- 3.15
- a) What is Deadlock? Consider a system with four processes PO through P3 and three resources types A, B, C. Resource type A has 10 instances, B has 6 instances and type C has 8 instances. Suppose at a time tO, following snapshot of system has been taken. Is the system safe? If yes, then what is the safe sequence? Allocation Matrix Maximum Need Matrix [Process] A [B [TC] ante [P2__}1_|2_|2_] [Po [4 32 ne a Ee Ee . b) Consider following set of processes along with their burst time, en arrival time and priorities. Calculate average waiting time and average turnaround time using following scheduling. Also describe which one is the best algorithm and why?
- i) SJF
- ii) Priority (preemptive) iii, __ RR (Quantum size = 2ms [Process [Burst Tine | Anal Tine” Prony LS | ees cee a eS ee | aes 7 val ss
- 4.12
- a) What is contiguous memory allocation? Given memory ang id 11K, 14K, 20K,10K, 17K,19K,12K and 30K in order. How a processes of 22K, 12K, 9K, 2k and 17K in order be placed for each. i, first fit ii, best fit iii, worst fit
- b) Consider the reference page string: 6,1,2,3,4,1,2,4,241,0,344,2,0. Calculate page hits, page faults, hit ratio, fault ratio assuming 3 frames for the following page replacement algorithms.
- i) Optimal ii, FIFO iii, MRU
- 5.15
- a) Suppose a disk drive has 200 cylinders. The current position of the R/W head is at cylinder 50 and the previous request was at cylinder 45. The sequence of pending requests is 40,82, 140, 46, 88, 170, 197, 135. Starting from current position what is the total number of track movements (distance) for the following disk scheduling algorithms.
- i) SSTF ii. LOOK iii. C-SCAN iv) FCFS
- b) Explain the different attributes of file. Explain the file allocation techniques.
- 6.15
- a) What is distributed operating system? Explain Remote Procedure Call (RPC) with appropriate figure and example.
- b) Describe the Amoeba System Architecture. How process management is done in Amoeba?
- 7.
Write short notes on: (Any two) 2x5
- a) Context Switching
- b) PCB
- c) File Systems and Disk management in LINUX — ——— eee
— The End —