Question Bank
Question Bank
Calculate the Need Matrix and give the safe sequence of the
processes.
2 Consider the page reference string of size 12: 1, 2, 3, 4, 5, 1, 3,
4 1, 6, 3, 2, 3 with frame size 4(i.e. maximum 4 pages in a frame).
Calculate total number of page faults and there by give a
comparative statement on types of replacement algorithm.
2 Operating systems have evolved from slow and expensive
5 systems to present-day technology where computing power has
reached exponential speeds and relatively inexpensive costs. In
the beginning, computers were manually loaded with program
code to control computer functions and process code related to
business logic. Analyze in detail different stages of evolution.
2 Consider the below set of processes that arrive at time zero.
6 The length of the CPU burst time given in millisecond.
Calculate the average waiting time, average turnaround time
using FCFS and SJF algorithms
Processes Burst Time
P1 5
P2 24
P3 16
P4 10
P5 3
2 Given five memory partitions of 100Kb, 500Kb, 200Kb, 300Kb,
7 600Kb (in order), how would the first-fit, best-fit, and worstfit
algorithms place processes of 212 Kb, 417 Kb, 112 Kb, and 426
Kb (in order)? Which algorithm makes the most efficient use of
memory?
2 Compare the memory organization schemes of contiguous
8 memory allocation, pure segmentation, and pure paging with
respect to the following issues:
a. External fragmentation
b. Internal fragmentation
c. Ability to share code across processes
2 What is paging? State the basic concepts of paging. With a neat
9 diagram explain how paging works and the necessity of page
table.
3 Consider a disk queue with requests for I/O to blocks on
0 cylinders 98, 183, 41, 122, 14, 124, 65, 67. The FCFS
scheduling algorithm is used. The head is initially at cylinder
number 53. The cylinders are numbered from 0 to 199.
Calculate the total head movement (in number of cylinders)
incurred while the request are serviced.
3 Consider the following set of processes, with the length of the
1 CPU burst given in milliseconds:
Process Burst Time Priority
P1 2 2
P2 1 1
P3 8 4
P4 4 2
P5 5 3
The processes are assumed to have arrived in the order P1, P2,
P3, P4, P5, all at time 0.
Draw four Gantt charts that illustrate the execution of these
processes using the following scheduling algorithms: FCFS,
SJF, non-pre-emptive priority (a larger priority number implies
a higher priority), and RR (quantum = 2). What is the average
turnaround time and waiting time of each process for each of the
scheduling algorithms.
3 Consider the following heap (Figure) in which blank regions are
2 not in use and hatched region are in use.
Allocated Maximum
A 1 0 2 1 1 1 1 2 1 3
The sequence of requests for blocks of size 300,25,125,50 can
be satisfied if we use.
B 2 03 1Implement
1 0 the 2 concept
2 2 of 1 Dining
0 Philosopher Problem with
3 Semaphores with appropriate diagram and code.
3 A system has 4
C 1 14 0 1 1 2 1 3 1 1 processes and 5
allocatable resource.
The current allocation
D 1 1 1 1 0 1 1 2 2 0 and maximum needs
are as follows.
If Available = [ 0 0 X 1
1 ], what is the smallest value of x for which this is a safe state?
3 Consider six memory partitions of size 200 KB, 400 KB, 600
5 KB, 500 KB, 300 KB and 250 KB. These partitions need to be
allocated to four processes of sizes 357 KB, 210 KB, 468 KB
and 491 KB in that order.
Perform the allocation of processes using-
1. First Fit Algorithm
2. Best Fit Algorithm
Worst Fit Algorithm
3 Given the following queue 95, 180, 34, 119, 11, 123, 62, 64
6 with the Read-write head initially at the track 50 and the tail
track being at 199. Discuss the different disk scheduling
algorithms and perform a comparative analysis on the study.
3 A 99 disk drive has 100 cylinders, numbered 0 to 99. Disk
7 requests come to the disk drives for cylinders 12, 26, 24, 4, 42, 8
and 50 in that order. The driver is currently serving a request at
cylinder 24. A seek takes 6 msec per cylinder moved. How much
seek time is needed for the shortest seek time first (SSTF)
algorithm?
3 Consider the resource allocation graph given in the figure.
8 (a) Find if the system is in a deadlock state.
(b) Otherwise, find a safe sequence.
3 Consider the set of 5 processes whose arrival time and burst time
9 are given below-
P1 0 5
P2 1 3
P3 2 1
P4 3 2
P5 4 3
If the CPU scheduling policy is Round Robin with time quantum
= 2 unit, calculate the average waiting time and average turn
around time.