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

Modus ponens rule, Modus ponens rule: In fact the general format for t...

Modus ponens rule: In fact the general format for the modus ponens rule is as follows: like if we have a true sentence that states the proposition A implies proposition B and

Explain shared memory system and tightly coupled system, Shared Memory Syst...

Shared Memory System / Tightly Coupled System Shared memory multiprocessors have the subsequent features: For real-time high-speed processing these systems are preferabl

Why a function cannot call a task, Why a function can n ot call a task ...

Why a function can n ot call a task As functions doesn't consume time,it can do any operation which doesn't consume time. Mostly tasks are written that consumes time. So a ta

Displays a message when an applet starts up, Write an applet that sets the ...

Write an applet that sets the background colour to cyan and foreground colour to red and displays a message that illustrates the order in which various applet methods are called wh

How enterprises are using bpr in their e-business processes, One of the mos...

One of the most important competitive strategies for E-Businesses today is business process reengineering. BPR is more than automating business processes to make modest improvement

What is magento, Magento is a feature-rich eCommerce platform built on open...

Magento is a feature-rich eCommerce platform built on open-source technology that gives online merchants with unprecedented flexibility and control over the look, content and funct

What is a virtual address, Q. What is a virtual address? Von Neumann ha...

Q. What is a virtual address? Von Neumann had suggested that execution of a program is possible only if program and data are residing in memory. In such a condition program len

When can a user program execution be interrupted, When can a user program e...

When can a user program execution be interrupted? It won't be desirable to interrupt a program when an instruction is being executed and is in a state such as instruction decod

What is guard bits, What is guard bits? Guard bits are extra bits which...

What is guard bits? Guard bits are extra bits which are produced while the intermediate steps to yield maximum accuracy in the final results.

How can i handle floating-point exceptions gracefully, 'On many systems, yo...

'On many systems, you can describe a function matherr which will be known as when there are certain floating-point errors, like errors in the math routines in .

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