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
Additional-reference-bits algorithm We can keep an 8-bit byte for every page in a table in memory. The operating system shifts the reference bits right 1 bit, discarding the lo

What is co-operative process? A process is co-operating if it can influence or be affected by the other processes implementing in the system. Any process that share data with o

What is logical address space and physical address space? The set of all logical addresses formed by a program is known as a logical address space; the set of all physical addr

College life is tough.  Eating pizza for every meal is hitting you hard.  You are looking at working out to stay healthy.  You found a web site that tells you how many calories eac


List disadvantages of using a single directory. Users have no privacy. Users must be careful in choosing file names, to avoid names used by others. Users may destroy each othe

An operating system provides the environment within that programs are executed. Internally operating systems differ greatly in their makeup because they are organized along many di

Q. Give the reasons why Windows XP, Solaris and Linux implement multiple locking mechanisms. Explain the circumstances under which they use mutexes, spinlocks, semaphores, adaptiv

Clustered file organization A clustered file is also called a B-tree-clustered file is a tree-structured file in which records with adjacent index values are clustered toget

Explain the Application Interaction Protocols Application interaction protocols are uniquely defined for each program and are used to logically describe the data being passed b