Deadlocks, Operating System

At the end of this lecture, and into the next lecture, we will discuss the last major type of logical error that can occurwhen programming with threads. A deadlock occurswhen two things (threads, processes, etc) wait on each other. One example of a deadlock is known as the Dining Philosophers problem. In this abstract problem, philosophers alternate between thinking and eating, and the dining table has as many forks as philosophers. Each philosopher needs two forks to eat with. The problem which can occur is if each philosopher gets one fork, and will not let go of it. Then no philosopher can get two forks, which he or she needs in order to eat. In this situation, we have a deadlock, and the philosophers will starve!

Posted Date: 3/12/2013 5:29:16 AM | Location : United States







Related Discussions:- Deadlocks, Assignment Help, Ask Question on Deadlocks, Get Answer, Expert's Help, Deadlocks Discussions

Write discussion on Deadlocks
Your posts are moderated
Related Questions
Second chance Algorithm When the page is chosen the reference bit is checked to see whether it has been referenced before. If that is the case after that it is given a second c

Q. Explain about Time Sharing Systems? Time Sharing Systems Multi-programmed batched systems provide an environment where various system resources (for illustration CP


Additional Reference bits algorithm Here we keep an 8-bit byte for every page in memory. At standard intervals the reference bit is shifted by the OS. If a shift register conta

Question 1 Explain (a) tightly coupled systems                               (b) Loosely coupled system Question 2 Describe the RPC model Question 3 Write a note o

Explain Rehashing to Handle Collision Rehashing:  Re-hashing schemes make use of a second hashing operation while there is a collision. If there is an additional collision, we

What is low-level formatting? Before a disk can kept data, it must be required into sectors that the disk controller can read and write. This procedure is called low-level form

Q. What resources are utilized when a thread is created? How do they vary from those used when a process is created? Answer: For the reason that a thread is smaller than a pr


what are the main advantages of multiprogramming