Write an algorithm for deadlock detection, Computer Engineering

Assignment Help:

Write an algorithm for deadlock detection.

An algorithm for deadlock detection:

1. Assume that Work and Finish be vectors of length m and n, correspondingly.

Initialize:

(a) Work = Available

(b) For i = 1,2, ..., n, if Allocation i ¹≠  0, then

Finish[i] = false; otherwise, Finish[i] = true.

2. Determine an index i such as both:

(a) Finish[i] == false

i.  (b)  Requesti ≤  Work

If no such i exists, go to step 4.

3.  Work = Work + Allocationi

Finish[i] = true go to step 2.

4. If Finish[i] == false, for some i, 1 ≤  i ≤  n, then the system is in deadlock state. Furthermore, if Finish[i] == false, then Pi is deadlocked.


Related Discussions:- Write an algorithm for deadlock detection

Determine about the blocking suspicious behaviour, Determine about the bloc...

Determine about the blocking suspicious behaviour The response could be spontaneous and automatic, with an option to generate the alert message manually. The history recorded i

Illustrate working of asynchronous counters, Q. Illustrate working of Async...

Q. Illustrate working of Asynchronous Counters? This is more frequently referred as ripple counter as the change that takes place in order to increment counter ripples through

Visualization, Visualization Visualization is a general method in contr...

Visualization Visualization is a general method in contract to search based tools.  In this method visual aids are given like pictures to assist the programmer in evaluating th

Difference among msgbox statement and msgboxq function, MsgBox is a built i...

MsgBox is a built in VB function which shows a Message Box and MsgBoxQ is a function definite by the user.

By which companding helps in reducing signal, Companding helps in reducing ...

Companding helps in reducing with respect to signal:  (A) Interference                    (B) Signal overloading (C) Non linearity                 (D) Quantization noise

What is binary search, Binary Search: Search a sorted array by repeatedly i...

Binary Search: Search a sorted array by repeatedly in-between the search interval in half. Start with an interval covering the entire array. If the value of the search key is less

C++, find the minimum total number of shelves including the loading process...

find the minimum total number of shelves including the loading process

Operating system., what is the minimum number of page faults for an optimal...

what is the minimum number of page faults for an optimal page replacement strategy?

What is scan, What is "Scan"? Scan Insertion and ATPG helps test ASICs ...

What is "Scan"? Scan Insertion and ATPG helps test ASICs (e.g. chips) during manufacture. If you know what JTAG boundary scan is, then Scan is the similar idea except that it i

Describe data transfer instructions, Q. Describe Data Transfer Instructions...

Q. Describe Data Transfer Instructions? These instructions transfer data from one location in the computer to another location without altering the data content. Most common tr

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd