Resource management (computing): Difference between revisions

Content deleted Content added
m <ref>https://www.techtarget.com/whatis/definition/resource-contention</ref> This is the link where I found information, which I summarized and added to Wikipedia.
Line 37:
 
==Basic techniques==
The basic approach to resource management is to acquire a resource, do something with it, then release it, yielding code of the form (illustrated with opening a file in [[Python (programming language)|Python]]):
<syntaxhighlight lang="python">
f = open(filename)
Line 70:
</syntaxhighlight>
 
The above techniques – unwind protection (<code>finally</code>) and some form of encapsulation – are the most common approach to resource management, found in various forms in [[C Sharp (programming language)|C#]], [[Common Lisp]], [[Java (programming language)|Java]], [[Python (programming language)|Python]], [[Ruby (programming language)|Ruby]], [[Scheme (programming language)|Scheme]], and [[Smalltalk]],{{sfn|Beck|1997|pp=37–39}} among others; they date to the late 1970s in the [[NIL (programming language)|NIL]] dialect of Lisp; see {{section link|Exception handling|History}}. There are many variations in the implementation, and there are also significantly different [[#Approaches|approaches]].
 
== Approaches ==