Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Deadlock and Starvation

No description
by

on 25 November 2013

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Deadlock and Starvation

Deadlock and Starvation
Introduction to Starvation
Necessary Conditions of Deadlock
Deadlock Prevention and Avoidance
Introduction to Deadlock
Current Findings
Currently systems are
build up with
some effecting prevention
OS
schedule each process
with the necessary resources
Deadlock in operating system such as
windows 7, vista, 8, OS X,
the problem with the deadlock is
not so obvious

Future expectations
In the future the technology will focus on
Android OS
Provide
deadlock immunity
technology for all applications running on the mobile

Deadlock
A process requests resources; if the resources are not available at that time, the process enters a wait state. It may happen that waiting processes will never again change state, because the resources they have requested are held by other waiting processes. This situation is called deadlock.
History

Symptoms of deadlock
A symptom of deadlock can be defined as a program or set of processes stop responding known as hang.
Examples: symptoms in oracle database

Timing:

configuration of a suitable time-out period to treat the situation as a deadlock

Logs:
maintain an activity log of database, to diagnose locks


Unresponsive Applications:

detections errors occurred wen multiple applications try to access information form Database

As per our findings concept of deadlock was identified in late 1970's

Dining philosophers problem
is often used to illustrate Deadlock

Poor deadlock management

No way of knowing how long an I/O request would take or whether it would ever be completed.

Examples of Deadlock conditions in OS/360 - mainframe
Starvation arise when a
process does not get the resources
it needs
for a long time
because
other processes are holding it
, without that resources the process can not complete the desired tasks.
The starvation takes place when a
process holds a resource
that the other process needs, but will not give it away.

Deadlock is a situation where one
process is waiting for a resource
already occupied by another process in the same set or cycle.

Difference between Deadlock and Starvation
Conditions
Mutual Exclusion:
in this condition a resource must be assigned or available for one process.

Hold and Wait:
if the process is holding a resource may request for a new resource.

No preemption:
only the process, which is holding a resource, can release it.

Circular Wait:

more than one process form a cycle where each process waits for a resource that next process holds.


Who introduced?
Initially described in an article by “Coffman” – in 1971.
Also known as “Coffman's conditions”

Ex: Deadlock conditions in Android
A deadlock condition in a Nexus One using Android 2.2 OS:

The NotificationManagerService and StatusBarService classes freeze and become unresponsive.



Ex: Deadlock conditions in Past OS's
IBM OS/360:
Main cause of deadlock conditions was due to the competitions for the devices such as tape and disk drives.

OS such as ASP/OS/360:
deadlock occurs as a result of processes waiting for spooling space on the disk.

Ex: Deadlock conditions in Current OS's
Deadlock Under Low-Memory Condition:

When you start Microsoft Pocket Internet Explorer under low-memory conditions, the Example process may deadlock in an exception loop

Deadlock Prevention
Do not allow one of the four conditions to occur.

Mutual Exclusion:
to ensure that the no other process will use the shared data structure at the same time

Hold and Wait:
a) Collect all resources before execution.
b) A particular resource can only be requested when no others are being held.
c) Utilization is low, starvation possible.

No preemption:
Release any resource already being held if the process can't get an additional resource.

Circular wait:
Number resources and only request in ascending order.

Past Prevention and avoidance methods
OS/360 (hold and wait):
When an event in a hold and wait condition an arbitrary absolute limit of 30 minutes is allowed
And then the event is canceled automatically in order to prevent the event form being waiting for ever

OS/360: (mutual exclusion):
Enq facility in OS/360 allows processes to gain exclusive control of a resource, and then uses Deq facility to release it

Prevention and avoidance methods used in current OS
Prevention based on under committing resources
Indirect methods used to violate Mutual exclusion
Indirect Method used to Violate Hold & wait
Avoidance in Resource allocation strategy

Future expectations on the Prevention and Avoidance
Deadlock Immunity:

Deadlock immunity is a property, once applied on a deadlock it automatically develops resistance from it occurring in future.

Thank you
Full transcript