New Page 1
Welcome to basicsofcomputer.com
 

Share This Free Knowledge With Your Friends:

Home » Deadlocks » Introduction to Deadlocks

Introduction to Deadlocks:

Definition and Explanation:

In a multiprogramming environment, several processes compete for resources. A situation may arise where a process is waiting for a resource that is held by other waiting processes. This situation is called a deadlock.

A system has a finite set of resources such as memory, I/O devices, etc. It also has a finite set of processes that need to use these resources. A process that wishes to use any of these resources, makes a request to use that resource. If the resource is free the process gets it. If it is being used by another process, it waits for it to become free. The assumption is that the resource will eventually become free and the waiting process will then use the resource. But in some situations, the other process may also be waiting for some resource.

"A set of processes is in a deadlock state when every process in the set is waiting for an event that can only be caused by another process in the set."

Suppose we have two tape drives and two processes. Each process has got one tape drive for each process, but both need two such tape drives to proceed with execution. Each is waiting for the other process to release the other tape drive. This will never happen as the other is also waiting for the same thing. This situation is a deadlock.

Deadlock Examples:

Following are some examples of deadlock.

Example 1:

The following figure is of a traffic deadlock. It makes the nature of deadlock very clear. None of the cars can pass unless at least one of them backs up or is removed.

Example 2:

When two trains approach each other at a crossing, both shall come to a full stop and neither will start up again until the other has gone.

Example 3:

Suppose we have, a printer and a tape drive. Process A requests for the printer and gets it. Process B requests tape drive and it is granted to it. Now A asks for the tape drive but the is denied until B releases it. At this point, the process B asks for the printer before the tape drive.

Now both processes are waiting for each other to release the resource and are blocked. Both processes will remain in this situation forever. This situation is called deadlock.

Relevant Articles:

Introduction to Deadlocks
Resources in Operating System
Methods for Handling Deadlocks
Deadlock Avoidance in Operating System
Deadlock Characterization in Operating System
Deadlock Detection/Algorithm/Example in Operating System
Deadlock Recovery/Methods/Algorithms in Operating System
 
New Page 1

Basic Computer Science

   
» The Age of Information

» Types of Computer and Digital Age

» Input and Output Devices

» Storage Devices Of Computer

» Central Processing Unit

» Software: The Power Behind The Power

» Data Communication and Computer Networks

» The Nature Of Information

» The System Theory

» Transaction Processing System (TPS) and Management Information System (MIS)

» Decision Support System (DSS) and Executive Support System (ESS)

» Expert System (ES) and Office Information System (OIS)

 

Operating Systems

   
» Introduction to Operating System

» Introduction to Process Management

» Threads and CPU Scheduling

» Process Synchronization in Operating System

» Deadlocks

» Memory Management in Operating System

» Virtual Memory in Operating System

» File System Management in Operating System

» I/O and Device Management

» Security

» Linux Operating System

 

Database Management System

   
» Introduction to Database Systems

» Database System Architecture

» Database Administration and Database Development Process

» The Entity-Relationship Model

» Semantic Object Model

» Logical Database Design and Relational Data Model

» Normalization in Database

» Transformation of E-R Model into Relational Data Model

» Representing Semantic Object Model and Types of Semantic Object Model

» Physical Database Design

» Introduction to Structured Query Language (SQL)

» Implementation of Relational Database and Database Application Design

» Client Server Database Systems & Open Database Connectivity (ODBC)

 

Questions and Answers

   
» Basics of Information Technology

» Computer Architecture

» Data Communication

» Information Networks

» Fundamentals of the Internet

» Application and Uses of Computer

» Security, Copyright and The Law

» Windows Operating Systems

» Spreadsheet Software

» Process Management in CPU

» CPU Scheduling

» Process Synchronization

» Deadlocks

» Memory Management

» Database Systems

» Database System Architecture

» Database Administration and Database Development Process
 
 
New Page 1
 

Home                Dictionary                 Contact us                   About us                    Privacy policy                  Link to us                   Advertise

Copy right ©  2012