Changeset dbfae7b for doc/theses/mubeen_zulfiqar_MMath
- Timestamp:
- Mar 30, 2021, 8:40:23 AM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- a41e87b
- Parents:
- d0e80f61
- Location:
- doc/theses/mubeen_zulfiqar_MMath
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/mubeen_zulfiqar_MMath/allocator.tex
rd0e80f61 rdbfae7b 1 1 2 \chapter{Allocator} 3 4 \newpage 5 \paragraph{Design 1: Decentralized} 6 Fixed number of heaps: shard the heap into N heaps each with a bump-area allocated from the sbrk area. 7 Kernel threads (KT) are assigned to the N heaps. 8 When KTs $\le$ N, the heaps are uncontented. 9 When KTs $>$ N, the heaps are contented. 10 By adjusting N, this approach reduces storage at the cost of speed due to contention. 11 In all cases, a thread acquires/releases a lock, contented or uncontented. 12 \begin{cquote} 13 \centering 14 \input{AllocDS1} 15 \end{cquote} 16 Problems: need to know when a KT is created and destroyed to know when to create/delete the KT's heap. 17 On KT deletion, its heap freed-storage needs to be distributed somewhere. 18 19 \paragraph{Design 2: Centralized} 20 21 One heap, but lower bucket sizes are N-shared across KTs. 22 This design leverages the fact that 95\% of allocation requests are less than 512 bytes and there are only 3--5 different request sizes. 23 When KTs $\le$ N, the important bucket sizes are uncontented. 24 When KTs $>$ N, the free buckets are contented. 25 Therefore, threads are only contending for a small number of buckets, which are distributed among them to reduce contention. 26 \begin{cquote} 27 \centering 28 \input{AllocDS2} 29 \end{cquote} 30 Problems: need to know when a kernel thread (KT) is created and destroyed to know when to assign a shared bucket-number. 31 When no thread is assigned a bucket number, its free storage is unavailable. 32 It is possible to use sharing and stealing techniques to share/find unused storage, when a free list is unused or empty.
Note: See TracChangeset
for help on using the changeset viewer.