A Rust-based Runtime for the Internet of Things
Ladda ner
Typ
Examensarbete för masterexamen
Master Thesis
Master Thesis
Program
Computer systems and networks (MPCSN), MSc
Publicerad
2017
Författare
Adolfsson, Niklas
Nilsson, Fredrik
Modellbyggare
Tidskriftstitel
ISSN
Volymtitel
Utgivare
Sammanfattning
As the number of connected devices increases, known as the Internet of Things (IoT), reliability and security become more important. C and C++ are common programming languages for IoT devices, mostly due to their fine-grained memory management and low runtime overhead. As these languages are not memory-safe and memory management has proven to be difficult to handle correctly, problems such as buffer overflows and dangling pointers are likely to increase as the IoT devices become more prevalent. These problems can result in reliability and security issues. In contrast to C and C++, Rust is a memory-safe systems programming language that, just like C and C++, provides low runtime overhead and fine-grained memory management. Potentially, Rust can reduce the number of unreliable and insecure connected devices as a result of memory safety. Tock is an embedded operating system implemented in Rust, and thus it is inherently safe when it comes to memory management. In this thesis, we investigate if Rust is suitable to develop device drivers. We implement four different device drivers covering a range of functions and evaluate the energy consumption as well as the execution time of our drivers compared to other current state-of-the-art embedded operating systems. These device drivers enhance the usability of Tock for connected devices. With the device drivers, we show that Tock introduces an overhead in terms of execution speed but has a similar energy consumption in comparison to the current state-of-the-art embedded operating systems. Despite the increased runtime overhead, we argue that the benefits of Tock and Rust, i.e., increased reliability and security along with similar power consumption exceeds the negative aspect. Finally, we conclude that Rust and Tock are appropriate for developing device drivers for IoT devices.
Beskrivning
Ämne/nyckelord
Data- och informationsvetenskap , Computer and Information Science