Classof1 logo
Fax: 1- 425- 458- 9358 | Toll free: 1- 877- 252 - 7763
Bookmark and Share
Forgot Password? Click Here
Register  |  Account

Need help with Computer Science assignment?

Get customized homework help now!

Deadlocks

Deadlock means a particular condition when numbers of process are waiting for each other to release a resource, or more than two processes are waiting for resources in a circular chain. It is a usual trouble in multiprocessing where many processes share a particular type of mutually exclusive resource known as a software lock or a soft lock. It occurs when two or more tasks permanently stop each on the process of their tasks are trying to lock.

The factors that cause deadlock

A deadlock may happen in operating system, in database or any task involving several processes running simultaneously. There are several factors which can bring about this dead lock.

Locks- on resources certain things such as objects, pages, rows, metadata and applications can create deadlock.

Worker threads- lined up works awaiting worker who is free can also cause deadlock. For these works own resources which block all the other worker threads hence will bring about deadlock.

Memory- when there is no space for new accommodations at the same time number of programs waiting for the memory or the space can create deadlock. In the case of two applications which require 50MB to run but for accommodation need only 25MB and the space available also 25MB then both have to wait for each other to release the resources.

Parallel query execution-(related resources) - the different agents such as coordinator, producer and the consumer threads linked with an exchange port may hinder the process and bring deadlock. Thus there are factors still much more which can cause this thing called deadlock.

How to detect the deadlocks

After a deadlock has occurred traditionally there are some methods to detect them with the help of the Database Engine deadlock detection scheme. Usually these are executed by lock monitor whose threads periodically starts exploring through all of the duties in an instance of the database engine. There are some processes involved like the default interval which is about 5 seconds is prime process. And if that is detected by the lock monitor then this 5 seconds will reduce to 100miliseconds. If it stops detecting then the seconds will rise to 5 back again.

Usually when the database engine detects the deadlock victim, it removes the deadlock by choosing one of the threads as a deadlock victim. The database will be responsible for eliminating the present batch being done for the thread and returns the transaction of the deadlock victim, and is back with 1205 error to the application.

Questions:

  • What is deadlock?
  • List some of the factors cause deadlock.
Computer Science Homework Help
Name* :
Email* :
Country* :
Phone* :
Subject* :
Upload Homework :
Upload another homework (upto 5 uploads max.)
Due Date
Time
AM/PM
Timezone
Instructions
(Type Security Code - case sensitive)