Google Search

Saturday, November 7, 2015

Deadlocks

It is possible for two or more programs to be hung up waiting for each other.

For example, two programs may each require two I/O devices to perform some operation.

One of the programs has seized control of one of the devices and the other program has control of the other device.

Each is waiting for the other program to release the desired resource.



What is needed to tackle these problems is a systematic way to monitor and control the various programs executing on the processor.
The concept of the process provides the foundation.

We can think of a process as consisting of three components:


An executable program

The associated data needed by the program (variables, work space, buffers, etc.)

The execution context of the program


This last element is essential.

The execution context, or process state, is the internal data by which the OS is able to supervise and control the process.

The context includes all of the information that the OS needs to manage the process and that the processor needs to execute the process properly.

The context includes the contents of the various processor registers, such as the program counter and data registers.

It also includes information of use to the OS, such as the priority of the process and whether the process is waiting for the completion of a particular I/O event.

No comments:

Post a Comment