# source:doc/theses/mubeen_zulfiqar_MMath/allocator.tex@b405039

arm-ehenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-expr
Last change on this file since b405039 was d286e94d, checked in by Peter A. Buhr <pabuhr@…>, 13 months ago

comment on Mubeen's thesis writing-points

• Property mode set to 100644
File size: 2.3 KB
Line
1\chapter{Allocator}
2
3\noindent
4====================
5
6Writing Points:
7\begin{itemize}
8\item
9Objective of @uHeapLmmm@.
10\item
11Design philosophy.
12\item
13Background and previous design of @uHeapLmmm@.
14\item
15Distributed design of @uHeapLmmm@.
16
17----- SHOULD WE GIVE IMPLEMENTATION DETAILS HERE? -----
18
19\PAB{Maybe. There might be an Implementation chapter.}
20\item
21figure.
22\item
24\end{itemize}
25
26The new features added to @uHeapLmmm@ (incl. @malloc_size@ routine)
27\CFA alloc interface with examples.
28\begin{itemize}
29\item
30Why did we need it?
31\item
33\end{itemize}
34
35----- SHOULD WE GIVE PERFORMANCE AND USABILITY COMPARISON OF DIFFERENT INTERFACES THAT WE TRIED? -----
36
37\PAB{Often Performance is its own chapter. I added one for now.}
38
39Performance evaluation using u-benchmark suite.
40
41\noindent
42====================
43
44\newpage
45\paragraph{Design 1: Decentralized}
46Fixed number of heaps: shard the heap into N heaps each with a bump-area allocated from the @sbrk@ area.
47Kernel threads (KT) are assigned to the N heaps.
48When KTs $\le$ N, the heaps are uncontented.
49When KTs $>$ N, the heaps are contented.
50By adjusting N, this approach reduces storage at the cost of speed due to contention.
51In all cases, a thread acquires/releases a lock, contented or uncontented.
52\begin{cquote}
53\centering
54\input{AllocDS1}
55\end{cquote}
56Problems: need to know when a KT is created and destroyed to know when to create/delete the KT's heap.
57On KT deletion, its heap freed-storage needs to be distributed somewhere.
58
59\paragraph{Design 2: Centralized}
60
61One heap, but lower bucket sizes are N-shared across KTs.
62This design leverages the fact that 95\% of allocation requests are less than 512 bytes and there are only 3--5 different request sizes.
63When KTs $\le$ N, the important bucket sizes are uncontented.
64When KTs $>$ N, the free buckets are contented.
65Therefore, threads are only contending for a small number of buckets, which are distributed among them to reduce contention.
66\begin{cquote}
67\centering
68\input{AllocDS2}
69\end{cquote}
70Problems: need to know when a kernel thread (KT) is created and destroyed to know when to assign a shared bucket-number.
71When no thread is assigned a bucket number, its free storage is unavailable.
72It is possible to use sharing and stealing techniques to share/find unused storage, when a free list is unused or empty.
Note: See TracBrowser for help on using the repository browser.