Determine resources, need matrix using banker's algorithm, Computer Engineering

Assignment Help:

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.


Related Discussions:- Determine resources, need matrix using banker's algorithm

Which techniques are utilized to gain on the number pairs, Which techniques...

Which techniques are utilized to gain on the number pairs and also explain how it helps in connecting number of subscribers. In rural areas, subscribers are usually dispersed.

Planning too much up front a mistake in an oosad, You can't plan only for t...

You can't plan only for the present phase of the project as your future activities are still coarse granular. To have good planning you require to have fine granularity w.r.t the t

Describe types of complements, Q. Describe types of complements? There ...

Q. Describe types of complements? There are two kinds of complements for a number of base (also known as radix) r. These are known as r's complement and (r- 1)'s complement. Fo

Explain about microcomputers, Q. Explain about Microcomputers? Microco...

Q. Explain about Microcomputers? Microcomputers: A microcomputer's CPU is a microprocessor. They are characteristically used as single usercomputer though present day microco

Conversion of decimal number 25.5 into binary number, Conversion of decimal...

Conversion of decimal number 25.5 into binary number Ans. There is integer part is 25 and fractional part is 0.5.  Firstly convert the integer part 25 in its equal to binary numb

Determine by which final selector is connected, The final selector is conne...

The final selector is connected to the (A) calling subscriber.                     (B) switching network. (C) called subscriber.                      (D) li

Explain debug monitors, Explain Debug monitors. Debug monitors give d...

Explain Debug monitors. Debug monitors give debugging support for a program. A debug monitor executes the program being debugged in its own control thereby giving execution e

What do you mean by prototype, Q. What do you mean by Prototype? A prot...

Q. What do you mean by Prototype? A prototyping approach lay emphasis on the construction model of a system. Designing and building a scaled-down though functional version of a

Define the register addressing mode, Q. Define the Register Addressing mode...

Q. Define the Register Addressing mode? When operands are taken from registers implicitly or explicitly it is known as register addressing. These operands are termed as regis

Thematic analysis - flash design, Thematic Analysis & Interpretation: ...

Thematic Analysis & Interpretation: The next steps in analysis are to move beyond what is literally there in the image (formal visual elements) and examine the meaning they re

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