You are on page 1of 13

SET 1

Process A.T B.T Priority

P1 0 5 3

P2 1 3 2

P3 2 3 1*High Priority

P4 4 1 2

Calculate AWT,ATT for i)FCFS II)SJF III)SRTF IV)RR(TQ=2ms)

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)?

Consider the following snapshot of a system

Process Allocation Max Available


R1 R2 R3 R1 R2 R3 R1 R2 R3
P1 100 322 011
P2 612 613
P3 211 314
P4 002 422

Answer the following questions using Banker’s algorithm


i) Is the system is safe state? ii) If the system is in safe state, find the safe sequence.
ii) Take a New Request for a process and check whether It can be granted or not

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.

Process Burst time Priority

P1 10 4*High Priority

P2 6 1

P3 23 3

P4 9 2

P5 3 4

Implement FCFS,SJF,SRTF,Priority,RR CPU scheduling algorithm for the given problem


instance.

Consider the following reference string with four page frames

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

Consider the following page Reference string: 1,2,3,4,1,5,6,2,1,2,3,7,6,3,2,1,2,3,6


Calculate no.of page faults occurs by applying FIFO, LRU, Optimal algorithms for 3 frames.

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)

Process Id Arrival time Burst time

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

Consider the following reference string with Four page frames

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

List the advantages and disadvantages of various CPU scheduling algorithms.


Consider a logical address space of 64 pages of 1024 words each, mapped onto a physical
memory of 32 frames.
i) How many bits are there in the Logical address?
ii) How many bits are there in the Physical address?

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.

Consider the following page Reference string: 1,2,3,4,1,5,6,2,1,2,3,7,6,3,2,1,2,3,6


Calculate no.of page faults occurs by applying FIFO,LRU,Optimal algorithms for 3 frames.

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.

Consider the following snapshot of a system

Process Allocation Max Available


R1 R2 R3 R1 R2 R3 R1 R2 R3
P1 100 322 011
P2 612 613
P3 211 314
P4 002 422

 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 P2 arrives for additional resources of (0,1,1), can the Banker's
algorithm grant the request immediately?
 What would be the new system state after the allocation?

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

Consider the following reference string with three page frames

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)?

Consider the following reference string with Four page frames

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

Consider the following page-reference string: 0 1 3 6 2 4 5 2 5 0 3 1 2 5 4 1 0 How many page faults


would occur for the LRU and optimal replacement algorithms, assuming 4 frames? Remember that all
frames are initially empty, so your first unique pages will all cost one fault for each. Also, compute Hit
ratio of each algorithm.

FCFS,SJF,SRTF,RR(TQ=2ms).Find Avg WT, Avg TAT.


SET 20

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

Explain about Free Space Management?


SET 21

FCFS,SJF,SRTF,RR(TQ=2ms).Find Avg WT, Avg TAT.

SET 22

What is dining philosophers problem? Discuss the solution to dining philospher’s problem using
Semaphores.

SET 23

Discuss Multi threading models


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 24

Describe Different File Access Methods in Detail.

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

Explain in detail about Contiguous Memory allocation

SET 27
Write in detail about File attributes, operations, types and structures.

SET 28

Discuss in detail about different types of System Calls

What are different states of a process? Explain using a process state transition diagram

SET 29

Explain about File System Mounting.

How operating system act as a resource manager? Explain

SET 30

What is preemptive scheduling? What is non-preemptive scheduling? Which scheduling


algorithms can be preemptive?Explain with Examples

Discuss about the operating system structures.

SET 31

Describe the differences among short term, medium term and long term scheduling with Neat
Diagrams

What is Paging? Explain the basic method for implementing paging.


SET 32

Discuss any two Disk Scheduling Algorithms with Examples

Compare and Contrast Distributed ,Multiprocessor and Clustered Systems

SET 33

Describe process scheduling in detail with neat Diagrams

Explain the five major activities of an operating system in regard to process management?

You might also like