addedbase changes

This commit is contained in:
2025-04-18 15:23:34 +01:00
parent d46c2c8d86
commit bacce0e424
7 changed files with 59 additions and 59 deletions

View File

@@ -22,7 +22,7 @@
\citation{karakostas_redundant_2015}
\citation{woodruff_cheri_2019}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}Direct Segment}{2}{subsection.2.2}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {2.3}Range Memory Mapping (RMM)}{2}{subsection.2.3}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {2.3}Redundant Memory Mapping (RMM)}{2}{subsection.2.3}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {2.4}CHERI}{2}{subsection.2.4}\protected@file@percent }
\newlabel{sec:orgbf2eaac}{{2.4}{2}{CHERI}{subsection.2.4}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.5}CHERI CC}{2}{subsection.2.5}\protected@file@percent }

View File

@@ -1,13 +1,13 @@
# Fdb version 4
["bibtex paper"] 1744984608.02035 "paper.aux" "paper.bbl" "paper" 1744984609.67666 0
["bibtex paper"] 1744986008.45602 "paper.aux" "paper.bbl" "paper" 1744986010.05022 0
"./paperReferences.bib" 1744390239.54673 46323 d7b94a445857170fc1233321d0322eaa ""
"/usr/local/texlive/2025/texmf-dist/bibtex/bst/base/unsrt.bst" 1292289607 18030 1376b4b231b50c66211e47e42eda2875 ""
"paper.aux" 1744984609.35312 7728 b66dfce8e17c5b93218ba035ccc3761d "pdflatex"
"paper.aux" 1744986009.74502 7732 6c392b230f302222e5e050064e5cc1a4 "pdflatex"
(generated)
"paper.bbl"
"paper.blg"
(rewritten before read)
["pdflatex"] 1744984608.10722 "paper.tex" "paper.pdf" "paper" 1744984609.67678 0
["pdflatex"] 1744986008.53877 "paper.tex" "paper.pdf" "paper" 1744986010.05034 0
"/usr/local/texlive/2025/texmf-dist/fonts/enc/dvips/inconsolata/i4-t1-4.enc" 1558214095 7693 0f2dce6d313c82989ec3a67fc24df2a0 ""
"/usr/local/texlive/2025/texmf-dist/fonts/enc/dvips/libertine/lbtn_25tcsq.enc" 1490131464 2921 8ca0eb0831f9bc5da080d3697cfe67bf ""
"/usr/local/texlive/2025/texmf-dist/fonts/enc/dvips/libertine/lbtn_76gpa5.enc" 1490131464 2933 9ad527ce78d7c5fa0a642dead095f172 ""
@@ -219,10 +219,10 @@
"diagram/TLBAccess.drawio.png" 1744196148.80543 77522 75367f218335fe386db852966a892e9b ""
"diagram/bargraph.png" 1744196148.80607 74263 65509d21744edc6c9ca02b8c67d664fb ""
"diagram/kmeans.png" 1744196148.80901 94217 5d14308c169ff296bf499805b9823aa6 ""
"paper.aux" 1744984609.35312 7728 b66dfce8e17c5b93218ba035ccc3761d "pdflatex"
"paper.bbl" 1744984608.10415 3824 3a7d4db0e425f84ef7bb98164f0eac8f "bibtex paper"
"paper.out" 1744984609.35401 3223 c644626d6f355ca6b33284610ee86662 "pdflatex"
"paper.tex" 1744984604.67798 84275 6d13323418da536bb01ae02ed8ceb219 ""
"paper.aux" 1744986009.74502 7732 6c392b230f302222e5e050064e5cc1a4 "pdflatex"
"paper.bbl" 1744986008.53583 3824 3a7d4db0e425f84ef7bb98164f0eac8f "bibtex paper"
"paper.out" 1744986009.7459 3243 8666c5d883f1c403037236be395fbf0f "pdflatex"
"paper.tex" 1744985983.05866 84406 580da4eab7518a9734e3d6b079523aa0 ""
(generated)
"paper.aux"
"paper.log"

View File

@@ -496,23 +496,23 @@ INPUT ./diagram/HighOverviewArchitecture.drawio.png
INPUT ./diagram/HighOverviewArchitecture.drawio.png
INPUT ./diagram/HighOverviewArchitecture.drawio.png
INPUT ./diagram/HighOverviewArchitecture.drawio.png
INPUT /usr/local/texlive/2025/texmf-dist/fonts/tfm/public/libertine/LinLibertineTI-tlf-t1.tfm
INPUT /usr/local/texlive/2025/texmf-dist/fonts/tfm/public/libertine/LinBiolinumT-tlf-t1.tfm
INPUT /usr/local/texlive/2025/texmf-dist/fonts/tfm/public/libertine/LinBiolinumT-tlf-t1.tfm
INPUT /usr/local/texlive/2025/texmf-dist/fonts/vf/public/libertine/LinBiolinumT-tlf-t1.vf
INPUT /usr/local/texlive/2025/texmf-dist/fonts/tfm/public/libertine/LinBiolinumT-tlf-t1--base.tfm
INPUT ./diagram/AllocationOverview24.png
INPUT ./diagram/AllocationOverview24.png
INPUT ./diagram/AllocationOverview24.png
INPUT ./diagram/AllocationOverview24.png
INPUT ./diagram/AllocationOverview24.png
INPUT /usr/local/texlive/2025/texmf-dist/fonts/tfm/public/libertine/LinLibertineTI-tlf-t1.tfm
INPUT ./diagram/TLBAccess.drawio.png
INPUT ./diagram/TLBAccess.drawio.png
INPUT ./diagram/TLBAccess.drawio.png
INPUT ./diagram/TLBAccess.drawio.png
INPUT ./diagram/TLBAccess.drawio.png
INPUT /usr/local/texlive/2025/texmf-dist/fonts/vf/public/libertine/LinLibertineTI-tlf-t1.vf
INPUT /usr/local/texlive/2025/texmf-dist/fonts/tfm/public/libertine/LinLibertineTI-tlf-t1--base.tfm
INPUT ./diagram/AllocationOverview24.png
INPUT ./diagram/AllocationOverview24.png
INPUT ./diagram/AllocationOverview24.png
INPUT ./diagram/AllocationOverview24.png
INPUT ./diagram/AllocationOverview24.png
INPUT ./diagram/TLBAccess.drawio.png
INPUT ./diagram/TLBAccess.drawio.png
INPUT ./diagram/TLBAccess.drawio.png
INPUT ./diagram/TLBAccess.drawio.png
INPUT ./diagram/TLBAccess.drawio.png
INPUT /usr/local/texlive/2025/texmf-dist/fonts/tfm/public/libertine/LinLibertineT-tlf-sc-t1.tfm
INPUT /usr/local/texlive/2025/texmf-dist/fonts/tfm/public/libertine/LinLibertineT-tlf-t1.tfm
INPUT /usr/local/texlive/2025/texmf-dist/fonts/tfm/public/libertine/LinLibertineT-tlf-t1.tfm

View File

@@ -1,4 +1,4 @@
This is pdfTeX, Version 3.141592653-2.6-1.40.27 (TeX Live 2025) (preloaded format=pdflatex 2025.4.2) 18 APR 2025 14:56
This is pdfTeX, Version 3.141592653-2.6-1.40.27 (TeX Live 2025) (preloaded format=pdflatex 2025.4.2) 18 APR 2025 15:20
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
@@ -1290,6 +1290,8 @@ Class acmart Warning: A possible image without description on input line 518.
LaTeX Warning: `h' float specifier changed to `ht'.
LaTeX Font Info: Font shape `T1/LinuxLibertineT-TLF/m/it' will be
(Font) scaled to size 9.0pt on input line 520.
LaTeX Font Info: Font shape `T1/LinuxBiolinumT-TLF/m/n' will be
@@ -1309,8 +1311,6 @@ Class acmart Warning: A possible image without description on input line 546.
LaTeX Font Info: Font shape `T1/LinuxLibertineT-TLF/m/it' will be
(Font) scaled to size 9.0pt on input line 602.
<diagram/TLBAccess.drawio.png, id=144, 773.89125pt x 945.5325pt>
File: diagram/TLBAccess.drawio.png Graphic file (type png)
<use diagram/TLBAccess.drawio.png>
@@ -1453,14 +1453,14 @@ LaTeX2e <2024-11-01> patch level 2
L3 programming layer <2025-01-18>
***********
Package rerunfilecheck Info: File `paper.out' has not changed.
(rerunfilecheck) Checksum: C644626D6F355CA6B33284610EE86662;3223.
(rerunfilecheck) Checksum: 8666C5D883F1C403037236BE395FBF0F;3243.
)
Here is how much of TeX's memory you used:
24033 strings out of 473190
394081 string characters out of 5715801
24043 strings out of 473190
394342 string characters out of 5715801
967318 words of memory out of 5000000
46198 multiletter control sequences out of 15000+600000
775161 words of font info for 450 fonts, out of 8000000 for 9000
776437 words of font info for 457 fonts, out of 8000000 for 9000
1302 hyphenation exceptions out of 8191
90i,17n,131p,1002b,645s stack positions out of 10000i,1000n,20000p,200000b,200000s
</usr/local/texlive/2025/texmf-dist/fonts/type1/public/inconsolata/Inconsolat
@@ -1474,7 +1474,7 @@ lic/libertine/LinLibertineTB.pfb></usr/local/texlive/2025/texmf-dist/fonts/type
1/public/libertine/LinLibertineTI.pfb></usr/local/texlive/2025/texmf-dist/fonts
/type1/public/newtx/NewTXMI.pfb></usr/local/texlive/2025/texmf-dist/fonts/type1
/public/newtx/txsys.pfb>
Output written on paper.pdf (8 pages, 710095 bytes).
Output written on paper.pdf (8 pages, 710137 bytes).
PDF statistics:
291 PDF objects out of 1000 (max. 8388607)
242 compressed objects within 3 object streams

Binary file not shown.

View File

@@ -340,7 +340,7 @@ huge pages~\cite{panwar_hawkeye_2019}.
Huge pages, also known as large pages, allow for the allocation of memory in significantly larger chunks
compared to traditional small pages. By reducing the number of TLB entries needed to access a given amount
of memory, huge pages offer a potential avenue for optimising TLB utilisation by reducing the number
of memory, huge pages offer a potential avenue for optimising TLBs use by reducing the number
of entries needed to map large memory regions. This not only decreases the frequency of
TLB misses but also lowers the overhead associated with address translation. By minimising
these bottlenecks, huge pages can improve system performance in aspects such as speeding
@@ -357,15 +357,15 @@ Furthermore, it accelerates memory-intensive tasks by reducing the overhead asso
memory allocations. The contributions for the following paper are as follows:
\begin{itemize}
\item \textbf{FAT Addresses Translations}: Introduces FAT that include memory bounds, allowing
efficient tracking and management of physically contiguous memory regions (section ~\ref{sec:FatPointerTranslations}).
efficient tracking and management of physically contiguous memory regions (Section ~\ref{sec:FatPointerTranslations}).
\item \textbf{CHERIs Capability-based Optimization}: Demonstrates how CHERI's architecture can be
used to optimize memory allocation by encoding memory bounds directly within pointers, reducing TLB reliance
(section ~\ref{sec:128bitCompressedBounds}).
(Section ~\ref{sec:128bitCompressedBounds}).
\item \textbf{Memory Allocation Algorithms}: Provides an algorithms for allocating, freeing
physically contiguous memory and integrating huge pages with CHERI's capability-based bounds for enhanced memory management
(section ~\ref{sec:MemoryAllocator}).
(Section ~\ref{sec:MemoryAllocator}).
\end{itemize}
Through comprehensive evaluation, including micro and macro benchmarks, we demonstrate the allocators ability
@@ -417,7 +417,7 @@ physical start address. This straightforward method simplifies the translation
process for large memory areas but requires significant modifications to the
source code of applications.
\subsection{Range Memory Mapping (RMM)}
\subsection{Redundant Memory Mapping (RMM)}
Redundant Memory Mappings (RMM)~\cite{karakostas_redundant_2015} enhance memory management by introducing an additional range table
that pre-allocates contiguous physical pages for large memory allocations, creating ranges that
are both virtually and physically contiguous. This approach simplifies address translation
@@ -479,9 +479,9 @@ bounds encoding technique with an internal exponent mechanism that offers greate
\section{Fat Address Translations}
\label{sec:FatPointerTranslations}
Fat Address Translations(FAT) uses the CHERI architecture to
Fat Address Translations (FAT) uses the CHERI architecture to
bring about block based allocations in physically contiguous memory.
FAT leverages techniques like FlexPointer~\cite{chen_flexpointer_2023} and Range Memory Mapping (RMM)~\cite{karakostas_redundant_2015} to
FAT leverages techniques like FlexPointer~\cite{chen_flexpointer_2023} and RMM~\cite{karakostas_redundant_2015} to
reduce pressure on the TLB. A key component
in this implementation is the use of range addresses with CHERI CC~\cite{woodruff_cheri_2019}.
@@ -517,8 +517,8 @@ in this implementation is the use of range addresses with CHERI CC~\cite{woodruf
% \end{minipage}
\end{figure*}
Figure \ref{fig:HighOverviewArchitecture} illustrates a comparison between standard memory allocation (malloc()) and a proposed FAT method. The standard approach involves a C program interacting with a custom allocator, utilizing 48-bit
free virtual addresses and a TLB walk (L1, L2 and L3 cache) to achieve non-contiguous allocation in physical memory.
Figure \ref{fig:HighOverviewArchitecture} illustrates a comparison between standard memory allocation (\textit{malloc()}) and a proposed FAT method. The standard approach involves a C program interacting with a custom allocator which uses 48-bit
virtual addresses and a TLB walker (L1, L2 and L3 cache) to achieve non-contiguous allocation in physical memory.
This typically results in more TLB entries and increased TLB misses increasing the reasoning to have more TLB walks.
In contrast, the FAT Address Translations method employs a custom allocator leveraging
physically contiguous memory by using CHERI to encode
@@ -547,16 +547,16 @@ bounds within the pointers and as shown in the figure \ref{fig:HighOverviewArchi
% Integrating range bounds directly into FAT-pointers enables the CHERI architecture
% to enforce memory access restrictions at the pointer level thus allowing
% tracking of memory ranges on a pointer level.
A memory range in FAT has 2 points to track memory in physical contiguous space which
is the top and bottom. These 2 points are 2 virtual addresses and the range consists of
addresses which lie within this and refers to addresses allocated by invoking malloc.
A memory range in FAT has two points to track memory in physical contiguous space which
is the top and bottom. These two points are two virtual addresses and the range consists of
addresses which lie within this and refers to addresses allocated by invoking \textit{malloc}.
In FAT memory ranges are established using
bounds encoded within the pointer, adhering to CHERI CC~\cite{woodruff_cheri_2019}.
% as referred in section ~\ref{sec:128bitCompressedBounds}.
Figure \ref{fig:RangeOfMemory} illustrates a straightforward use-case in which the dark pink line represents a single,
large contiguous memory area, or huge page. Within this huge page, the orange and blue lines indicate
two separate memory allocations equivalent to invoking malloc twice to allocate memory in distinct regions.
two separate memory allocations equivalent to invoking \textit{malloc} twice to allocate memory in distinct regions.
This scenario simulates a block-based memory allocator operating within the confines of the huge page.
The allocations use the bounds encoded in the FAT, ensuring tracking of the allocated memory regions.
By using the CHERI bounds, this method maintains the contiguity of the allocated blocks within the huge page.
@@ -589,7 +589,7 @@ allocated.
% eliminating the need for multiple TLB entries for each allocation.
Allocators like Jemalloc typically allocate objects under
512 bytes. When an objects bounds cannot be precisely represented, padding is required to ensure
512 bytes. When an object's bounds cannot be precisely represented, padding is required to ensure
memory safety. However, it has been observed that Jemalloc rarely needs more than 6 bits to store the
exponent values within compressed bounds (as shown in~\cite{woodruff_cheri_2019}). This means that the default behavior of allocators such as Jemalloc, would allow precise
representation of bounds within CHERI CC.
@@ -658,10 +658,10 @@ on physically contigous memory.
\section{Memory allocator design}
\label{sec:MemoryAllocator}
This section presents a straightforward memory allocator designed and implemented based on the
principles outlined FAT (section ~\ref{sec:FatPointerTranslations}). The allocator consists of three core functions: InitAlloc,
malloc, and free. The InitAlloc function initializes the memory pool, setting up the necessary
data structures and metadata required for efficient memory management. The malloc function is
responsible for allocating a contiguous block of memory of a specified size, while the free
principles outlined FAT (Section ~\ref{sec:FatPointerTranslations}). The allocator consists of three core functions: \textit{InitAlloc},
\textit{malloc}, and \textit{free}. The \textit{InitAlloc} function initializes the memory pool, setting up the necessary
data structures and metadata required for efficient memory management. The \textit{malloc} function is
responsible for allocating a contiguous block of memory of a specified size, while the \textit{free}
function deallocates the memory, returning it to the pool for future use.
% A notable feature of this malloc implementation is its compatibility with kernel modules,
@@ -685,10 +685,10 @@ function deallocates the memory, returning it to the pool for future use.
\end{algorithmic}
\end{algorithm}
When the malloc function (Algorithm \ref{alg:malloc}) is invoked, the algorithm employs an eager allocation strategy for physical memory.
When the \textit{malloc} function (Algorithm \ref{alg:malloc}) is invoked, the algorithm employs an eager allocation strategy for physical memory.
This is achieved through the use of the SetBounds mechanism, which constructs a FAT specialized
pointer that encodes both the start and end addresses of the allocated memory region within the pointer
itself. The start and end addresses correspond to the size of the memory block requested by malloc. This
itself. The start and end addresses correspond to the size of the memory block requested by \textit{malloc}. This
approach introduces a method of memory tracking, where the bounds of the allocated region are
explicitly encoded in the address, enabling efficient monitoring and management of memory usage.
@@ -710,7 +710,7 @@ efficient memory management but also demonstrates a practical usecase of huge pa
\end{algorithm}
The memory deallocation (Algorithm \ref{alg:free}) mechanism in the proposed allocator is facilitated by the FAT structure
introduced in the malloc algorithm. When the free function is invoked, it uses the metadata
introduced in the \textit{malloc} algorithm. When the \textit{free} function is invoked, it uses the metadata
embedded within the FAT to determine the range and size of the allocated memory region.
Specifically, FAT encodes the start and end addresses of each allocation, providing the information needed to
identify the memory block to be deallocated. This enables the allocator to accurately unmap the corresponding
@@ -720,7 +720,7 @@ efficient memory management but also demonstrates a practical usecase of huge pa
% to identify the exact memory block to be deallocated. This allows the allocator to unmap
% the corresponding memory region from the address space.
By extracting the bounds and size directly from FAT, the free function eliminates the need
By extracting the bounds and size directly from FAT, the \textit{free} function eliminates the need
for additional metadata lookups or complex data structures.
% , streamlining the deallocation process.
% This approach not only enhances performance but also reduces the risk of memory leaks or fragmentation.
@@ -807,7 +807,7 @@ consideration for this evaluation.
Each C program was executed using two different memory allocators. The first was
the modified C allocator, imported as a header file. This approach was necessary
because the Benchmark ABI shared object file exhibited unexpected behavior,
failing to overwrite the C program at runtime with the intended malloc functions.
failing to overwrite the C program at runtime with the intended \textit{malloc} functions.
The second allocator was the standard OS memory allocator, which, in the case of
CHERIBSD, is Jemalloc.
@@ -862,7 +862,7 @@ the proposed changes.
The benchmarks~\cite{Benchmark} are classified into 2 classes:
\subsubsection{Micro benchmark}
We further elaborated on the two classes of benchmarks executed. Micro benchmarks (section~\ref{sec:Micro}).
We further elaborated on the two classes of benchmarks executed. Micro benchmarks (Section~\ref{sec:Micro}).
focused on particular allocation and deallocation patterns, such as sequential and
random memory accesses, to stress-test the allocator under controlled conditions.
Macro benchmarks involved real-world applications, offering insights into how
@@ -872,7 +872,7 @@ and varying execution contexts.
\begin{itemize}
\item \texttt{GLIBC}: The Glibc benchmark evaluates the performance of
malloc and free functions in single-threaded, multi-threaded,
\textit{malloc} and \textit{free} functions in single-threaded, multi-threaded,
and emulated multi-threading scenarios using various block sizes and
allocation patterns. It simulates real-world memory usage by partially
deallocating blocks in FIFO order and fully deallocating them in LIFO order.

View File

@@ -2,16 +2,16 @@
- [ ] Check for unessary commas
- [ ] Check references
- [ ] Unify english grammer
- [ ] Text make to italics (For function calls)
- [ ] Space missing from bracket
- [ ] Utlizing to using
- [ ] Small number use word
- [x] Text make to italics (For function calls)
- [x] Space missing from bracket
- [x] Utlizing to using
- [x] Small number use word
- [ ] Check for unusual amount of commas and
String them into a sentence
- [ ] Make all past tense to present tense
- [ ] Comment out future work section
- [ ] Section with always captial S
- [ ] RMM fix reference
- [x] Comment out future work section
- [x] Section with always captial S
- [x] RMM fix reference
** Literature review
- [x] TLB reach needs defining