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
What are the requirements for solution of critical section problems? Mutual exclusion : If process p is implementing in its critical section then no other processes can be exe

Q. What are the three main activities of an operating system in regard to memory management? Answer: a. Keep follows of which parts of memory are currently being used and


Process states in Linux OS Running:  Process is either ready to run or running Interruptible:  a Blocked part of a process and waiting for a signal or an event from anothe


Q. What are two differences among user-level threads and kernel-level threads? Under what situations is one type better than the other? Answer: (1) User-level threads are un

Define thrashing. Thrashing is the accident of high page traffic and low CPU utilization. It is observed that the cause of thrashing is an under-commitment of memory to program

People arrive at a barber shop at the rate of one every 4.5 minutes. If the shop is full (it can hold five people altogether), 30% of the potential customers leave and come back i

How does an operating system make multiprogramming possible by using single processor?

Q. List the four steps that are essential to run a program on a completely dedicated machine. Answer: a) Reserve machine time b) Manually load program into memory c)