OS Assignment
OS Assignment
OS Assignment
2. State the need for page replacement. State and explain procedure for FIFO with example.What is Beladys
anomaly?Consider the following page reference string:1,2,3,4,2,1,5,6,2,1,2,3,7,6,3,2,1,2,3,6.How many page faults would
occur for the following page replacement algorithms,assuming one,two,three,four,five,six or seven frames?Remember all
frames are initially empty,so your first unique pages will all cost one fault each.
• LRU replacement
• FIFO replacement
Optimal replacement
3. Consider the following set of processes with the length of CPU-burst time given in milliseconds
Process Burst time Priority Arrival Time
P1 10 3 0
P2 1 1 1
P3 2 3 2
P4 1 4 1
P5 5 2 2
Draw the Gantt Chart for the execution of these processes using FCFS,SJF.SRTS,Pre-emptive and Non Pre-emptive priority,
round robin with time slice of 2 ms.Find the average waiting time using each of the methods
4. 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 was at cylinder 125.The queue of pending requests,in FIFO order is
86,1470,913,1774,948,1509,1022,1750,130.Startinf from the current head position,what is then total distance(in
cylinders)that the disk arm moves to satisfy all the pending requests for SCAN.
5. Suppose that the disk rotates at 7200 rpm
(i) What is the average latency of the disk drive?
(ii) Identify seek distance can be covered in the time?
6. Consider a memory system with a cache access time 10ns and a memory access time of 110 ns,
assume the memory access time includes the time to check the cache. If the effective access time is
10% greater than the cache access time, what is the hit ratio H?
7.
Explain the FCFS, preemptive and non-preemptive versions of Shortest-Job First andRound Robin
(time slice = 2) scheduling algorithms with Gantt charts for the fourProcesses given. Compare their
average turnaround and waiting time. (NOV/DEC2018)
Process ArrivalTime WaitingTime
P1 0 8
P2 1 4
P3 2 9
P4 3 5
8
Consider the following set of processes, with the length of the CPU
– burst time givenin Milliseconds:
Process BurstTime Priority
P1 10 3
P2 1 1
P3 2 3
P4 1 4
P5 5 2
The processes are arrived in the order P1,P2,P3,P4,P5,all time0.