Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Consider the following system snapshot using data structures in the Banker's algorithm, with resources A, B, C, and D, and process P0 to P4:

                          Max                             Allocation                        Need                             Available

 

P0

A

6

B

0

C

1

D

2

A

4

B

0

C

0

D

1

A    B   C   D

A

B

C   D

P1

1

7

5

0

1

1

0

0

 

 

 

 

P2

2

3

5

6

1

2

5

4

 

 

 

 

P3

1

6

5

3

0

6

3

3

 

 

 

 

P4

1

6

5

6

0

2

1

2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3

2

1    1

Using Banker's algorithm, answer the following questions.

(a)   How many resources of type A, B, C, and D are there?

(b)   What are the contents of the Need matrix?

(c)   Is the system in a safe state? Why

(d)  If a request from process P4 arrives for additional resources of (1,2,0,0,), can  the  Banker's  algorithm  grant  the  request  immediately? Show the new system state and other criteria.

(a) Resources of type A, B, C, and D are as: A-9; B-13;C-10;D-11

(b) Need[i, j]=Max[i,j]-Allocation[i,j] therefore content of Need matrix is

            A          B          C          D

P0        2          0          1          1

P1        0          6          5          0

P2        1          1          0          2

P3        1          0          2          0

P4        1          4          4          4

(c)  The  system  is  in  a  safe  state  like  the  processes  can  be  complete  in  the sequence P0, P2, P4, P1 and P3.

(d) If a request from process P4 attains for additional resources of (1,2,0,0,), and if such request is granted so the new system state would be in tabulated form asfollows.

                  Max                    Allocation              Need                         Available

             A   B   C    D        A   B   C   D              A   B    C    D               A   B   C   D

P0        6    0    1    2         4    0    0    1          2    0    1    1

P1        1    7    5    0         1    1    0    0          0    6    5    0

P2        2    3    5    6         1    2    5    4          1    1    0    2

P3        1    6    5    3         0    6    3    3          1    0    2    0

P4        1    6    5    6         1    4    1    2          0    2    4    4

2    0    1    1

After PO finishes P3 can be assigned. 1020 from released 6012 and also available 2011(Total 80 23) and is a safe sequence.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9544043

Have any Question?


Related Questions in Computer Engineering

Research ways that information systems have been misused

Research ways that Information Systems have been misused. Using the Internet, find an example of an organization that has misused Information Systems. Post your response to the discussion board. Respond to the following ...

Question suppose that 80 community delegates discussed the

Question : Suppose that 80 community delegates discussed the transportation problems on Oahu. 30 of them favor expanding the bus system, 34 favor introduction of rail, and 44 favor building more highways. 15 favor a comb ...

The marginal revenue and marginal cost functions for a

The marginal revenue and marginal cost functions for a monopolist firm that mines diamonds are given by:

Question what will be the source and destination ip

Question : What will be the source and destination IP addresses the response packet after the router forwards it to the private network? The response must be typed, single spaced, must be in times new roman font (size 12 ...

What is the relationship between an interface and a

What is the relationship between an interface and a type? What is the relationship between a class and a type? What is the relationship between a subclass and a type?

Quesiton an important principle in information security is

Quesiton: An important principle in information security is the concept of layers of security, which is often referred to as layered security, or defense in depth. 1) Please explain the concept of layers of security. 2) ...

What is the broadcast domain and ports for hubs and

What is the Broadcast Domain and Ports for hubs and bridges?

Question identify and discuss pros and cons of the

Question: Identify and discuss pros and cons of the webrezpro service compared to a traditional PMS. Please follow the Discussion Rubric to receive credit for posts. The response must be typed, single spaced, must be in ...

Question suppose we iterate the application of a blurring

Question : Suppose we iterate the application of a blurring filter with kernel size 5 on an image of 800 times 600 pixels. How many times should we apply the filter for the color of the pixel at position (20, 20) to be i ...

What is the name of the text file on a windows computer

What is the name of the text file on a Windows computer that may store DNS to IP address mappings?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As