KCS401 - OS - Final Question Bank
KCS401 - OS - Final Question Bank
KCS401 - OS - Final Question Bank
P1 0 8
P2 1 4
P3 2 9
P4 3 5
Draw Gantt chart and find the average waiting time and average turnaround time:
a) FCFS Scheduling
b) b. SRTF Scheduling or Pre-emptive SJF Scheduling
Consider the following process:
P1 0 6 3
P2 1 4 1
P3 2 5 2
P4 3 8 4
Draw Gantt chart and find the average waiting time and average turnaround time:
c) SRTF Scheduling d. Round robin (time quantum:3)
21. What do you mean by Belady's anomaly? Which algorithm suffers from Belady,s anomaly and
how can it be rectified?
22. What is Thrashing? What is the cause of Thrashing? How does the system detect Thrashing? What
can the system do to eliminate this problem?
23. Explain Paging with example. Differentiate Paging and Segmentation.
24. Explain the difference between External fragmentation and Internal fragmentation. How to solve the
fragmentation problem using paging.
25. List five services provided by an operating system. Explain how each provides convenience to the
users.
26. Explain also in which cases it would be impossible for user-level programs to provide these services.
27. Define the essential properties of the following types of operating systems:
a) Batch b) Interactive c) Time sharing
28. Consider the following process:
Process Arrival Time Burst Time
(in msec.)
A 0 4
B 1 7
C 2 9
D 2 13
E 4 15
Draw the Gantt chart and calculate the average turnaround time and average waiting time for the
following given processes with a) Round Robin (time quantum=2) b) SRTF Scheduling
30. What is a critical section problem? Explain with an example. Also explain the conditions that a
solution to the critical section problem must satisfy.
31. Consider the following page reference string: A, B, C, D, A, B, E, A, B, C, D, E. How many page
faults would occur for the following replacement algorithms, assuming three frames? Remember all
frames are initially empty, so your first unique pages will all cost one fault each.
i) LRU replacement ii) FIFO replacement iii) Optimal replacement
32. How a page fault is handled in an operating system. What is the role of TLB in paging? Consider a
paging system with the page table stored in memory.
i. If a memory reference takes 50 nanoseconds, how long does a paged memory reference take?
ii. If we add TLBs, and if 75 percent of all page-table references are found in the TLBs, what is the
effective memory access time? (Assume that finding a page-table entry in the TLBs takes 2
nanoseconds, if the entry is present.)
33. On a system using paging and segmentation, the virtual address space consists of upto 16
segments where each segment can be up to 2 16 bytes long. The hardware pages each segment
into 512-byte pages. How many bits in the virtual address specify the Segment Number, Page no,
offset with page and entire virtual address.
34. Given memory partitions of 21K, 5K, 90K, 54K, 10K, 25K and 56K (in order), how would each of the
First-fit, Best-fit, and Worst-fit algorithms place processes of 10K, 7K, 22K and 26K (in order)? Which
algorithm makes the most efficient use of memory? Also calculate internal and external
fragmentation for each algorithm.
35. Suppose that a disk drive has 5000 cylinders, numbered 0 to 4999. The drive is currently serving a
request at cylinder 143, and the previous request was at cylinder 125. The queue of pending
requests, in FIFO order, is 86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130 Starting from the current
head position, what is the total distance (in cylinders) that the disk arm moves to satisfy all the
pending requests, for each of the following disk scheduling algorithms?
i) SSTF ii) SCAN iii) LOOK iv) FCFS
36. Explain RAID structure and its levels.
37. Write short notes on following
a) File system protection and security
b) Linked file allocation methods.
38. What are files and explain the access methods for files.
39. Consider the following snapshot of a system.
44.
45.
46