We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

Assignment No. 03

Semester: Spring 2018

Operating Systems (CS604)

 

Total Marks: 20

 

Due Date:  23/7/2018

 

Instructions:                          

Please read the following instructions carefully before submitting assignment:

§  You should submit your assignment before or on due date on VULMS.

§  Your assignment should be your own work in your own words. It should not be copied from Internet, handouts or books.

§  Your Assignment must be in Microsoft Word document. Assignment in other than Microsoft Word document will not be accepted.

§  Assignment sent via Email will not be replied and accepted.

§  If the submitted assignment does not open or file is corrupt, it will not be marked and hence awarded zero marks.

Objectives:

·         To understand the working of Deadlock detection algorithm.

 

 

For any query about the assignment, contact at CS604@vu.edu.pk

 

Question                                                                                                                                    Marks 20    

 

a. Consider a system with five processes: P1, P2, P3, P4, P5 and five resource types: R1, R2, R3, R4, R5 with single instance. From the given below information, you are required to determine whether the deadlock exists in the system though deadlock detection strategy for resources with single instance.

 

P = {P1, P2, P3, P4, P5}

R = {R1, R2, R3, R4, R5}

E = {P1®R1, R1®P2, P2®R2, R2®P3, P3®R3, R3®P4, P4®R4, R4®P5, P5®R5, R5®P1}

 

b. Consider a system with five processes: P1, P2, P3, P4, P5 and four resource types: R1, R2, R3 and R4 with multiple instances. From the given below information, you are required to determine whether the deadlock occurs in a system though deadlock detection strategy for resources with multiple instances.

 

P = {P1, P2, P3, P4, P5}

R = {R1, R2, R3, R4}

 

R1: 5 instances

R2: 3 instances

R3: 2 instances

R4: 4 instances

 

 

 

 

 

 

Consider the system in following state:

 

 

Processes

Allocation

Request

Work

R1

R2

R3

R4

R1

R2

R3

R4

R1

R2

R3

R4

P1

0

0

0

0

0

1

0

0

0

0

1

1

P2

0

1

0

1

0

0

1

1

 

 

 

 

P3

2

0

0

2

0

0

1

1

 

 

 

 

P4

1

1

0

0

2

1

2

0

 

 

 

 

P5

2

1

1

0

1

0

0

1

 

 

 

 

 

 

 

Note: There can be many sequences so you are required to start from top to bottom for “Processes” column. i.e. P1 to P5.

 

BEST OF LUCK

 

 


+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)


Views: 9765

Attachments:

Replies to This Discussion

Given scenario k saath jaha sy b start kro graph aik hi bany ga.

solution please

Dear Fellow Students 

You can use Attached file for creating the dead lock graph for part A of question using the MS visio

Attachments:

Consider the system:

 

 

Processes

Allocation

Request

Work

R1

R2

R3

R4

R1

R2

R3

R4

R1

R2

R3

R4

P1

0

0

0

0

0

1

0

0

0

0

1

1

P2

0

1

0

1

0

0

1

1

0

1

1

2

P3

2

0

0

2

0

0

1

1

P4

1

1

0

0

2

1

2

0

P5

2

1

1

0

1

0

0

1

 

 Here Finish Sequence: < P2>  and <P1> not finish because request is not completed.

 

 

Processes

Allocation

Request

Work

R1

R2

R3

R4

R1

R2

R3

R4

R1

R2

R3

R4

P1

0

0

0

0

0

1

0

0

0

0

1

1

P2

0

1

0

1

0

0

1

1

0

1

1

2

P3

2

0

0

2

0

0

1

1

2

1

1

4

P4

1

1

0

0

2

1

2

0

 

 

 

 

P5

2

1

1

0

1

0

0

1

 

 

 

 

 

Now Finish Sequence: <  P2, P3> and  <P1> not finish because request is not completed.

 

Processes

Allocation

Request

Work

R1

R2

R3

R4

R1

R2

R3

R4

R1

R2

R3

R4

P1

0

0

0

0

0

1

0

0

0

0

1

1

P2

0

1

0

1

0

0

1

1

0

1

1

2

P3

2

0

0

2

0

0

1

1

2

1

1

4

P4

1

1

0

0

2

1

2

0

3

2

1

4

P5

2

1

1

0

1

0

0

1

5

3

2

4

 

Finish Sequence: <  P2, P3, P5> and  <P1, P4> not finish because request is not completed.

Note: We can be other sequences to finish these process but we are required to start from top to bottom for “Processes” column. i.e. P1 to P5 only. So deadlock exist.

this is wrong on right?

Attachments:

mistakes in sample

Attachments:

helo ABDUL FAHID bhae wah g idr sol die ja re

how there exists deadlock?

ya assignment ai kin lecturez ma sy ha koi yhi bata do...

29 lec main s

ok thnks

exact solution please share krn

RSS

Latest Activity

+ ! ! JS ! ! + liked Hafiza Tehreem Fatima's discussion BIRTHDAY CELEBRATION OUR BELOVED <MEMBER SARAH ABDUL
51 minutes ago
Hafiza Tehreem Fatima posted a discussion
57 minutes ago
+M.Tariq Malik replied to Fragrance of Islam's discussion ENG301 Business Communication GDB No 01 Fall 2020 Solution / Discussion in the group ENG301 Business Communication
1 hour ago
+M.Tariq Malik replied to Fragrance of Islam's discussion ENG301 Business Communication GDB No 01 Fall 2020 Solution / Discussion in the group ENG301 Business Communication
1 hour ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion MTH633 Group Theory Assignment 01 Fall 2020 Solution / Discussion in the group MTH633 Group Theory
1 hour ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion SOC401 Cultural Anthropology Assignment 01 Fall 2020 Solution / Discussion in the group SOC401 Cultural Anthropology
1 hour ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion SOC401 Cultural Anthropology Assignment 01 Fall 2020 Solution / Discussion in the group SOC401 Cultural Anthropology
1 hour ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion SOC401 Cultural Anthropology Assignment 01 Fall 2020 Solution / Discussion in the group SOC401 Cultural Anthropology
1 hour ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion ECO406 Assignment 01 Fall 2020 Solution / Discussion Due Date: 04-12-2020 in the group ECO406 Mathematical Economics
1 hour ago
+M.Tariq Malik liked +M.Tariq Malik's discussion MCM520 Contemporary Mass Media Assignment 01 Fall 2020 Solution / Discussion
2 hours ago
+M.Tariq Malik added a discussion to the group MCM520 Contemporary Mass Media
2 hours ago
Profile IconMalik Ali Raza, Zohaib Anjum, Arooj Shahid and 12 more joined Virtual University of Pakistan
2 hours ago
+M.Tariq Malik replied to Fragrance of Islam's discussion ENG301 Business Communication GDB No 01 Fall 2020 Solution / Discussion in the group ENG301 Business Communication
2 hours ago
+M.Tariq Malik replied to Muhammad Azeem's discussion BNK603 Consumer Banking Assignment No 01 Solution & Discussion FALL 2020 in the group BNK603 Consumer Banking
2 hours ago
+M.Tariq Malik liked Muhammad Azeem's discussion BNK603 Consumer Banking Assignment No 01 Solution & Discussion FALL 2020
2 hours ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion CS302 Assignment 01 Fall 2020 Solution / Discussion in the group CS302 Digital Logic Design
2 hours ago

© 2020   Created by +M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service

.