Care must be taken that the strategy applied cannot

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ibuted operating systems deal with multiple computers interconnected together by a communication network. In case of a network operating system the user views the system as a collection of distinct computers, but in case of a distributed operating system the user views the system as a "virtual uniprocessor". Deadlock There are several resources in a system for which the resource allocation policy must ensure exclusive access by a process. For example, a printer needs to be exclusively allocated to a process till the process finishes using it because its simultaneous use by two or more processes will lead to garbled printed output. Since a system consists of a finite number of units of each resource type (for example, three printers, six tape drives, four disk drives, two CPUs, etc.), multiple concurrent processes normally have to compete to use a resource. In this situation, the sequence of events required to use a resource by a process is as follows: 1. Request. The process first makes a request for the resource. If the requested resource is not available, possibly because it is being used by another process, the requesting process must wait until the requested resource is allocated to it by the system. 2. Allocate. The system allocates the resource to the requesting process as soon as possible. It maintains a table in which it records whether each resource is free or allocated and, if it is allocated, to which process. If the requested resource is currently allocated to another process, the requesting process is "added to a queue of processes waiting for this resource. Once the system allocates the resource to the requesting process, that process can exclusively use the resource by operating on it. 3. Release. After the process has finished using the allocated resource, it releases the resource to the system. The system table records are updated at the time of allocation and release to reflect the current status of availability of resources. The request and release of resources are system calls, such as request and release for devices, open and close for files, and allocate and free for memory space. Notice that of t...
View Full Document

Ask a homework question - tutors are online