You are on page 1of 4

INTRODUCTION TO OPERATING SYSTEMS

PART - A
1. Define Process.
2. Define the term dispatch latency.
3. What is meant by the state of the process?
4. Differentiate between pre emptive and non pre emptive scheduling.
5. What does PCB Contain?
6. List any four scheduling criteria.
7. Define Context switching.
8. List out the methods used to recover from the deadlock.
9. What is preemptive scheduling?
10. State the conditions for deadlock.
11. Write the three ways to deal the deadlock problem.
12. Define safe state.
PART - B
1. Consider the following five processes, with the length of the CPUburst time given
in milliseconds.

Process Burst Time

P1 10

P2 29

P3 3

P4 7

P5 12

Consider the First come First Serve (FCFS), Non Preemptive Shortest Job First
(SJF), Round Robin (RR) (Quantum=10ms) scheduling algorithms. Illustrate the
scheduling using Gantt chart. Which algorithm will give the minimum average
waiting time.Discuss.

2. Construct a Resource allocation graph for the following scenario. At time ‘t”
Process P1 request for a resource X. process P2 request for a resource Y. Both
the resources are available and they are allocated to the requesting process. At
time t1 where t1 and t2 both the processes are still holding the resources,
however process P1 request for Y which is held by P2, process P2 request for X
held by P1.Will there be a deadlock? If there is a deadlock discuss the four
necessary condition for deadlock, else justify there is no deadlock.

3. What is a process? Discuss components of process and various states of a


process with the help of a process state transition diagram.

4. How can deadlock be detected? Explain.

5. Describe the difference among short-term, medium-term and long-term


scheduling with suitable example.

6. Consider the following snapshot of a system.

Processes Allocation Max Available

ABCD ABCD ABCD

P0 2001 4212 3321

P1 3121 5252

P2 2103 2316

P3 13 1 2 1424

P4 1432 3665

Answer the following question using Bankers algorithm

(i) Illustrate that the system is in safe state by demonstrating anorder in


which the processes may complete?

(ii) If a request from a process P1 arrives for (1, 1, 0, 0), can therequest be
granted immediately?
(iii) If the request from P4 arrives for (0, 0, 2, 0) can the request be granted
immediately?

7. Consider the following set of processes, with the length of the CPU burst given in
milliseconds:
Process Burst Time Priority

P1 10 3

P2 1 1

P3 2 3

P4 1 4

P5 5 2

The Process are assumed to have arrived in the order P1, P2, P3, P4, P5 all at the
time 0.

i) Draw Gantt chart that illustrate the execution of these processes using the
scheduling
algorithms FCFS (small priority number implies higher priority) and RR
(quantum=1).

ii) What is the waiting time of each process for each of the scheduling algorithms?

8. Consider the following system snapshot using data structures in the Banker’s
Algorithm with resources A, B, C and D and process P0 to P4:

Max Allocation Available

ABCD ABCD ABCD

P0 6012 4001 3211

P1 1750 1100

P2 2356 1254

P3 1653 0633

P4 1656 0212

Using Banker’s Algorithm, answer the following questions:

a) How many resources of type A, B, C and D are there?


b) What are the contents of the need matrix?
c) Is the system in a safe state? Why?
d) If a request from process P4 arrives for additional resources of (1, 2, 0, 0)
can the Banker’s Algorithm grant the request immediately? Show the new
system state and other criteria.

You might also like