Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Operating System Notes

Rating
-
Sold
-
Pages
9
Uploaded on
21-09-2022
Written in
2022/2023

This file consist of notes about processing scheduling models and algorithms and deadlock explained clearly with diagrams

Institution
Course

Content preview

DEADLOCK
1) Define a deadlock.

A process requests resources; if the resources are not available at that
time, the process enters a waiting state. Sometimes, a waiting process
will not able to change state, because the resources it has requested
are held by other waiting processes. This situation is called a
deadlock.
A process may utilize a resource in only the following sequence:
1. Request. The process requests the resource. If the request cannot be
granted immediately (for example, if the resource is being used by
another process), then the requesting process must wait until it can
acquire the resource.
2. Use. The process can operate on the resource (for example, if the
resource is a printer, the process can print on the printer).
3. Release. The process releases the resource.
----------------------------------------------------------------------------------------------------------------------
DEADLOCK CHARACTERIZATION :
How is deadlock characterised?
Deadlocks are characterised by:
1. Necessary condition
2. Resource allocation graph
------------------------------------------------------------------------------------------------
2) Explain necessary conditions for deadlock.
Necessary Condition :
A. Mutual exclusion. At least one resource must be held in a non-sharable
mode; that is, only one process at a time can use the resource. If another

, process requests that resource, the requesting process must be delayed
until the resource has been released.
B. Hold and wait. A process must be holding at least one resource and
waiting to acquire additional resources that are currently being held by
other processes.
C. No preemption. Resources cannot be preempted; that is, a resource can
be released only voluntarily by the process holding it, after that process
has completed its task.
D. Circular wait. A set {P0, P1, ..., Pn} of waiting processes must exist
such that P0 is waiting for a resource held by P1, P1 is waiting for a
resource held by P2, ..., Pn−1 is waiting for a resource held by Pn, and
Pn is waitingfor a resource held by P0.
-------------------------------------------------------------------------------------------------------------------------
3) Explain resource allocation graph with and without deadlock
Deadlocks can be described more precisely in terms of a directed graph called
a system resource-allocation graph.
This graph consists of a set of
 A set of vertices V
 A set of edges E
The set of vertices V is partitioned into two different types of nodes :
1) A set of processes, P = {P1, P2, ..., Pn}
2) A set of Resources, R = {R1, R2, ..., Rm}
A directed edge Pi → Rj is called a request edge.
A directed edge Rj → Pi is called an assignment edge.
Pictorially, we represent each process Pi as a circle and each resource type Rj as
a rectangle.
 Since resource type Rj may have more than one instance, we
represent each such instance as a dot within the rectangle.

Written for

Institution
Course

Document information

Uploaded on
September 21, 2022
Number of pages
9
Written in
2022/2023
Type
Class notes
Professor(s)
Prof.neena
Contains
All classes

Subjects

$9.39
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
arjunreddy

Also available in package deal

Get to know the seller

Seller avatar
arjunreddy Jain University
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
3
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions