Determine the current allocation state and granted process, Computer Engineering

Assignment Help:

An operating system contains 3 resource classes. The number of resource units in these classes is 7, 7 and 10. The current resource allocation state is shown below:

 

Processes

Allocated resources

Maximum requirements

R1

R2

R3

R1

R2

R3

P1

2

2

3

3

6

8

P2

2

0

3

4

3

3

P3

1

2

4

3

4

4

(i) Is the current allocation state safe?

(ii) Can the request made by process P1 (1, 1, 0) be granted?

(i) In the specified question,

Available  matrix  for  resources  [R1  R2  R3]  =  No  of  resource  unit  - Total Allocation

= [7 7 10]-[5 4 10] = [2 3 0]

Need matrix is identified as (Max - Allocation),

Processes

Need of resources

R1

R2

R3

P1

1

4

5

P2

2

3

0

P3

2

2

0

By using Safety Algorithm, we find sequence:

Processes

Available resources

after satisfying need

R1

R2

R3

2

3

0

P2

4

3

3

P3

5

5

7

P1

7

7

10

The sequence < P2, P3, and P1 > satisfies the safety criteria. Therefore current allocation state is safe.

(ii) Request made through process P1, Request (P1) = [1 1 0] Here, Request (P1) < Need (P1) < Available

That is [1 1 0]< [1 4 5] < [2 3 0]

Pretending such request can be fulfilled, we find new state:

Processes

Allocation

Need

Available

R1

R2

R3

R1

R2

R3

R1

R2

R3

P1

3

3

3

0

3

5

1

2

0

P2

2

0

3

2

3

0

P3

1

2

4

2

2

0

Because Need > Available for all process, no need can be fulfilled therefore allocation is not thread safe that is request made through Process P1 can't be granted.


Related Discussions:- Determine the current allocation state and granted process

Explain the use of structures with pointers., Explain the use of structures...

Explain the use of structures with pointers C permits a pointer to a structure variable. In fact a pointer to a structure is same to a pointer to any other variable. The pointe

Concept development of project, Concept Development Journal General In...

Concept Development Journal General Information: Once you have researched and gained some insight into the topic you must then begin developing your ideas and your conceptua

Operations from events, Operations from events During analysis, events...

Operations from events During analysis, events which are sent to target objects. An operation on these object are presented as labels on transitions and should not be explicit

Give the meaning of spc, SPC stands (A)   Standard Protocol Control ...

SPC stands (A)   Standard Protocol Control (B)   Stored Program Control (C)  Signaling and switching Centre (D)  Signaling Process Center Ans: SPC repres

Diffrence between cd-r vs cd rw, Q. Diffrence between CD-R vs CD RW? A ...

Q. Diffrence between CD-R vs CD RW? A CD-R disc looks same as a CD. Though all pressed CDs are silver, CD-R discs are gold or silver on their label side and a deep cyan or gree

Differentiate b/w program translation and interpretation, Differentiate bet...

Differentiate between program translation and program interpretation. The program translation model makes the execution gap through translating a program written in a program

Explain tree, Tree (recursive definition) A tree is a finite set of one...

Tree (recursive definition) A tree is a finite set of one or more than one nodes such that. (1) There is a specially designated node known as the root. (2) The left over

what is a persistent cookie in php, A persistent cookie is a cookie which ...

A persistent cookie is a cookie which is keeps in a cookie file permanently on the browser's computer. By default, cookies are formed as temporary cookies which keep only in the br

Discuss the advantages of electronics data exchange, Discuss the advantages...

Discuss the advantages of Electronics Data Exchange (EDI). Advantages of EDI: Electronics Data Exchange's saves needless re-capture of data. It leads to faster transfer of d

A graph ''g'' with ''n'' nodes is bipartite, A graph 'G' with 'n' nodes is ...

A graph 'G' with 'n' nodes is bipartite if it have  no cycle of odd length.

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