circular wait - operating systems

6

Click here to load reader

Upload: omair-imtiaz

Post on 06-Jul-2015

50 views

Category:

Small Business & Entrepreneurship


0 download

DESCRIPTION

This lectures covers the entire core concepts of operating systems Circular wait topics.

TRANSCRIPT

Page 1: Circular wait - Operating Systems

Circular WaitInherited from Deadlock Conditions

Operating Systems by Muhammad Umair

Page 2: Circular wait - Operating Systems

Deadlock Visual ConceptIs it a state where two ore more operations are waiting for each other, say a computing action 'A' is waiting for action 'B' to complete, while

action 'B' can only execute when 'A' is completed.

Page 3: Circular wait - Operating Systems

Cont..

• A deadlock happens in this case if Thread1 and

Thread2 are running simultaneously, and Thread1

acquires lock A and Thread2 acquires lock B. Then,

they both need the lock that the other thread has to

proceed. No advancement.

One way to deal with a case like this would be to

make a function which would grab two locks for a

thread simultaneously, instead of one at a time.

Page 4: Circular wait - Operating Systems

Circular wait

It only happens when there is a processes which are waiting for other resources to finish.

Page 5: Circular wait - Operating Systems

1: Mutual Exclusion2 : Hold and Wait3 : No Primitive4 : Circular wait

4 Reasons of Deadlock

Circular wait - Each process is waiting to obtain a resource which is held by another process.

Page 6: Circular wait - Operating Systems

• Thank

You