Deadlock management

Deadlock direction

When a procedure petition for a peculiar resource and if that resource is already occupied, so that procedure has to wait until that resource is available to utilize it. Sometimes a procedure which is waiting for a resource might non be able to acquire that resource because there might be another procedure which is utilizing that resource and is waiting to utilize another resource, in order to put to death its operation. This is by and large known as dead end.

( Silberschatz & A ; Galvin, 1997, P? ? )

We will write a custom essay sample on
Deadlock management
or any similar topic only for you
Order now

Example of a dead end state of affairs

If A petitions for S while keeping R, and B petitions for R while keeping S, so a dead end state of affairs occurs.

Conditionss for a dead end to happen

There are 4 conditions which have to happen at the same time in order for dead end to happen in any operating system. These 4 conditions are

Common exclusion 2. Keep and wait

3. No pre-emption 4. Round delay

( Sinha, 2001, P? ? )

Techniques of managing a dead end state of affairs in an Os are:

Deadlock bar 2. Deadlock turning away

3. Deadlock Detection and Recovery

4. Ignore all dead ends which occur in the system until the system stops operating, so switch of the system manually.

( Silberschatz & A ; Galvin, 1997, P? ? )

Deadlock state of affairss which occur in Solaris 10 and how it ‘s resolved utilizing Solaris OS Crash Analysis Tool ( CAT ) :

Use of CAT:

* CAT macros for obtaining information from system clang mopess like construction members, togss, locks and their proprietors.

* To analyse the cause of system clangs.

( Sarin, 2003 )

Mutex Deadlock – This is state of affairs between 3 Solaris togss.

Detection

These 3 togss are in mutex dead end status

The yarn 0x300157805e0, which owns the mutex 0x10425218 ( vph_mutex ) , is waiting for the mutex 0x10423e08 ( ph_mutex )

The yarn 0x300161abcc0, which owns the mutex 0x10428288 ( cpc_mutex ) , is waiting for the mutex 0x10425218 ( vph_mutex )

The yarn 0x30015c07140, which owns the mutex 0x10423e08 ( ph_mutex ) , is waiting for the mutex 0x10428288 ( cpc_mutex )

( Sarin, 2003 )

Recovery

First acquire the sum-up of the togss in the system and the panic yarn. Then acquire a list of togss waiting for the mutex, so acquire the mutex construction and proprietor togss. Check the information from the old measure to understand and work out the dead end status.

( Sarin, 2003 )

Deadlock on a Single Reader/Writer Lock – A state of affairs where 2 togss are deadlocked on a read/write lock ( rwlock ) .

Detection

SolarisCAT ( vmcore.1 ) & gt ; thread 0x2a1008c5d40

( TS_SLEEP – expecting an event, idle: 2219454 ticks ( 6 hours 9 proceedingss 54.54 seconds ) )

SolarisCAT ( vmcore.1 ) & gt ; tlist province slumber

Thread pri idle pid wchan bid

0x300013618e0 98 6h10m37.50s 2 0x30001d2d140 pageout

0x2a100bcbd40 60 6h12m23.96s 0 0x30007a23098 sched

0x30001361620 60 6h10m35.58s 3 0x30001d2d140 fsflush

0x2a100237d40 60 6h6m11.43s 0 0x14603f0 sched

( Sarin, 2003 )

Pageout procedure has to do memory pages for other procedures to run. Since thread 0x2a1008c5d40 is idle, pageout can non put to death because the lock it ‘s seeking to obtain is besides being used by thread 0x2a1008c5d40.

( Sarin, 2003 )

Recovery

First obtain the list of togss kiping, and the system memory information. Then acquire the pageout inside informations and the thread stack of the pageout. Then happen the memory instructions and the frames in the stack of pageout to happen the statements. Get the vnode and manner constructions, and eventually acquire the proprietor of the rwlock

( Sarin, 2003 )

×

Hi there, would you like to get such a paper? How about receiving a customized one? Check it out