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 a safe state and an unsafe state? Answer:  A state is safe if the system can allocate resources to every process in some order and still avoid a deadlock. A system is

Q. Timers could be utilized to compute the current time. Provide a little description of how this could be accomplished. Answer: A program could utilize the following ap

We have talked about blocking locks, which voluntarily yield, and spinlocks, which just spin until they acquire the lock. At ?rst, it seems like spinlocks are verywasteful, and tha

What are the benefits of thread pools:- The benefits of thread pools are 1. It is usually faster to service a request with an existing thread than waiting to make a thread.

Consider the following snapshot of a system, answer the following questions using the banker's algorithm: 1. What is the content of the matrix Need? Is the system in a safe stat

Question: a) The following questions pertain to User and Group accounts in Windows XP: i) Give four differences between a Power User and a Guest User account. ii) Explain h

What is contiguous allocation? Allocation of a group of consecutive sectors for a one file.

What are the main differences between operating systems for mainframe computers and personal computers? The design goals of operating systems for those machines are quite diffe

The swapper work s on the biggest scheduling priority. Initially it will look for any sleeping process, if not get then it will see for the ready-to-run process for swapping. Bu

Problem: (a) (i) Explain what a single system image is and how it is related to the concept of a distributed operating system? (ii) What are the main differences between a