Deadlock and Starvation

Submitted by: Submitted by

Views: 60

Words: 1604

Pages: 7

Category: Science and Technology

Date Submitted: 03/07/2015 10:37 AM

Report This Essay

Klaven Jones

Professor Ahmed Elmatbagi

CST 1215

21 November 2014

Deadlock and Starvation

Operating systems help manage computer hardware and software resources. There are specific managers within the operating system that will work together to manage devices, files, memory, and processes. Some managers will work together to allocate memory, jobs and programs to available resources. Sometimes processes will compete for a finite amount of resources and the system will not be able to service all of them. If these processes are not synchronized, it can result in two extreme phenomena: deadlock or starvation. In this essay, I will be discussing about each condition in detail; the different cases of deadlock; and different strategies to handle deadlock.

A deadlock, also known as “deadly embrace” in early operating systems, is a phenomenon that occurs when two or more processes are put on hold, and each of them are waiting for vital resources to become available. This issue increases when the resources needed by certain jobs are being held by competing jobs also waiting for specific resources that are unavailable. Everything comes to a standstill at this point, including the system. In most cases, this situation can’t be resolved by the operating system and outside intervention by an operator or user is required.

A real-life analogy can help describe a deadlock. An odd law that was passed in Kansas, ages ago can accurately explain a deadlock: “When two trains approach each other at a crossing, both shall come to a full stop and neither shall start up again until the other has gone.” In this example, the trains represent the jobs, waiting for a specific resource. The tracks ahead of each train can be represented as the resource each job needs to execute. Neither train can move, thus creating a standstill, or a deadlock.

In the early batch systems, deadlocks weren’t as common. Because the programmers used job control cards that listed the specific system...