State in a deadlock-avoidance system, Operating System

Assignment Help:

Question:

In a deadlock, processes never finish executing and system resources are tied up, preventing other jobs from starting. Deadlocks can be characterised by a set of conditions.

a) Describe the four necessary conditions that must hold simultaneously in a system for a deadlock situation to arise.

b) One way of handling deadlock situations is by using a deadlock-avoidance algorithm: Consider that a system always require additional information about how resources are being requested for every process before making a decision on whether to grant the request or not to grant the request. One possible reason for not granting the request is because it will put the system in an unsafe state.

What is the difference between a safe state and an unsafe state in a deadlock-avoidance system?

c) Consider a system with 12 magnetic tape drives and 3 processes: P0, P1, P2. Process P0 requires 10 tape drives, process P1 may need as many as 4, and process P2 may need up to 9 tape drives. Suppose that at time t0, each process is holding 5, 2 and 2 tape drives respectively. This can be illustrated in the table below:

1246_Difference between a safe state and an unsafe state.png

i. Is the system in a safe state at time t0? Clearly explain your answer.

ii. Suppose that at time t1, process P2 requests and is allocated 1 more tape drive. Now, will this allocation put the system in a safe or unsafe state? Clearly explain your answer.


Related Discussions:- State in a deadlock-avoidance system

Relationship among a(x, Q. The RC 4000 system as well as other systems hav...

Q. The RC 4000 system as well as other systems have defined a tree of processes (called a process tree) such that all the descendants of a process are given resources (objects) as

What do you mean by semaphore?, What do you mean by semaphore?  Semap...

What do you mean by semaphore?  Semaphore : A synchronization variable that acquires on positive integer values. Invented by the Dijkstra P (semaphore): an atomic proce

List the various file attributes, List the various file attributes. A f...

List the various file attributes. A file has particular other attributes, which vary from one operating system to another, but typically having of these:  Name, identifier, typ

What is the information associated with an open file, What is the informati...

What is the information associated with an open file? Various pieces of information are associated with  an open file which may be: File pointer Disk location of th

What is the use of FIFOs in client-server applications, What is the use of ...

What is the use of FIFOs in client-server applications

Fundamental of operating system, An operating system provides the environme...

An operating system provides the environment within that programs are executed. Internally operating systems differ greatly in their makeup because they are organized along many di

Explain three major components of page-fault service time, We are faced wit...

We are faced with three major components of the page-fault service time. 1. Service the page-fault interrupts. 2. Read in the page. 3. Restart the processes.

Illustrate advantages and inconveniences of klt, ADVANTAGES AND INCONVENIEN...

ADVANTAGES AND INCONVENIENCES OF KLT Advantages: the kernel be able to simultaneously schedule many threads of the same process on many processors blocking

Explain the steps in deadlock recovery, Explain the steps in deadlock recov...

Explain the steps in deadlock recovery. a)      Exterminate off all processes involved - drastic. b)      Exterminate off one at a time till deadlock gone - select a victim.

Split the hexadecimal format, The following is a dump of a TCP header in h...

The following is a dump of a TCP header in hexadecimal format: 00CD0018 00000EF1 00000D5D 502200D1 01BF0010 We need to first split the above hex as such 00 CD 00 18 00 00

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd