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

Define system call, Define System Call A system call is a request that ...

Define System Call A system call is a request that is made by any program to the operating system for carrying out tasks - picked from a predefined set - which the said program

Define projected allocation state is safe - banker algorithm, A system cons...

A system consists of 10 units of resource class Ru. The resource needs of three user processes P1, P2 and P3 are like this                     Using Banker's algorithm, de

Difference between message passing and shared memory, Problem: a) To en...

Problem: a) To ensure proper operation, the operating system and all the other programs must be protected from any malfunctioning program. Describe a mechanism which is impleme

What are the steps followed in testing, What are the steps followed in test...

What are the steps followed in testing? i. Unit testing - The individual components are tested in this type of testing. ii. Module testing - Related collection of independen

Explain segmentation and paging, Why are segmentation and paging sometimes ...

Why are segmentation and paging sometimes combined into one scheme? Segmentation and paging are often combined in order to improve upon each other. Segmented paging is helpful

Explain many-to-one model (green threads), Many-to-One Model (Green Threads...

Many-to-One Model (Green Threads) Implementations of the many-to-one model a lot of user threads to one kernel thread permit the application to create any number of threads tha

How does an operating system make multiprogramming possible, How does an op...

How does an operating system make multiprogramming possible by using single processor?

Key piece of information stored in single page table entry, Define which is...

Define which is not a key piece of information, stored in single page table entry, supposing pure paging and virtual memory  A reference for the disk block which stores the pa

Batch system, what is a batch system give me answer in simple words so that...

what is a batch system give me answer in simple words so that i can understand

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