source: doc/theses/mubeen_zulfiqar_MMath/background.tex

Last change on this file was 15885de9, checked in by m3zulfiq <m3zulfiq@…>, 6 weeks ago

removed errors from thesis and separated background chapter

  • Property mode set to 100644
File size: 3.4 KB
Line 
1\chapter{Background}
2
3\noindent
4====================
5
6Writing Points:
7\begin{itemize}
8\item
9Classification of benchmarks.
10\item
11Literature review of current benchmarks.
12\item
13Features and limitations.
14\item
15Literature review of current memory allocators.
16\item
17Breakdown of memory allocation techniques.
18\item
19Features and limitations.
20\end{itemize}
21
22\noindent
23====================
24
25\section{Background}
26
27% FIXME: cite wasik
28\cite{wasik.thesis}
29
30\subsection{Memory Allocation}
31With dynamic allocation being an important feature of C, there are many standalone memory allocators that have been designed for different purposes. For this thesis, we chose 7 of the most popular and widely used memory allocators.
32
33\paragraph{dlmalloc}
34dlmalloc (FIX ME: cite allocator) is a thread-safe allocator that is single threaded and single heap. dlmalloc maintains free-lists of different sizes to store freed dynamic memory. (FIX ME: cite wasik)
35
36\paragraph{hoard}
37Hoard (FIX ME: cite allocator) is a thread-safe allocator that is multi-threaded and using a heap layer framework. It has per-thred heaps that have thread-local free-lists, and a gloabl shared heap. (FIX ME: cite wasik)
38
39\paragraph{jemalloc}
40jemalloc (FIX ME: cite allocator) is a thread-safe allocator that uses multiple arenas. Each thread is assigned an arena. Each arena has chunks that contain contagious memory regions of same size. An arena has multiple chunks that contain regions of multiple sizes.
41
42\paragraph{ptmalloc}
43ptmalloc (FIX ME: cite allocator) is a modification of dlmalloc. It is a thread-safe multi-threaded memory allocator that uses multiple heaps. ptmalloc heap has similar design to dlmalloc's heap.
44
45\paragraph{rpmalloc}
46rpmalloc (FIX ME: cite allocator) is a thread-safe allocator that is multi-threaded and uses per-thread heap. Each heap has multiple size-classes and each size-calss contains memory regions of the relevant size.
47
48\paragraph{tbb malloc}
49tbb malloc (FIX ME: cite allocator) is a thread-safe allocator that is multi-threaded and uses private heap for each thread. Each private-heap has multiple bins of different sizes. Each bin contains free regions of the same size.
50
51\paragraph{tc malloc}
52tcmalloc (FIX ME: cite allocator) is a thread-safe allocator. It uses per-thread cache to store free objects that prevents contention on shared resources in multi-threaded application. A central free-list is used to refill per-thread cache when it gets empty.
53
54\subsection{Benchmarks}
55There are multiple benchmarks that are built individually and evaluate different aspects of a memory allocator. But, there is not standard set of benchamrks that can be used to evaluate multiple aspects of memory allocators.
56
57\paragraph{threadtest}
58(FIX ME: cite benchmark and hoard) Each thread repeatedly allocates and then deallocates 100,000 objects. Runtime of the benchmark evaluates its efficiency.
59
60\paragraph{shbench}
61(FIX ME: cite benchmark and hoard) Each thread allocates and randomly frees a number of random-sized objects. It is a stress test that also uses runtime to determine efficiency of the allocator.
62
63\paragraph{larson}
64(FIX ME: cite benchmark and hoard) Larson simulates a server environment. Multiple threads are created where each thread allocator and free a number of objects within a size range. Some objects are passed from threads to the child threads to free. It caluculates memory operations per second as an indicator of memory allocator's performance.
Note: See TracBrowser for help on using the repository browser.