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

Determine the number of lines for writing into memory, Words having 8-bits ...

Words having 8-bits are to be stored into computer memory.  The number of lines required for writing into memory are ? Ans. 8-bit words needed 8 bit data lines.

Computer aided manufacture, Before we take a detailed look about software l...

Before we take a detailed look about software languages, let us consider the role of computers in engineering. Computers are commonly used in the areas of 'Computer Aided Design /

Calculating block size - computer architecture, Calculating Block Size: ...

Calculating Block Size: B A unit of associatively -one tag for B A words B T unit of transfer-B T words to/from primary memory as a unit             One valid bit for

Effect of tree supply on death rate, The effect of tree supply on death ra...

The effect of tree supply on death rate depends upon a ratio comparing the number of trees that are actually available per person per year to the desired number of trees per pers

Depth-first search is different from breadth-first search, Depth-first sear...

Depth-first search is different from Breadth-first search in the following ways: A depth search traversal method goes to the deepest level of the tree first and then works up w

Capacity and access speed of hard disk, Capacity and access speed: PC ...

Capacity and access speed: PC hard disk drive capacity (measured in GB). The vertical axis is logarithmic, so the accurate line corresponds to exponential growth.  By using

What are the types of electronic payment system, What are the types of elec...

What are the types of electronic payment system? Types of the electronic payment system are as given below: The most Internet payment way for Business to Customer is credit

Slower layer to a faster layer, Given a four level hierarchical storage sys...

Given a four level hierarchical storage system consisting of: cache,  primary storage, secondary storage, and tertiary storage. Suppose the following:  programs may be executed on

Printers, Printers are devices which put ink on paper in a controlled manne...

Printers are devices which put ink on paper in a controlled manner. They manually produce photographic images orreadable text. Printers have gone through a large transition in tech

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