Updated Ostut 2

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

||JAI SRI GURUDEV||

S.J.C.INSTITUTE OF TECHNOLOGY, CHICKBALLAPUR


Department of Computer Science & Engineering

TUTORIAL-II

Sem: 3rd SEM Sub Name: OPERATING SYSTEMS [BCS303] Date: 25/01/2024

1. Explain Dining Philosopher’s problem and reader writer’s Problem


2. Show how a semaphore provides solution to reader writer’s problem.
3. Explain critical section problem. What are the requirements that critical section problem
must satisfy.
4. Describe the resource allocation graph
i) With deadlock ii) With a cycle but no deadlock.

5. Draw the Gnatt Chart and calculate average waiting time and turn around time for the
following snapshot of processes using i) FCFS ii) SJF iii) Priority iv)RR (2 ms) scheduling
algorithm.

Process Burst Arriva p


id time l time
P1 6 0 3
P2 3 1 2
P3 1 2 1
P4 4 3 0
6. Define hardware instructions test (), set () and swap (). Give algorithms to implement
mutual exclusion with these instructions
7. Discuss in detail about deadlock. Point out and example its necessary condition.
8. Using Bankers algorithm determines whether the following system is in a safe state.

Proces Allocation Max Available


s A B C A B C A B C
P0 0 0 2 0 0 4 1 0 2
P1 1 0 0 2 0 1
P2 1 3 5 1 3 7
P3 6 3 2 8 4 2
P4 1 4 3 1 5 7

If a request from process P2 arrives for (0, 0, 2) can the request be granted immediately.
9. Illustrate with examples the Peterson’s solution for critical section problem and prove that
mutual exclusion property is preserved.
10. Consider the following snapshot of a system:
Answer the following questions using the banker's algorithm:
a.What is the content of the matrix Need?
b. Is the system in a safe state?
If a request from process Pi arrives for (0, 4, 2, 0), can the request be granted immediately?

11. Describe briefly about semaphores in synchronization.


12. Explain Multilevel queue and multi level feedback queue scheduling with diagram
13. Explain Bankers Algorithm AND resource request algorithm
14. Describe the various methods of recovery from deadlock.
15. Illustrate Bounded-Buffer Synchronization problem with pseudocode.
16. Demonstrate multi process scheduling

You might also like