Part of the Computing fundamentals glossary:

A deadlock is a situation in which two computer programs sharing the same resource are effectively preventing each other from accessing the resource, resulting in both programs ceasing to function.

The earliest computer operating systems ran only one program at a time. All of the resources of the system were available to this one program. Later, operating systems 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 systems 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. Here is the simplest 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.

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.

This was last updated in September 2005
Posted by: Margaret Rouse

Related Terms

Definitions

  • flash storage

    - Flash storage, based on flash memory, is used for data repositories, storage systems and consumer devices, such as USB drives, smartphones and solid-state drives. Flash-based storage is faster than... (WhatIs.com)

  • statistical mean, median, mode and range

    - Calculating the mean, median, mode and range of a set of numbers allows you to track changes over time and set acceptable ranges and variance. Here's how to find your data's mean, median, mode or r... (SearchDataCenter.com)

  • Schrodinger's cat

    - Schrodinger's cat explained: This definition describes Schrodinger's famous thought experiment and its place in quantum theory. (WhatIs.com)

Glossaries

  • Computing fundamentals

    - Terms related to computer fundamentals, including computer hardware definitions and words and phrases about software, operating systems, peripherals and troubleshooting.

  • Internet applications

    - This WhatIs.com glossary contains terms related to Internet applications, including definitions about Software as a Service (SaaS) delivery models and words and phrases about web sites, e-commerce ...

Ask a Question. Find an Answer.Powered by ITKnowledgeExchange.com

Ask An IT Question

Get answers from your peers on your most technical challenges

Ask Question
  • Partitioning in SQL Server 2005/2008

    Tables that are partitioned (and tables that aren't for that matter) should be able to be accessed by hundreds, thousands or tens of thousands of users at any one time. How many rows in the table ...

  • Deadlock issue in SQL Server 2005

    Using NOLOCK wouldn't cause you to miss data because it's a NTEXT field. It could cause you to get bad data back because of the dirty read. What's the transaction isolation level of your transact...

  • Deadlocks and Conflicting resources

    Hi, Can you give us some more details - what sort of platform, programming language, database, etc? Regards, Martin Gilbert. ---------------------------- The first thing I would do is add some...

Tech TalkComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.