Return to search

Comparing Conventional- and Modern Programming Languages for Developing a File System / Jämförelse av konventionella- och moderna programmeringsspråk för utveckling av ett filsystem

Most of the software stack is built upon C today. C is a very flexible language, but the flexibility also brings some safety risks, particularly when handling memory through pointers. Rust is a new programming language which can guarantee memory safety without performance-heavy runtime services such as garbage collection. In this article, two partial file systems are implemented based on the design of EXT2. One system is implemented in C — Nafs — and one system is implemented in Rust — Rufs. A number of benchmarks are also developed, with the purpose of testing the most common features of a file system. After running the benchmarks, the results showed that Nafs provided better performance for all but one feature. There could be many reasons for this, and some hypotheses are discussed. Aspects like different compiler optimizations, the use of pointer dereferencing vs. data structure representation, using dynamic memory, and using system calls are considered. Some optimizations to Rufs are also implemented, and their impact analyzed. Earlier research has shown that Rust can guarantee memory safety while still providing good performance. It has also shown that Rust can be used to implement system programs, such as operating system kernels. Over the course of this article, it is shown that safe Rust can be used to implement a file system — thereby guaranteeing a memory safe program. It is also shown that a file system implemented in safe Rust provides worse performance than a similar system written in C. Future work will have to tell whether a file system can be as performant in Rust as in C, by using different implementation methods or unsafe Rust for some of the most performance critical parts of the system.

Identiferoai:union.ndltd.org:UPSALLA1/oai:DiVA.org:mau-43451
Date January 2021
CreatorsLaos, Pontus, Libot, Alexander
PublisherMalmö universitet, Institutionen för datavetenskap och medieteknik (DVMT)
Source SetsDiVA Archive at Upsalla University
LanguageEnglish
Detected LanguageEnglish
TypeStudent thesis, info:eu-repo/semantics/bachelorThesis, text
Formatapplication/pdf
Rightsinfo:eu-repo/semantics/openAccess

Page generated in 0.0019 seconds