1 / 5

Computer Science 490.002 Topical Paper Presentation # 12

Computer Science 490.002 Topical Paper Presentation # 12. Pattern Pooling – Page 1. Mark Pfeffer. Pooling. Pooling by Michael Kircher, Prashant Jain. The Problem. Pattern Pooling – Page 2.

bob
Télécharger la présentation

Computer Science 490.002 Topical Paper Presentation # 12

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computer Science 490.002 Topical Paper Presentation #12 Pattern Pooling – Page 1 Mark Pfeffer Pooling Pooling by Michael Kircher, Prashant Jain

  2. The Problem Pattern Pooling – Page 2 Accessing resources is sometimes unpredictable. When a system has to access a large number of resources, this unpredictability can quickly get out of hand. How do we tame resource acquisition, and bend it to our will, without compromising performance and stability? • We need a mechanism which will allow us fast, easy access to resources. Something that • improves performance, • offers predictability, • and stability, • is simple, • and promotes reuse of resources. Friends, we need a Pool!

  3. The Pooling Pattern Pattern Pooling – Page 3 • Resource User • Acquires and uses resources • Releases unused resources to the pool Resource Pool • Acquires resources eagerly and lazily • Recycles resources returned by users Resource Environment • Initially owns resources Resource • Any reusable entity • Acquired from Environment by Pool • Used by Resource User

  4. Real-World Application Pattern Pooling– Page 4 • Consider Dynamic Memory Allocation • User – The Program • Gets memory from the Heap • Returns unused memory to the Heap Pool – The Heap • Manages program memory Environment – The OS • Manages the Heap Resource – Main Memory With the Heap system, the program does not have to petition the OS every time it needs to allocate memory for a dynamic variable/object. Program performance is improved, and the system becomes more stable since the OS does not have to constantly allocate and free RAM.

  5. Pattern Analysis Pattern Pooling – Page 5 A useful pattern for managing a large number of resource-hungry Users, though it seems best suited for system level operations. The prevalence of Garbage Collection in modern languages somewhat diminishes the utility of Pooling. It is obviously still a necessary pattern, though, since the problems it solves are most apparent in environments like operating systems, and web servers. There are some real world examples of Pooling, and many specializations that illustrate situations where the pattern is most applicable. Most notably Database Connection Pooling, and Thread Pooling. These have clear advantages over the alternative, improving performance and predictability, contributing to system stability, and being scalable.

More Related