01.12.2012 Views

Architecture of Computing Systems (Lecture Notes in Computer ...

Architecture of Computing Systems (Lecture Notes in Computer ...

Architecture of Computing Systems (Lecture Notes in Computer ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

On Deadlocks and Fairness <strong>in</strong> Self-organiz<strong>in</strong>g Resource-Flow <strong>Systems</strong> 89<br />

Starvation. Starvation occurs when an agent is cont<strong>in</strong>uously denied access to<br />

a resource. Bustard et al. illustrate the starvation problem us<strong>in</strong>g the d<strong>in</strong><strong>in</strong>g<br />

philosophers problem <strong>in</strong> the field <strong>of</strong> autonomic comput<strong>in</strong>g [8]. It can also be<br />

characterized as a special case <strong>of</strong> livelock [21].<br />

Fairness. Fairness <strong>in</strong> its most general def<strong>in</strong>ition guarantees that a process will<br />

eventually be given enough resources to allow it to term<strong>in</strong>ate [26]. This<br />

is usually achieved by implement<strong>in</strong>g a schedul<strong>in</strong>g mechanism. Especially <strong>in</strong><br />

distributed systems that share resources, the ability to term<strong>in</strong>ate may depend<br />

on other components or on <strong>in</strong>teract<strong>in</strong>g with them. Fairness is classified <strong>in</strong>to<br />

weak and strong fairness where weak fairness implies that a component will<br />

eventually proceed if it can almost always proceed and strong fairness implies<br />

that a component which can proceed <strong>in</strong>f<strong>in</strong>itely <strong>of</strong>ten does proceed <strong>in</strong>f<strong>in</strong>itely<br />

<strong>of</strong>ten [11].<br />

There are three different ways on how potential deadlocks can be dealt with.<br />

Their applicability depends on the structure <strong>of</strong> the systems under consideration<br />

and the assumptions that can be made about them.<br />

Deadlock Prevention prohibits circular waits among agents while the system<br />

is not runn<strong>in</strong>g. The strength <strong>of</strong> the approach is also its greatest weakness:<br />

a prevention mechanism requires global knowledge <strong>of</strong> the system and all its<br />

reachable states which <strong>of</strong>ten yields a straightforward <strong>of</strong>ten-simple control<br />

law but acquir<strong>in</strong>g this knowledge can be difficult and computationally <strong>in</strong>tractable.<br />

Additionally, limit<strong>in</strong>g concurrency to prevent any deadlock state<br />

from occurr<strong>in</strong>g can be overly conservative, potentially lead<strong>in</strong>g to low utilization<br />

<strong>of</strong> system resources.<br />

Deadlock Avoidance suitable governs the resource flow to prevent circular<br />

waits. This is a dynamic approach that can utilize the knowledge <strong>of</strong> the current<br />

allocation <strong>of</strong> resources and the future behaviour <strong>of</strong> processes to control<br />

the release and acquisition <strong>of</strong> resources. The ma<strong>in</strong> characteristic <strong>of</strong> deadlock<br />

avoidance strategies is that they work dur<strong>in</strong>g runtime and base their decisions<br />

on <strong>in</strong>formation about the resource and agent status. More precisely, a<br />

deadlock controller <strong>in</strong>hibits or enables events <strong>in</strong>volv<strong>in</strong>g resource acquisition<br />

or release by us<strong>in</strong>g look-ahead procedures.<br />

Deadlock Detection and Resolution monitors the agents and/or the flow <strong>of</strong><br />

resources and detects deadlocks at runtime. Resources can then be removed<br />

from the system or put <strong>in</strong>to buffers to resolve the deadlock. This strategy can<br />

<strong>in</strong> general allow higher resource utilization than that prevention or avoidance<br />

methods can <strong>of</strong>fer. However, it should only be used when deadlock is rare<br />

and detection and recovery are not expensive and much faster than deadlock<br />

generation.<br />

3 Related Work<br />

Deadlocks have been dealt with <strong>in</strong> several doma<strong>in</strong>s that are concerned with<br />

s<strong>of</strong>tware-systems, e.g. deadlocks which are <strong>in</strong>herent <strong>in</strong> databases that use lock<strong>in</strong>g

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!