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 techniques used for protection of user files, Explain the techn...

Explain the techniques used for protection of user files. This is easier to protect against accidental than malicious misuse. Protection of user files implies that file owne

Multiple assign statements targeting the same wire, What logic is inferred ...

What logic is inferred when there are multiple assign statements targeting the same wire? It's illegal to specify multiple assign statements to the same wire in a synthesizable

Form an 8 bit adder using 2 four bit adder IC's 7483, How will you form an ...

How will you form an 8 bit adder using 2 four bit adder IC's 7483? Ans: 4 bit adder IC is IC 7483. This has two four bit data inputs and output carry, 4 bit data output carr

What is synchronous transmission, What is synchronous transmission? In ...

What is synchronous transmission? In synchronous transmission the two units share a common frequency and bits are transmitted continuously at the rate dictated  by clock pulses

Explain the necessary conditions for deadlock to occur, Explain the necessa...

Explain the necessary conditions for deadlock to occur. Conditions for deadlock to arise are: i. Mutual exclusion: At least one resource must be held in a non-sharable mo

Define cpu scheduling, Define CPU scheduling. CPU scheduling is the met...

Define CPU scheduling. CPU scheduling is the method of switching the CPU among various processes. CPU scheduling is the basis of multiprogrammed operating systems. By switching

Op code mnemonics in assembly language, Op code mnemonics: Instruction...

Op code mnemonics: Instructions  (statements)  in  assembly  language  are  usually  very  simple,  unlike  those that in  high-level languages. Usually, an opcode is a symbol

The statement vline is used to insert vertical lines, Like ULINE the statem...

Like ULINE the statement VLINE is used to insert vertical lines. No , Vline is not used to insert vertical lines.

Avoiding over fitting in decision trees, A v o iding Over fitting - Arti...

A v o iding Over fitting - Artificial intelligence As  we  discussed  in  the last  lecture,  over fitting  is  a  normal  problem  in machine learning. Decision trees suffe

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