Digitala Vetenskapliga Arkivet

Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Improvements to memory management infrastructure for Scala Native: Porting MMTk for Garbage Collection
KTH, School of Electrical Engineering and Computer Science (EECS).
2024 (English)Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE creditsStudent thesisAlternative title
Förbättringar av minnet förvaltningsinfrastruktur för Scala Native : Portering av MMTk för Garbage Collection (Swedish)
Abstract [en]

This thesis investigates the feasibility and implications of integrating the Memory Management Toolkit (MMTk) into Scala Native, specifically through porting MMTk’s Immix garbage collector. The exploration is driven by the need for efficient memory management in Scala Native, a system that compiles Scala code to native machine code, diverging from traditional JVM- based execution. Existing garbage collectors, including Scala Native’s original Immix implementation, present limitations in uncooperative environments. The method adopted involves a detailed process of porting, with a focus on understanding and overcoming the interoperability challenges between Scala Native and MMTk, written in C/C++, and Rust respectively. The approach included adapting MMTk’s garbage collection strategies to Scala Native’s runtime and evaluating the performance through benchmark comparisons with Scala Native’s own Immix garbage collector. Contrary to expectations of significant advancements, the results revealed a nuanced outcome. While porting MMTk’s Immix to Scala Native was successful, indicating the feasibility of such an integration, the performance improvements were not uniformly superior. The exploratory nature of this work highlights the complexities and challenges in porting garbage collectors to uncooperative environments. It also opens up discussions on the potential for future optimizations and the integration of more sophisticated garbage collectors from MMTk into Scala Native. By successfully integrating MMTk’s Immix, it lays the groundwork for future research and development in this area, potentially leading to more efficient memory management solutions in uncooperative environments like Scala Native. It provides a foundation for further exploration and optimization, offering insights into the trade-offs involved in such integrations.

Abstract [sv]

Denna avhandling undersöker genomförbarheten och konsekvenserna av att integrera Memory Management Toolkit (MMTk) i Scala Native, specifikt genom att porta MMTks Immix skräpsamlare. Utforskningen drivs av behovet av effektiv minneshantering i Scala Native, ett system som kompilerar Scala- kod till infödda exekverbara filer, avvikande från traditionell JVM-baserad exekvering. Befintliga skräpsamlare, inklusive Scala Natives ursprungli- ga Immix-implementering, uppvisar begränsningar i icke-förvaltade, icke- samarbetsvilliga miljöer. Den antagna metoden innebär en detaljerad portningsprocess, med fokus på att förstå och övervinna interoperabilitetsutmaningarna mellan Scala Native och MMTk, skrivna i C/C++ respektive Rust. Tillvägagångssättet inkluderade att anpassa MMTks strategier för skräpsamling till Scala Natives körtid och utvärdera prestanda genom jämförelser med Scala Natives egen Immix skräpsamlare. Till skillnad från förväntningarna om betydande framsteg avslöjade resultaten ett nyanserat utfall. Även om portningen av MMTks Immix till Scala Native var framgångsrik, vilket indikerar genomförbarheten av en sådan integration, var prestandaförbättringarna inte enhetligt överlägsna. Det utforskande arbetets natur belyser komplexiteten och utmaningarna med att porta skräpsamlare till icke-samarbetsvilliga miljöer. Det öppnar även upp diskussioner om potentialen för framtida optimeringar och integration av mer sofistikerade strategier för skräpsamling från MMTk i Scala Native. Genom att framgångsrikt integrera MMTks Immix lägger det grunden för framtida forskning och utveckling inom detta område, vilket potentiellt kan leda till mer effektiva lösningar för minneshantering i icke-samarbetsvilliga miljöer som Scala Native. Det ger en grund för ytterligare utforskning och optimering och erbjuder insikter i de avvägningar som är involverade i sådana integrationer.

Place, publisher, year, edition, pages
2024. , p. 92
Series
TRITA-EECS-EX ; 2024:799
Keywords [en]
Scala Native, Memory Management, Garbage collection, MMTk, Immix, Performance Benchmarking, Software Engineering
Keywords [sv]
Scala Native, Minneshantering, Sopinsamling, MMTk, Immix, Prestandamät- ning, Mjukvaruteknik
National Category
Computer and Information Sciences
Identifiers
URN: urn:nbn:se:kth:diva-360238OAI: oai:DiVA.org:kth-360238DiVA, id: diva2:1939139
External cooperation
EPFL, Switzerland
Supervisors
Examiners
Available from: 2025-02-25 Created: 2025-02-20 Last updated: 2025-02-25Bibliographically approved

Open Access in DiVA

fulltext(1299 kB)81 downloads
File information
File name FULLTEXT02.pdfFile size 1299 kBChecksum SHA-512
2a0d3902addb5b787a8faf5a6cf6832f822dc3c88a0f72110c379adaa139dadcf3fa8c0c37d3cb575f3f40009f2fb0a2ac2b2a64f72519ea9acdd058ac54c376
Type fulltextMimetype application/pdf

By organisation
School of Electrical Engineering and Computer Science (EECS)
Computer and Information Sciences

Search outside of DiVA

GoogleGoogle Scholar
Total: 81 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 679 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf