We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>


Looking For Something at vustudents.ning.com? Click Here to Search

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

 

 


+ Click Here To Join also Our facebook study Group.


..How to Join Subject Study Groups & Get Helping Material?..


See Your Saved Posts Timeline

Views: 9631

.

+ http://bit.ly/vucodes (Vu Study Groups By Subject Codes Wise)

Attachments:

Replies to This Discussion

g y ghlt h mere khyal s. 38 s 39 min tak means aik min ka lec no 29 sun len. order important nhi h processes ka. star hm n process 1 s hi lena h. but jo jo process nhi complete ho skte unhen sath sath check krte jaen.or tarteb s p1 to p5 kam kren to sare complete hote hen and there is no deadloak.  

P2 sequence m pehly ay ga na q k iski request small hy available hy?

start m process 1 ni ly skty ku k wo small ni hy work sy usko jo R2 chaheay wo work k pas ni hy so kindly make it correct

Check the link below for Complete Solution

https://youtu.be/mHIumV8jGSc

Please share complete solution file. No idea or Youtube link needed.
ONLY DOC SOLUTION FILE.

CS604-Assignment-Solution.docx

check khud kar lyen sab mera subject nahi ha

P1 kesy pehly ay ga jb uski request small nai hy work sy

dildar bhai..? jo apne b part btaya wo thek solution hy??

or kia part a m srf graph bnyega??

sis iss main thori si mistake hay or deadlock nahi hay confirm P4 p correct kr lo. part a main graph banao or btato k yi cyclic hay or deadlock hay part a main

       check this one                  

 

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

4

2

2

4

P5

2

1

1

0

1

0

0

1

5

3

2

4

 

                          Sequence <p2, P3, p5, p4, p0>

yi correct hay

p0 nhi hy p1 hy ye mistake hy is m dyhan sy kijeay ga

RSS

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

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