A constant-time dynamic storage allocator for real-time systems
- 171 Downloads
Dynamic memory allocation has been used for decades. However, it has seldom been used in real-time systems since the worst case of spatial and temporal requirements for allocation and deallocation operations is either unbounded or bounded but with a very large bound.
In this paper, a new allocator called TLSF (Two Level Segregated Fit) is presented. TLSF is designed and implemented to accommodate real-time constraints. The proposed allocator exhibits time-bounded behaviour, O(1), and maintains a very good execution time. This paper describes in detail the data structures and functions provided by TLSF. We also compare TLSF with a representative set of allocators regarding their temporal cost and fragmentation.
Although the paper is mainly focused on timing analysis, a brief study and comparative analysis of fragmentation incurred by the allocators has been also included in order to provide a global view of the behaviour of the allocators.
The temporal and spatial results showed that TLSF is also a fast allocator and produces a fragmentation close to that caused by the best existing allocators.
KeywordsDynamic storage allocation Real-time allocators Allocation algorithms evaluation
Unable to display preview. Download preview PDF.
- Atienza D, Mamagkakis S, Leeman M, Catthoor F, Mendias JM, Soudris D, Deconinck G (2003) Fast system-level prototyping of power-aware dynamic memory managers for embedded systems. In: Workshop on compilers and operating systems for low power Google Scholar
- Berger ED, Zorn BG, McKinley KS (2002a) Reconsidering custom memory allocation. In: ACM conference on object-oriented programming, systems, languages, and applications, Seattle, WA, pp 1–12 Google Scholar
- Berger ED, Zorn BG, McKinley KS (2002b) Reconsidering custom memory allocation. In: OOPSLA, pp 1–12 Google Scholar
- Bollella G, Gosling J (2000) The real-time specification for Java. IEEE Comput 33(6):47–54 Google Scholar
- Bonwick J (1994) The slab allocator: an object-caching Kernel memory allocator. In: USENIX summer, pp 87–98 Google Scholar
- Feizabadi S, Ravindran B, Jensen ED (2005) MSA: a memory-aware utility accrual scheduling algorithm. In: SAC, pp 857–862 Google Scholar
- OCERA, Open Components for Embedded Real-Time Applications (2002) IST 35102 European research project (http://www.ocera.org)
- Johnstone M, Wilson P (1998) The memory fragmentation problem: solved? In: Proc of the int symposium on memory management (ISMM98), Vancouver, Canada. ACM Press Google Scholar
- Knuth D (1973) Fundamental Algorithms. The art of computer programming, vol 1. Addison–Wesley, Reading Google Scholar
- LBNLab (2000) The Internet traffic archive. Lawrence Berkeley National Laboratory, http://ita.ee.lbl.gov/
- Lea D (1996) A memory allocator. Unix/Mail 6/96 Google Scholar
- Masmano M, Ripoll I, Crespo A (2003) Dynamic storage allocation for real-time embedded systems. In: Real-time systems symposium, work-in-progress session, Cancun, Mexico Google Scholar
- Masmano M, Ripoll I, Crespo A, Real J (2004) TLSF: a new dynamic memory allocator for real-time systems. In: 16th Euromicro conference on real-time systems, Catania, Italy. IEEE, pp 79–88 Google Scholar
- Ogasawara T (1995) An algorithm with constant execution time for dynamic storage allocation. In: 2nd int workshop on real-time computing systems and applications, p 21 Google Scholar
- Puaut I (2002) Real-time performance of dynamic memory allocation algorithms. In: 14th Euromicro conference on real-time systems, p 41 Google Scholar
- Stephenson CJ (1983) Fast fits: new methods of dynamic storage allocation. Oper Sys Rev 15(5). Also in Proceedings of ninth symposium on operating systems principles, Bretton Woods, New Hampshire, October 1983 Google Scholar
- Wilson PR, Johnstone MS, Neely M, Boles D (1995) Dynamic storage allocation: a survey and critical review. In: Baker H (ed) Proc of the int workshop on memory management, Kinross, Scotland, UK, vol 986. Springer, Berlin, pp 1–116 Google Scholar
- Zorn B, Grunwald D (1994) Evaluating models of memory allocation. ACM Trans Model Comput Simul 107–131 Google Scholar