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

Produce a sequence diagram for the task add, This assignment is based on th...

This assignment is based on the 'Swansea Docklands Heritage Society' case study attached.  The assignment is the third of three related submissions, all based on the Swansea Dockla

Symbol for the new euro currency in my spreadsheet, How can I go in the sym...

How can I go in the symbol for the new Euro currency in my spreadsheet? Ans) Microsoft suggestted a new Tahoma font with the Euro symbol.

Levels of parallel processing, Levels Of Parallel Processing Depending ...

Levels Of Parallel Processing Depending upon the difficulty under consideration, parallelism in the answer of the problem may be achieved at dissimilar levels and in different

What are the defining traits of an object-oriented language, The defining t...

The defining traits of an object-oriented language are: * Encapsulation * Inheritance * Polymorphism

War (write after read) - data hazards , WAR (write after read) - Data hazar...

WAR (write after read) - Data hazards in computer architecture: WAR (write after read) - j tries to write at destination before it is read by i , hence i  wrongly gets the n

State the advantages of CMOS, State the advantages of CMOS. Ans. Su...

State the advantages of CMOS. Ans. Subsequent are the advantages of CMOS: Both n-channel and p-channel devices are fabricated on similar substrate. Low power di

Classification based on grain size, Classification Based On Grain Size ...

Classification Based On Grain Size  This classification is based on identifying  the parallelism in a program to be implemented on a multiprocessor system. The plan is to recog

4 variable k-maps, 4-variable K-maps have 16 squares which arearranged in 4...

4-variable K-maps have 16 squares which arearranged in 4 columns and 4 rows.  Columns and rows are labeled with 2 variables. The rows are arranged so that C or D ch

What are advantages and drawbacks of latches, What are advantages and drawb...

What are advantages and drawbacks of latches? Advantages and drawbacks of latches: Area of a latch is classically less than a Flip Flop. It consumes less power, becaus

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