Recents in Beach

What is Deadlock


Previous                                                    Next⏩

             

   In a multiprogramming environment several processes may compete for a finite number of resources. A process request resources; if the resource is available at that time a process enters the wait state. Waiting process may never change its state because the resources requested are held by other waiting process. This situation is known as deadlock.


Example

   ·   Traffic only in one direction.
   ·   Each section of a bridge can be viewed as a resource.
   ·   If a deadlock occurs, it can be resolved if one car backs up (preempt                                resources and rollback).
   ·   Several cars may have to be backed up if a deadlock occurs.
   ·   Starvation is possible
·                              


System Model:

A system consists of a finite number of resources to be distributed among a number of competing processes. The resources are partitioned into several types each of which consists of a number of identical instances. A process may utilized a resources in the following sequence
· Request: In this state one can request a resource.
· Use: In this state the process operates on the resource.
· Release: In this state the process releases the resources.

Deadlock Characteristics: 
                  In a deadlock process never finish executing and system resources are tied up. A deadlock situation can arise if the following four conditions hold simultaneously in a system.
·  Mutual Exclusion: At a time only one process can use the resources. If another process requests that resource, requesting process must wait until the resource has been released.
· Hold and wait: A process must be holding at least one resource and waiting to additional resource that is currently held by other processes.
·  No Preemption: Resources allocated to a process can’t be forcibly taken out from it unless it releases that resource after completing the task.
·  Circular Wait: A set {P0, P1, …….Pn} of waiting state/ process must exists such that P0 is waiting for a resource that is held by P1, P1 is waiting for the resource that is held by P2 ….. P(n 1) is waiting for the resource that is held by Pn and Pn is waiting for the resources that is held by P4.


Previous                                                    Next⏩

  1. What is an Operating System ?
  2. Discuss the structure off OS ?
  3. Explain type of OS?
  4. Explain Function of OS?
  5. Explain OS Services ?
  6. What do mean by system call ?List different type ofsystem call available ?

  1. what is process ? and Characteristics ?
  2. What is different process state? explain the same in details?
  3. write short note on user level and kernal level threads?
  4. explain what is thread and its type ?
  5. explain scheduler ? (short term,medium term,and long term)
  6. state and explain scheduling criteria ?
  7. Explain scheduling algorithm ? [ FCFS,SJF,PRIORITY,ROUND ROBINE.]    

  1. What is process synchronization ? explain critical section problem and race condition ?
  2. what is Race Condition ?
  3. what is critical section problem?
  4. explain classical problem of synchronization?
  5. explain bounded - buffer problem?
  6. explain reader - writer problem ?
  7. explain Dining Philosophers Problem ?
  8. explain semaphores ? its type ?

  1.  What is deadlock ?
  2. What are the 4 condition to produce deadlock ?
  3. explain methods of handling deadlock ?
  4. explain in detail deadlock prevention ?
  5. write short note on deadlock avoidance ?
  6. explain deadlock detection ? 
  7. explain Banker algorithm with example ? 

Post a Comment

0 Comments