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

Make your simulation run faster, Ameliorating the mechanical delays of seek...

Ameliorating the mechanical delays of seeks and rottion are usually regardeed as major aspects of device drivers for disks. The simplest way for a disk device driver to service dis

Reading decision trees, Reading Decision Trees: However we can justifi...

Reading Decision Trees: However we can justified by see that a link between decision tree representations and logical representations that can be exploited to make it easier t

Hard and soft real time systems, Q. Hard and Soft Real Time Systems? ...

Q. Hard and Soft Real Time Systems? Hard Real Time Systems that guarantee critical tasks are completed on time. Soft Real Time Systems that are less restrictive type o

What are the various hazards encountered in pipelining, What is pipelining?...

What is pipelining? What are the various hazards encountered in pipelining?  Explain in detail. The major characteristics of a pipeline are: a) Pipelining cannot be exe

Define virtualisation and explain computer architecture, Rentrag has decide...

Rentrag has decided to replace all of the computers currently being used by all of the business and office staff. He has asked you to recommend a set of specification for computers

What is direct addressing mode, Computer Organization and Architecture ...

Computer Organization and Architecture 1. Draw the block diagram of von Neumann Architecture and describe about its parts in brief. 2. Draw block diagram of Intel 8085 CPU o

How can we access the correction and transport system, How can we access th...

How can we access the correction and transport system? Each time you make a new object or change an existing object in the ABAP/4 Dictionary, you branch automatically to the W

State the advantages of CMOS, State the advantages of CMOS. Ans. Su...

State the advantages of CMOS. Ans. Subsequent are the advantages of CMOS: Both n-channel and p-channel devices are fabricated on similar substrate. Low power di

Show the liability of cpu in interrupt cycle, Q. Show the liability of CPU ...

Q. Show the liability of CPU in interrupt cycle? In the interrupt cycle the liability of CPU/Processor is to ensure whether any interrupts have happened checking presence of in

Define a register, Define a register. Ans:  Register:   A register...

Define a register. Ans:  Register:   A register contain a group of flip-flops and gates which effect their transition. The flip flops hold the binary information and the g

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