Yaw Lartey Memory Management
Yaw Lartey Memory Management
Problem Statement: What are challenges and issues associated with traditional memory
management techniques which hinders the performance in real time systems?
Goal: The goal of the research is to analyze different traditional dynamic memory allocation
algorithms to find out their response times and viability against real time applications
Objectives:
1. Discussion of related work and background knowledge
2. Perform comparative analysis on memory allocation techniques
3. Propose new technique suitable for real time applications
Motivation: The motivation of the research was to understand operating system memory
management and issues related to traditional memory management techniques and reasons why
these techniques are not best used for today’s real time memory usage for applications
Methodology
Muhammad., A (2016) discussed different memory allocation techniques along with their
comparative analysis with respect to internal fragmentation, response time, allocation time, de-
allocation time and memory footprint. He started his discussions on his research with an extensive
literature review according to the research guidance provided by B.Kitchenham. He used a
searching strategy that allowed him to retrieve research articles for memory management techniques
in operating systems. This was to broaden and enhance his understanding of memory management.
The search was conducted various digital libraries such as IEEE explore digital library, Google
scholar and third part research paper providing libraries such as Research Gate using keywords such
as memory management, memory allocation in operating system, real time operating system
memory allocation, issues in memory allocation and techniques for dynamic memory allocation.
After he studied the basics of operating system memory management from the research papers, he
shortlisted those that had issues relating to traditional memory management techniques and reasons
why the techniques were not best suited for today’s real time memory usage for applications and
operating systems.
He provides a comparison of the different buddy systems. In his comparison the binary buddy is the
simplest of all the buddy systems. Due to the equal size partition it easy to compute the pointer
making the buddy allocator a real time allocator. Irrespective of this advantage, internal
fragmentation higher in the binary buddy as compared to the others. On the other hand Fibonacci
buddy has lower internal fragmentation than binary buddy while weighted buddy with different
classes has lower internal fragmentation than all other buddy system variations.
Hoard
The seventh algorithm discussed is the Hoard. Hoard is designed especially for multiprocessor
systems and its performance is quite remarkable among other discussed algorithms. The idea behind
hoard is to use operating system virtual memory as superblocks to serve blocks of memory of one
class.
A comparative analysis of all algorithms was made with respect to allocation and deallocation time
of different algorithms and also with respect to fragmentation and response time of the methods.
The table below described the worst time complexity required for allocation and deallocation of the
algorithms.
According to Masmano et al (2004), the TSLF has been designed with the following guidelines:
Immediate coalescing: Here, as soon as a block of memory is released, TLSF will
immediately merge it with adjacent free blocks, if any, to build up a larger free block.
Splitting threshold: With splitting threshold, The smallest block of allocatable memory
is 16 bytes. By limiting the minimum block size to 16 bytes, it is possible to store, inside the
free blocks, the information needed to manage them, including the list of free blocks
pointers. This approach optimizes the use of memory.
Good-fit strategy: TLSF will try toreturn the smallestchunk of memory big enough to
hold the requestedblock.
No reallocation: with no-rellocation, it is assumed assume that the original memory pool
is a single large block of free memory, and nosbrk()2 function is available.
Same strategy for all block sizes: The same allocation strategy is used for any requested
size.
Memory is not cleaned-up: Neither the initial pool nor the free blocks are zeroed.
1. Two level Segregated Fit Algorithm solves the problem of worst case bound maintaining the
efficiency of the allocation and deallocation operations allowing the reasonable use of
dynamic memory allocation in real-time applications.
2. TLSF uses the guidelines described above for optimizing memory usage which tends to
produce the lowest fragmentation on real workloads.
3. TLSF cause very low internal fragmentation, its response time is very good which is the
primary demand of real time system where time is most important factor.
4. TLSF allocation and de-allocation time is small constant time that makes it much faster than
other traditional techniques.
Conclusion
Muhammad., A (2016) discussed different memory allocation techniques such as sequential fit,
segregation fit, buddy system, along with their comparative analysis with respect to internal
fragmentation they cause, response time, allocation time, de allocation time and memory footprint
they use. All these techniques discussed by Muhammad., A (2016) belonging to dynamic memory
management has advantages and disadvantages and can be utilized in particular situations.
The TSLF is an improved version of previously the other schemes such as sequential and
segregated fit. From Masmano et al (2004), TLSF is the recommended technique to use for real
time systems because TLSF cause very low internal fragmentation, its response time is very good
which is the primary demand of real time system where time is most important factor. Also
TLSF allocation and de allocation time is small constant time that makes it much faster than other
traditional techniques.
References
Shalan., M. A (2003), “Dynamic Memory Management for Embedded Real-Time Multiprocessor
System On a Chip”
M. Masmano, I. Ripoll, A. Crespo and J. Real, "TLSF: a new dynamic memory allocator for real-
time systems," Proceedings. 16th Euromicro Conference on Real-Time Systems, 2004. ECRTS
2004., Catania, Italy, 2004, pp. 79-88.
Silberschatz, A., Galvin, P., & Gagne, G. (2012). Operating System Concepts, 9th Edition. John
Wiley & Sons.