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

Show the foundation of ALU design, Q. Show the foundation of ALU design? ...

Q. Show the foundation of ALU design? The foundation of ALU design starts with micro-operation implementation. Thus let's first explain how bus can be used for Data transfer m

Finite state automaton, Once a finite state automaton (FSA) is designed, it...

Once a finite state automaton (FSA) is designed, its transition diagram can be translated in a straightforward manner into program code. However, this translation process is consid

Illustrates about metal fix, Illustrates about Metal Fix. A Metal Fix i...

Illustrates about Metal Fix. A Metal Fix implies that only the upper metal interconnects layers are influenced. Connections may be made or broken, but new cells may not be adde

What is exact and approximation algorithm, What is Exact and Approximation ...

What is Exact and Approximation algorithm? The principal decision to choose solving the problem exactly is called exact algorithm. The   principal decision to choose solving th

Describe the lists used in html, Q. Describe the LISTS used in html? Li...

Q. Describe the LISTS used in html? Lists are used when data are to be mentioned in form of points such as: causes of a particular issue, list of items etc. Lists break up mono

What do you mean by shopping bots, Q. What do you mean by shopping bots? ...

Q. What do you mean by shopping bots? ANSWER: A shopping bot or buyer agent is an intelligent agent on a Web site that assists you, the customer, search the products and servic

What is stack and register manipulation, Q. What is Stack and register mani...

Q. What is Stack and register manipulation? Stack and register manipulation: If we create stacks, stack instructions prove to be useful. LOAD IMMEDIATE is a good illustration

Explain the term instruction cycle, Instruction Cycle The instruction c...

Instruction Cycle The instruction cycle consists of a series of steps required for the execution of an Instruction in a program. A distinctive instruction in a program is compo

Storage devices, Logic manufactures have produced 'large scale' logic (LSI)...

Logic manufactures have produced 'large scale' logic (LSI) blocks to achieve complex functions; a typical set of logic functions is that of data storage. There are two main types o

What is macro-expansion, What is macro-expansion? Macro calls lead to m...

What is macro-expansion? Macro calls lead to macro expansion. Throughout macro expansion, the macro call statement is replaced through a sequence of assembly statements.

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