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
I am not getting what you have tried to describe here. Can you elaborate more about this, i will be thankful to you. Vinay


While it is hard to resolve a deadlock which has been detected, fortunately it is fairly easy to prevent deadlocks from ever happening. The key is that the conditions above for dea

What is reference string We evaluate an algorithm by running it on a definite string of memory reference and computing the number of page faults. The string of memory reference

Define Properties to Ensure Good Search Performance A hashing function h should possess the subsequent properties to make sure good search performance: a. The hashing functi

What is preemptive and nonpreemptive scheduling? Under nonpreemptive scheduling once the CPU has been allocated to a process, the process keeps the CPU unless it releases the C

The scheduling technique in which CPU is allocated to the process with least CPU-burst time is known asĀ  Shortest job first Scheduling is a scheduling technique in which CPU i

Many-to-Many Model The many-to-many model- many user-level threads to many kernel-level threads avoids several of the limitations of the one-to-one model, although extending mu

What is critical section problem? Consider a system consists of 'n' processes. Every process has segment of code called a critical section, in which the process might be changi

What are threads? A thread is alike to sequential programs. Single threads have a beginning, sequence and end. At any given point in time during the runtime of the thread there