a compacting real time memory management system
play

A Compacting Real-Time Memory Management System Silviu S. - PowerPoint PPT Presentation

Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion A Compacting Real-Time Memory Management System Silviu S. Craciunas, Christoph M. Kirsch, Hannes Payer, Ana Sokolova, Horst Stadler, Robert Staudinger


  1. Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion A Compacting Real-Time Memory Management System Silviu S. Craciunas, Christoph M. Kirsch, Hannes Payer, Ana Sokolova, Horst Stadler, Robert Staudinger Hannes Payer Computational Systems Group, University of Salzburg July 1, 2008 Hannes Payer Computational Systems Group, University of Salzburg

  2. Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion Overview Introduction Compact-Fit Experiments Conclusion Hannes Payer Computational Systems Group, University of Salzburg

  3. Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion Motivation Traditional dynamic memory management systems are typically non-deterministic: • unpredictable response times of memory operations • unpredictable memory fragmentation ⇒ Dynamic memory management systems are typically not used in time-critical software components (hard real-time systems, device drivers . . . ) Hannes Payer Computational Systems Group, University of Salzburg

  4. Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion Predictable Memory Management System Predictability in Time The time a memory management operation takes is determined by the size of the object involved in the operation (allocation, deallocation, and dereference). Predictability in Space The number of actual allocations together with their sizes (not the order of invocations) determines how many more allocations of a given size will succeed before running out of memory. Hannes Payer Computational Systems Group, University of Salzburg

  5. Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion Solution Space Time predictable unpredictable Space unpredictable predictable Hannes Payer Computational Systems Group, University of Salzburg

  6. Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion What We Want? A memory management system predictable in time and space (component of the real-time operating system Tiptoe) Properties: • malloc(n) takes at most O (n) time • free(n) takes at most O (n) time • memory access (dereference) takes small constant time • small and predictable memory fragmentation bound Hannes Payer Computational Systems Group, University of Salzburg

  7. Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion Fragmentation Problem 90 80 70 35% free 60 50 40 not allocatable 30 20 10 0 fragmentation in a contiguous space ⇒ compaction ⇒ reference updates Hannes Payer Computational Systems Group, University of Salzburg

  8. Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion Solution to Reference Updates Abstract Space Concrete Space Application Indirection T able Memory Hannes Payer Computational Systems Group, University of Salzburg

  9. Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion Solution to Reference Updates Abstract Space Concrete Space Application Indirection T able Memory Hannes Payer Computational Systems Group, University of Salzburg

  10. Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion Compaction Trade-Off: speed versus memory fragmentation Requirement: keep speed and memory fragmentation bounded and predictable 2 Extreme Non-Solutions: - keep memory perfectly compact - perform memory operations in constant time without considering memory fragmentation Hannes Payer Computational Systems Group, University of Salzburg

  11. Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion Concrete Address Space • concrete address space is divided into pages of equal size 16KB 16KB 16KB 16KB 16KB 16KB 16KB 16KB Hannes Payer Computational Systems Group, University of Salzburg

  12. Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion Concrete Address Space • concrete address space is divided into pages of equal size • each page itself is divided into fixed-sized page-blocks FREE Hannes Payer Computational Systems Group, University of Salzburg

  13. Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion Concrete Address Space • concrete address space is divided into pages of equal size • each page itself is divided into fixed-sized page-blocks • n predefined page-block sizes ⇒ n different size-classes size-class green size-class red FREE size-class blue Hannes Payer Computational Systems Group, University of Salzburg

  14. Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion Concrete Address Space • concrete address space is divided into pages of equal size • each page itself is divided into fixed-sized page-blocks • n predefined page-block sizes ⇒ n different size-classes size-class green size-class red FREE size-class blue Hannes Payer Computational Systems Group, University of Salzburg

  15. Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion Concrete Address Space • concrete address space is divided into pages of equal size • each page itself is divided into fixed-sized page-blocks • n predefined page-block sizes ⇒ n different size-classes size-class green size-class red FREE size-class blue Hannes Payer Computational Systems Group, University of Salzburg

  16. Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion Concrete Address Space • concrete address space is divided into pages of equal size • each page itself is divided into fixed-sized page-blocks • n predefined page-block sizes ⇒ n different size-classes size-class green size-class red FREE size-class blue Hannes Payer Computational Systems Group, University of Salzburg

  17. Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion Concrete Address Space • concrete address space is divided into pages of equal size • each page itself is divided into fixed-sized page-blocks • n predefined page-block sizes ⇒ n different size-classes size-class green size-class red FREE size-class blue Hannes Payer Computational Systems Group, University of Salzburg

  18. Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion Concrete Address Space • concrete address space is divided into pages of equal size • each page itself is divided into fixed-sized page-blocks • n predefined page-block sizes ⇒ n different size-classes size-class green size-class red size-class blue Hannes Payer Computational Systems Group, University of Salzburg

  19. Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion Concrete Address Space • concrete address space is divided into pages of equal size • each page itself is divided into fixed-sized page-blocks • n predefined page-block sizes ⇒ n different size-classes size-class green size-class red size-class blue Hannes Payer Computational Systems Group, University of Salzburg

  20. Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion Deallocation May Involve Compaction Size-Class Compact Invariant: Each size-class can contain at most one not-full page. Hannes Payer Computational Systems Group, University of Salzburg

  21. Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion Deallocation May Involve Compaction Size-Class Compact Invariant: Each size-class can contain at most one not-full page. size-class green size-class red size-class blue Hannes Payer Computational Systems Group, University of Salzburg

  22. Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion Deallocation May Involve Compaction Size-Class Compact Invariant: Each size-class can contain at most one not-full page. size-class green size-class red size-class blue Hannes Payer Computational Systems Group, University of Salzburg

  23. Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion Deallocation May Involve Compaction Size-Class Compact Invariant: Each size-class can contain at most one not-full page. size-class green size-class red FREE size-class blue Hannes Payer Computational Systems Group, University of Salzburg

  24. Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion Deallocation May Involve Compaction Size-Class Compact Invariant: Each size-class can contain at most one not-full page. size-class green size-class red FREE size-class blue Hannes Payer Computational Systems Group, University of Salzburg

  25. Introduction Fragmentation Problem Compact-Fit Partial Compaction Experiments Conclusion Deallocation May Involve Compaction Size-Class Compact Invariant: Each size-class can contain at most one not-full page. size-class green size-class red FREE size-class blue Hannes Payer Computational Systems Group, University of Salzburg

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend