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
Transferring files from Windows to Unix Be very careful transferring files from Windows to Unix. If you do transfer a file from Windows to Unix open the file, in Unix, using vi

Explain with an example the need of Shift Alteration in critical section problem? Consider processes P i and P j and consider the algorithm for P i and P j .

In a multiprogramming and time-sharing environment, several users share the system simultaneously. This situation can result in various security problems. a

What are the objectives and functions of operating system? Functions of operating systems 1.      It allocates the resources and acts as a supervisor. 2.      It hides th

What are the five major activities of an operating system in regard to process management? The creation and deletion of both user and system processes The suspension and res

Placement algorithms :calculate where in available real-memory to execute a program. Common functions are next-fit, first-fit, and best-fit. Replacement algorithms :are

Explain about deadlock prevention? In order for the occurrence of deadlock, the four conditions like mutual exclusion, hold and wait, no pre-emption and  circular wait must hap

Ask question Project Details PROJECT OVERVIEW The ABC Hospital is upgrading their version of Windows. As part of the upgrade, 100 new computers will be purchased. Your task is to

Demonstrate that your program (include the program output as part of the final report) can produce the correct output with the following parameters. For each case comment if the ou

Define spooling. A spool is a buffer that holds output for a device, like printer, that cannot accept interleaved data streams. When a request finishes printing, the spooling s