Jump to content

Pool (computer science): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
Yobot (talk | contribs)
m →‎References: WP:CHECKWIKI error 22 fixes (category with space) + general fixes (BRFA 16) using AWB (7799)
Line 18: Line 18:
<references/>
<references/>


[[Category: Database management systems]]
[[Category:Database management systems]]
[[Category: Memory management]]
[[Category:Memory management]]


[[de:Pool (Informatik)]]
[[de:Pool (Informatik)]]

Revision as of 22:26, 29 July 2011

A pool in computer science is a set of initialised resources that are kept ready to use, rather than allocated and destroyed on demand. A client of the pool will request an object from the pool and perform operations on the returned object. When the client has finished with an object (or resource), it returns it to the pool, rather than destroying it.

Pooling of resources can offer a significant performance boost in situations where the cost of initializing a class instance is high, the rate of instantiation of a class is high, and the number of instances in use at any one time is low. The pooled resource is obtained in predictable time when creation of the new objects (especially over network) may take variable time.

However these benefits are mostly true for objects which are expensive with respect to time, such as database connections, socket connections, threads and large graphic objects like fonts or bitmaps. In certain situations, simple object pooling (which hold no external resources, but only occupy memory) may not be efficient and could decrease performance [1]

Special cases are:

It can also refer to a Design Pattern to implement them in object oriented languages:

References