Professional Documents
Culture Documents
P1 0 5 3
P2 1 3 2
P3 2 3 1*High Priority
P4 4 1 2
Suppose that a disk drive has 5,000 cylinders, numbered 0 to 4,999. 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 pending requests for each
of the following disk scheduling algorithms? i) FCFS ii) SCAN iii)CSCAN IV)SSTF
SET 2
Consider the following set of processes with the length of the CPU-burst time given in milliseconds:
Process Burst time Priority
P1 10 3
P2 11 1
P3 2 3
P4 1 4
P5 5 2
The processes are assumed to have arrived in the order p1, p2, p3, p4, p5, all at time 0.
i) Draw four Gantt charts illustrating the execution of these process using FCFS, SJF, a non-pre-
emptive priority and RR (quantum = 1) scheduling.
ii) What is the turnaround time of each process for each of the scheduling algorithms specified
in (i)?
iii) What is the waiting time of each process for each of the scheduling algorithms specified in
(i)?
iv) Which of the schedules in (i) results in the minimal average waiting time (over all
processes)?
SET 3
Given the following processes and burst times Calculate the average wait time when each of the above
scheduling algorithms is used? Assume that a quantum of 8 is being used.
P1 10 4*High Priority
P2 6 1
P3 23 3
P4 9 2
P5 3 4
1,2,3,4,5,3,4,1,6,7,8,7,8,9,7,8,9,5,4,5,4,2
Calculate No.of Pafe faults occurs by applying Optimal,LRU,FIFO page Replacement Alg.
SET 4
Suppose that a disk drive has 5,000 cylinders, numbered 0 to 4,999. 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 pending requests for each
of the following disk scheduling algorithms? i) SSTF ii) C-SCAN
SET 5
consider the following set of processes, with the length of the CPU-burst time given in milli
seconds
Process Burst time priority
P1 10 3
P2 11 1
P3 2 3
P4 1 4
P5 5 2
The processes are assumed to have arrived in the order P1,P2,p3,p4,p5,ALL AT a Time
>Draw the grant charts illustrating the execution of these processes using FCFS, SJF, a non
preemptive priority (a small priority number implies a higher priority)and
RR(quantum=1)scheduling .Also determine the average waiting time, average turnaround time.
Implement FIFO, SSTF, SCAN and C-SCAN disk scheduling algorithms for the given request of
tracks in the order and the drive is serving at 47.
55,58,37,18,90,160,150,38,184
SET 6
Consider the set of 5 processes whose arrival time and burst time are given below
Find the average turnaround time and average waiting time for FCFS,SJF,SRTF,RR(Tq=2ms)
P1 3 4
P2 5 3
P3 0 2
P4 5 1
P5 4 3
Implement Bankers algorithm for the given resource allocation state
How many resources are there of type (A,B,C)?
What are the contents of the Need matrix?
Is the system in a safe state? Why?
Give the safe sequence.
If a request from process P1 arrives for additional resources of (0,5,2), can the Banker's
algorithm grant the request immediately?
What would be the new system state after the allocation?
SET 7
1,2,3,4,5,3,4,1,6,7,8,7,8,9,7,8,9,5,4,5,4,2
Calculate No.of Pafe faults occurs by applying Optimal,LRU,FIFO page Replacement Alg.
Suppose that a disk drive has 5,000 cylinders, numbered 0 to 4,999. The drive is currently serving a
request at cylinder 125 and the previous request was at cylinder 155. 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 pending requests for each
of the following disk scheduling algorithms? i) FCFS ii) SCAN iii)SSTF iv)C SCAN
SET 8
Suppose that a disk drive has 5,000 cylinders, numbered 0 to 4,999. The drive is currently serving a
request at cylinder 125 and the previous request was at cylinder 155. 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 pending requests for each
of the following disk scheduling algorithms? i) SSTF ii) CSCAN
SET 9
Describe the producer/consumer problem. Discuss the solution to producer/consumer problem using
semaphore.
SET 10
consider the following set of processes, with the length of the CPU-burst time given in milli
seconds
Process Burst time priority
P1 8 3
P2 6 1
P3 2 3
P4 4 4
P5 5 2
The processes are assumed to have arrived in the order P1,P2,p3,p4,p5,ALL AT a Time
>Draw the grant charts illustrating the execution of these processes using FCFS, SJF, a non
preemptive priority (a small priority number implies a higher priority)and
RR(quantum=1)scheduling .Also determine the average waiting time, average turnaround time.
SET 11
Consider the following set of processes with the length of the CPU-burst time given in milliseconds:
Process Burst time Priority
P1 6 3
P2 8 1
P3 2 3
P4 1 2
P5 5 4
The processes are assumed to have arrived in the order p1, p2, p3, p4, p5, all at time 0.
i) Draw four Gantt charts illustrating the execution of these process using FCFS, SJF, a non-pre-
emptive priority and RR (quantum = 1) scheduling.
ii) What is the turnaround time of each process for each of the scheduling algorithms specified
in (i)?
iii) What is the waiting time of each process for each of the scheduling algorithms specified in
(i)?
iv) Which of the schedules in (i) results in the minimal average waiting time (over all
processes)?
The queue of pending requests in FIFO order is 98,183,37,122,14,124,65,67 Starting from the current
head position 53, what is the total distance (in cylinders) that the disk arm moves to satisfy all pending
requests for each of the following disk scheduling algorithms? i) SSTF ii) CSCAN iii)SCAN IV)FIFO
SET 12
1,2,3,4,5,3,4,1,6,7,8,7,8,9,7,8,9,5,4,5,4,2,3,4,2
Calculate No.of Pafe faults occurs by applying Optimal,LRU,FIFO page Replacement Alg.
The queue of pending requests in FIFO order is 98,183,37,122,14,124,65,67 Starting from the current
head position 53, what is the total distance (in cylinders) that the disk arm moves to satisfy all pending
requests for each of the following disk scheduling algorithms? i) FCFS ii) SCAN iii)CSCAN iv)SSTF
SET 13
Consider the following set of processes with the length of the CPU-burst time given in milliseconds:
Process Burst time Priority
P1 4 3
P2 7 1
P3 6 3
P4 2 2
P5 8 4
The processes are assumed to have arrived in the order p1, p2, p3, p4, p5, all at time 0.
i) Draw four Gantt charts illustrating the execution of these process using FCFS, SJF, a non-pre-
emptive priority and RR (quantum = 1) scheduling.
ii) What is the turnaround time of each process for each of the scheduling algorithms specified
in (i)?
iii) What is the waiting time of each process for each of the scheduling algorithms specified in
(i)?
Which of the schedules in (i) results in the minimal average waiting time (over all processes)?
1,2,3,4,5,3,4,1,6,7,8,7,8,9,7,8,9,5,4,5,4,2,3,4,2
Calculate No.of Pafe faults occurs by applying Optimal,LRU,FIFO page Replacement Alg.
SET 14
What inconveniences that a user can face while interacting with a computer system, which is without an
operating system?
Consider a disk system with 600 cylinders. The requests to access the cylinders occur in the sequence:
20, 270, 569, 340, 325, 232, 410, 267, 115 and 90. Assuming that the head is currently at cylinder 69,
what is the time taken to satisfy all requests if it takes 1ms to move from one cylinder to adjacent one
by using SSTF, FCFS,SCAN,CSCAN?
SET 15
A barbershop consists of a waiting room with n chairs and the barber room containing the barber chair.
If there are no customers to be served, the barber goes to sleep. If a customer enters the barbershop
and all chairs are occupied, then the customer leaves the shop. If the barber is busy but chairs are
available, then the customer sits in one of the free chairs. If the barber is asleep, the customer wakes up
the barber. Using semaphore, write the functions to coordinate the barber and the customers.
SET 16
How does deadlock avoidance differ from deadlock prevention? Write about deadlock avoidance
algorithm in detail.
SET 17
With regard to process synchronization describe what is meant by Critical Section & Race conditions?
SET 18
SET 19
The queue of pending requests in FIFO order is 98,187,37,122,14,120,60,67 Starting from the current
head position 51, what is the total distance (in cylinders) that the disk arm moves to satisfy all pending
requests for each of the following disk scheduling algorithms? i) FCFS ii) SCAN iii)SSTF iv)CSCAN
SET 22
What is dining philosophers problem? Discuss the solution to dining philospher’s problem using
Semaphores.
SET 23
SET 24
SET 25
What are data structures involved in Banker’s algorithm? Write an algorithm to know whether the
system is in safe state or not
SET 26
SET 27
Write in detail about File attributes, operations, types and structures.
SET 28
What are different states of a process? Explain using a process state transition diagram
SET 29
SET 30
SET 31
Describe the differences among short term, medium term and long term scheduling with Neat
Diagrams
SET 33
Explain the five major activities of an operating system in regard to process management?