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

How to define a filename in dos, Q. How to define a Filename in DOS? Ea...

Q. How to define a Filename in DOS? Each file is given a name so that it can be referred to later. This name is termed as Filename. The filename in DOS can be up to eight alpha

What is mother board, What is mother board? Mother Board is a main syst...

What is mother board? Mother Board is a main system printed circuit board which having the processor. It will occupy an unacceptably large amount of space on the board.

Explain about interlacing, Q. Explain about Interlacing? Interlacing is...

Q. Explain about Interlacing? Interlacing is a procedure in which in place of scanning the image one-line-at-a-time it's scanned alternatelyit implies thatalternate lines are s

Explain register indirect addressing, Q. Explain Register Indirect Addressi...

Q. Explain Register Indirect Addressing? In this addressing technique the operand is data in memory pointed to by a register. Or we can say in other words that the operand fie

Explain what is dtmf signalling, Explain what is DTMF signalling. Dual ...

Explain what is DTMF signalling. Dual Tone Multi Frequency (DTMF) was initially introduced in 1963 with 10 buttons into Western Electric 1500 -type telephones. Dual Tone Multi

Explain point-to-point message passing, Q. Explain Point-to-point Message P...

Q. Explain Point-to-point Message Passing? In point to point message passing, one process transmits/receives message from/to another process. There are four communication modes

Process of world wide web, Q. Process of World Wide Web? When you type ...

Q. Process of World Wide Web? When you type a URL in a web browser, this is what happens: 1. If URL contains a domain name, browser first connects to a domain name server an

What data structure is used by an operating system, What data structure is ...

What data structure is used by an operating system to keep track of process information? Explain A data structure termed as process control block (PCB ) is used by an operat

Explain essential loop in process scheduling, Explain essential loop in Pro...

Explain essential loop in Process Scheduling . The complex part of scheduling is to balance policy enforcement along with resource optimization so as to pick the best job to run

Difference between perl and mod_perl, Perl is a language and MOD_PERL is a ...

Perl is a language and MOD_PERL is a module of Apache used to increase the performance of the application.

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