Sunday , 24 November 2024

CS604 Assignment no 5 Fall 2012

Instructions

Please read the following instructions carefully before submitting assignment:

It should be clear that your assignment will not get any credit if:

o    The assignment is submitted after due date.

o    The submitted assignment does not open or file corrupt.

o    The assignment is copied.


Total Marks: 20

Due Date:

January 17, 2013

Marks: 20

 

Question 1: [Marks 10]

 Let us suppose that there are five processes P1, P2, P3, P4 and P5 and three resources Printer, scanner and photocopier. Let us suppose that there are 25 instances of resource type Printer, 18 instances of resource type scanner and 21 instances of resource type photocopier.   Let us consider that at time T= 0, system has the following state.

                                                       Max


                                                                                               Printer                    scanner                   photocopier

P1                                                                                                  10                            8                            6

P2                                                                                                   6                             5                            5

P3                                                                                                  12                            3                            5

P4                                                                                                   5                             5                            5

P5                                                                                                   7                             6                            6

 

                                                                                                                               Allocation

                                                                                               Printer                    scanner                   photocopier

P1                                                                                                   3                             4                            3

P2                                                                                                   5                             3                            3

P3                                                                                                   6                             3                            5

P4                                                                                                   5                             4                            4

P5                                                                                                   3                             3                            5

 

 

                                                                                                                                Available

                                                                                               Printer                    scanner                   photocopier

P1                                                                                                   3                             1                            1

P2

P3

P4

P5

Use safety algorithm (which is invoked by banker’s algorithm) and write down all the intermediate steps to find out that either the system is in safe state or not. If system is in safe state then write down the safe sequence and if system is not in safe state then give reason to support your answer.

Note: Write down all the intermediate steps during finding out the safe sequence. If you will not write down the intermediate steps and if you will just write only the safe sequence then you will get zero marks.

 

 

Question 2: [Marks 10]

Let us suppose that there are five processes P1, P2, P3, P4 and P5 and three resources Printer, scanner and photocopier. Let us suppose that there are 24 instances of resource type Printer, 18 instances of resource type scanner and 21 instances of resource type photocopier.   Let us consider that at time T= 0, system has the following state.

 

                                                                                                                                      Max

                                                                                                 Printer                    scanner                   photocopier

P1                                                                                                  10                            8                            6

P2                                                                                                   6                             5                            5

P3                                                                                                  12                            3                            5

P4                                                                                                   5                             5                            5

P5                                                                                                   7                             6                            6

 


                                                                                                                               Allocation

                                                                                               Printer                    scanner                   photocopier

P1                                                                                                   3                             4                            3

P2                                                                                                   5                             3                            3

P3                                                                                                   6                             3                            5

P4                                                                                                   5                             4                            4

P5                                                                                                   3                             3                            5

 

                                                                                                                                Available

                                                                                                Printer                    scanner                   photocopier

P1                                                                                                   2                             1                            1

P2

P3

P4 

P5

Use safety algorithm (which is invoked by banker’s algorithm) and write down all the intermediate steps to find out that either the system is in safe state or not. If system is in safe state then write down the safe sequence and if system is not in safe state then give reason to support your answer.

Note: Write down all the intermediate steps during finding out the safe sequence. If you will not write down the intermediate steps and if you will just write only the safe sequence then you will get zero marks.

Uploading Instructions: 

Upload your assignment as a word file. 

Deadline

Your assignment must be uploaded/submitted at or before January 17, 2013

 

Check Also

CS604 Assignment no 02 Spring 2013

  Assignment No. 02 Total Marks:20 Due Date: Spring 2013 Tuesday 14th May CS604- Operating …

Leave a Reply

Your email address will not be published. Required fields are marked *

*