Term paper about deadlock

Topics: Deadlock, Resource allocation, Operating system Pages: 10 (1423 words) Published: November 18, 2014

Operating system is a collection of software that manages computer hardware resources and provides common services for computer programs. In this term paper a thorough discussion of the drawbacks of, and the problems involved in, previous proposals to handle deadlocks in Operating system is provided. A deadlock is a situation which occurs when a process or thread enters a waiting state because a resource requested is being held by another waiting process, which in turn is waiting for another resource. If a process is unable to change its state indefinitely because the resources requested by it are being used by another waiting process, then the system is said to be in a deadlock. In a transaction database, a deadlock happens when two processes each within its own transaction updates two of information but in the opposite order. Several highlights of our proposals are emphasized.


In Operating system, a deadlock is a situation in which two computer programs sharing the same resources are effectively preventing each other from accessing the resource, resulting in both programs ceasing to function. The earliest computer operating system ran only one program at a time. All the resources of the system were available to this one program. Later, operating system ran multiple programs at once, interleaving them. Programs were required to specify in advance what resources they needed so that they could avoid conflicts with other programs running at the same time. Eventually some operating system offered dynamic allocation of resources. Programs could request further allocations of resources after they had begun running. This led to the problem of the deadlock. For example, Program 1 requests resource A and receives it. Program 2 requests resource B and receives it. Program 1 requests resource B and is queued up, pending the release of B. Program 2 requests resource A and is queued up, pending the release of A. now neither program can proceed until the other program releases a resource. The operating system cannot know what action to take. At this point the only alternative is to abort (stop) one of the programs. Deadlock is a common problem in multiprocessing systems, parallel computing and distributed systems, where software and hardware locks are used to handle shared resources and implement process synchronization. Learning to deal with deadlocks had a major impact on the development of operating systems and the structure of databases. Data was structured and the order of requests was constrained in order to avoid creating deadlocks.

Bridge Crossing Example

Fig 2


Resource-Allocation Graph Corresponding wait-for graph Fig3.6

Only with luck will processes avoid deadlock O.S. can avoid deadlock

Methods for handling Deadlock

Generally speaking, we can deal with the deadlock problem in one of three ways: We can use a protocol prevent or avoid deadlock, ensuring that the system will never enter a deadlock state. We can allow the system to enter a deadlock state, detect it, and recover. We can ignore the problem altogether and pretend that deadlocks never occur in the system. This method is preferable when deadlock happens rarely. The third solution is the one used by most operating systems, including UNIX and WINDOWS; it is then up to the application developer to write programs that handle...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • Deadlock Essay
  • Term Paper About Basketball
  • Term Paper About Adrenaline
  • Term Paper
  • Deadlock Essay
  • Deadlock Essay
  • Term Paper About Computer Organization
  • Term Paper About Anti Virus

Become a StudyMode Member

Sign Up - It's Free