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

What is an operating system, What is an operating system? An operating...

What is an operating system? An operating system is system software which provides interface between hardware and user. The operating system gives the means for the proper uti

Vector reduction instructions-vector processing, Vector reduction Instructi...

Vector reduction Instructions : When operations on vector are being deduced to scalar items as the result, then these are the vector reduction instructions. These instructions are

ANS, Smugglers are becoming very smart day by day. Now they have developed ...

Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

Implementation of a simple arithmetic, Q. Implementation of a Simple Arithm...

Q. Implementation of a Simple Arithmetic? So, by now we have concerned how logic and arithmetic micro-operations can be applied individually. If we combine these 2 circuits alo

Show the mips addressing modes, Q. Show the MIPS Addressing Modes? MIP...

Q. Show the MIPS Addressing Modes? MIPS Addressing Modes MIPS employs various addressing modes: 1. Uses Register as well asimmediate addressing modes for operations.

Concept of pipelining, Describe the concept of pipelining. Ans: Pipeli...

Describe the concept of pipelining. Ans: Pipelining is the means of executing machine instructions concurrently. This is the effective way of organizing concurrent activity in

Differentiate between the message and method in c++, Message in C++ : *...

Message in C++ : * Objects converse by sending messages to each other. * A message is sent to invoke a method in C++.   Method in C++: * Gives response to a message

What is the meaning of toggle in a JK flip flop, In a JK Flip-Flop, toggle ...

In a JK Flip-Flop, toggle means ? Ans. Change the output to the opposite state implies the meas of toggle, in a JK Flip-Flop.

Explain the wap stack in brief, Discuss the WAP stack in brief. The pro...

Discuss the WAP stack in brief. The protocol stacks part implemented by WAP Stack for the WAP development and research platform. The protocol stack will be exploited into many

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