Thesis Proposal - Rust-based Runtime for Internet-Of-Things Introduction The number of connected devices rapidly increase where traditional physical systems such as refrigerators, cars and toothbrushes are being connected, which is called internet-of-things (IOT) or cyber-physical systems. Today most of the IOT devices are implemented in the C programming language where many low-level details must be explicitly handled. In many cases it is hard to implement the low-level details correctly and it could cost a lot of money and time. When the implementation is not correct it may yield in memory corruption which in turn can end up with unintended execution e.g. write over the interrupt vector or a buffer overflow that can be exploited by attackers. An example of a memory corruption attack was shown back 2011 by a team of researchers where they exploited a buffer overflow vulnerability in the cd-player in the car which resulted in total control of the car [6]. Implementation flaws can potentially result in safety, security and privacy issues. The purpose of this master thesis is to evaluate how to overcome the aforementioned difficulties/problems in order to simplify for the developers as well as improving system dependability and security. Rust [2] is a relatively new systems programming language that is type safe which eliminates memory corruption completely thus it can improve system dependability and security. A runtime for IOT will be developed in Rust and compared to the current state-of-the-art runtimes for IOT devices.

Context Most IOT devices have constraints when it comes to energy, performance and memory. In this thesis, devices with approximately 16-256 kB RAM, 128-1024 kB Flash, no MMU and powered by a battery will be targeted. Thus the available resources are not enough for traditional general purpose operating systems (OS). Due to the nature of IOT devices and where they reside, they must in many cases be able to meet certain timing-constraints, e.g. when implemented in a safety-critical system that handles the braking of a vehicle, which can not be fulfilled by a general purpose OS. This is why IOT devices are running a special type of OS named RTOS (Real-Time Operating System) [5]. RTOS implements a lightweight kernel that handles scheduling of tasks and drivers for hardware e.g. Bluetooth, Timers, Interrupts and similar peripherals devices. One example of a RTOS is TockOS [1] [3] that is implemented in the system programming language Rust. Rust is a memory safe programming language originally developed by Mozilla which, is a potential replacement to the C programming language. Rust is a high-level language with no garbage collector. A garbage collector is non-deterministic background process that automatically de-allocates memory that is not longer in use for the

program. It results in unpredictable behavior when it comes to timing constraints. Due to the lack of such a garbage collector, it makes Rust a candidate for an IOT runtime. Rust uses another object model than commonly used programming languages (C, Java, Python etc) namely that an object can only have a single owner. The object model entails that potential unsafe memory access, race-conditions and similar issues can be detected at compile-time. Rust makes minimal runtime checks and relies on its object model to find issues already at compile-time to achieve as good execution speed as possible. TockOS is a RTOS implemented in Rust which targets Cortex-M based microcontrollers but are missing device drivers such as Bluetooth, UART, and Timers. This thesis aims to extend the TockOS by designing and implementing support for Bluetooth, I2C, UART and CAN. This will enable further evaluation of TockOS as well as the benefits of using Rust in a RTOS. In order to evaluate TockOS/Rust a sample application will be designed and implemented in both Rust and C to perform a comparison between TockOS and state-of-the-art RTOS in C. The implementations will be compared in terms of execution speed, memory allocation and power consumption.

Goals and Challenges The goal of this master thesis is to compare a state-of-the art implementation of RTOS implemented in C with an implementation in Rust. This will be achieved by enabling support for hardware and protocols such as BlueTooth, UART and CAN in TockOS. To evaluate the actual result a sample IOT application will be designed and implemented which uses the previously implemented hardware/protocol. This application should be able to communicate with other devices by utilising the newly implemented support for BlueTooth etc. With this functionality in place, comparison both in terms of performance and design will be possible. The result of the thesis will yield in a runtime for IOT on top of TockOS with support for Bluetooth, UART and CAN. Today's state-of-the-art IOT devices are implemented in C due to performance reasons and to be able to meet timing constraints. No previous work has been performed to compare execution speed, memory allocation and power consumption between IOT devices in C and Rust. Type-safe languages are in general slower than type-unsafe languages because they rely on runtime checks. Further research is interesting since Rust relies on minimal run-time checks due to the fact that it is type-safe. An implementation in Rust it would solve many memory corruption problems and possibly reduce implementation time by allowing for more abstractions as in most high-level languages. If the performance of Rust shows to be sufficient in comparison to C, a shift from C to Rust as “the” system programming language could be highly motivated. In the thesis real hardware will be used, thus it will be a challenge as a first step to configure the development environment which includes hardware, compilers, debuggers, flashers and similar tools. Understanding of the low-level hardware details for the targeted platform is a major milestone to overcome. The biggest challenge should be to implement the kernel drivers which is the main focus of this thesis.

Approach The thesis will be divided into four main phases: research, design, implementation and evaluation.

Research The research will be the main content for the section regarding theory of the thesis. It will cover the programming language Rust itself where the authors will have to be confident and familiar with it in order to understand TockOS. TockOS is an area itself which has to be covered where great understanding of the codebase have to be acquired. Finally the protocols themselves accompanied with the hardware have to be understood before designing and implement them in TockOS.

Design We propose to use development boards equipped with Cortex-M based microcontrollers, Bluetooth, UART, I2C, CAN and functionality to measure power consumption. Three major tasks will be designed: 1. TockOS kernel drivers for Bluetooth, UART, I2C and CAN according to respective standards (RFC). 2. Sample application on top of TockOS and a counterpart i C, that can communicate with another device. 3. Framework to measure execution time, memory allocation and power consumption.

Implementation The tasks mentioned in the design phase will implemented in Rust and C. The goal is to implement the tasks on the development boards by using cross-compilers, flashers and debuggers.

Evaluation The results of the thesis will be evaluated as follows: ● Kernel device drivers will be tested according to respective standard (RFC) for correctness properties. ● The devices drivers will be tested such that they are compatible with “state-of-art” device drivers by communicating with a commercial device (mobile phone). ● Present and compare the results regarding execution time, memory efficiency power consumption between Rust and C implementations.

References [1] Levy, A., Andersen, M. P., Campbell, B., Culler, D., Dutta, P., Ghena, B., ... & Pannuto, P. (2015, October). Ownership is theft: experiences building an embedded OS in rust. In Proceedings of the 8th Workshop on Programming Languages and Operating Systems (pp. 21-26). ACM. http://dx.doi.org/10.1145/2818302.2818306 [2] The Rust programming language http://www.rust-lang.org/ [3] Tock Embedded Operating System http://www.tockos.org/ [4] Foellmi, Claudio. OS Development in Rust. ETH Zürich (2016). http://dx.doi.org/10.3929/ethz-a-010669169 [5] Real-time Operating System https://en.wikipedia.org/wiki/Real-time_operating_system [6] Checkoway, S., McCoy, D., Kantor, B., Anderson, D., Shacham, H., Savage, S., ... & Kohno, T. (2011, August). Comprehensive Experimental Analyses of Automotive Attack Surfaces. In ​USENIX Security Symposium. http://static.usenix.org/events/sec11/tech/full_papers/Checkoway.pdf

Thesis Proposal - Rust-based Runtime for Internet ... -

internet-of-things (IOT) or cyber-physical systems. Today most of .... device drivers by communicating with a commercial device (mobile phone). ○ Present and ...

69KB Sizes 0 Downloads 265 Views

Recommend Documents

Doctoral Thesis Proposal
greatest variance from the top Eigenvectors of the data covariance matrix. .... ing block-level link analysis techniques, an image graph can be constructed. Then, they .... In this section, we relate some tools used in the information visualization.

Master Thesis Proposal
only virtual. State and Atkin (1977) used CDC 6400 which also did not have 64-bit words. The use of 64 bits in nowadays computers becomes wider and wider.

pdf runtime error internet explorer
Download now. Click here if your download doesn't start automatically. Page 1 of 1. pdf runtime error internet explorer. pdf runtime error internet explorer. Open.

Master Thesis Proposal 2016-2017
Scientific advisor. Thomas Gillet ([email protected]). Academic advisor. Vincent Lemort ([email protected]). Description. Over the last decade, vehicle electrification has increased to meet the demands of reducing fuel consumption a

Master thesis proposal: Godunov scheme for the linear ...
Jan 15, 2017 - U ≈ 1m · s−1, L ≈ 106 m, H ≈ 103 m, Ω ≈ 10−4 rad · s−1. In order to exhibit some asymptotic regimes for small Froude and Rossby num-.

Structure of MBA Thesis Research Proposal
Hypotheses are relatively easy to test if your research study is more or less quantitative in nature and if you wish ... What are the best practices in the world and how do they relate to your research issue? ... main data analysis methods and why yo

Doctoral Thesis Proposal An evolutionarily motivated ...
Aug 3, 2010 - 2.3 Teleology to the rescue . .... tions of existing theories to fit data generated in experiments. While this proved useful for mathematicians ...

Thesis Problem Definition Proposal: Motion Planning ...
[email protected]. Categories and Subject Descriptors: I.2.9 [Artificial Intelligence]: Robotics—Biorobotics. General ... so that it could serve well as an personal assistant [Dario et al. 2001]. But the interest on ... Permission to make di

Runtime Array Fusion for Data Parallelism - GitHub
School of Computer Science and Engineering ... collective operations are implemented efficiently and provide a high degree of parallelism, the result of each ...

pre-proposal for finance wg guidelines for proposal -
OB will e recompensed between General Assemblies (GAs); and ... That the General Assembly (GA) authorize the FWG to open a checking account at WECU as ...

Request for Proposal - Ning
Sep 3, 2013 - Synopsis: Enhancing Mobile Populations' Access to HIV and AIDS Services, Information and. Support a 5 year project funded by Big Lottery ...

Runtime Semantic Interoperability for Gathering ...
expertise. Equipment centric network management systems ... by human network administrators. .... administrator-specified goals and maintain their constraints.

request for proposal - AOS92
Feb 26, 2015 - In the event taxes are imposed on the services purchased, the District will not be responsible for payment of the taxes. The vendor shall absorb the taxes entirely. Upon request, the District's Tax Exempt Certificate will be furnished.

request for proposal - AOS92
Feb 26, 2015 - We are currently reducing the number of small printers in our inventory, so any proposal must be able to adjust based on future changes in printer inventory. The AOS92 computing environment consists of approximately 2,000 devices inclu

Arabic Runtime Environment
Our company offers details and updates about wonderful products like how to pay ... Bu video bir Android telefondan yklendi. aricilar ky bingl. Murat inan alyor.

Request for Proposal - Care Nepal
Support a 5 year project funded by Big Lottery Fund, UK, is seeking a consultant / organization to produce a video documentary on role of EMPHASIS in ...

PROPOSAL FOR SOLAR PHOTOVOLTAIC ... - SORGENLOS.de
Dec 31, 2009 - 125 MWp Solar Photovoltaic Power Plant for Manav Sewa. Page 2 ... hand, steps are being taken to tap the renewable energy sources such as ...

Request for Proposal - Care Nepal
Synopsis: Enhancing Mobile Populations' Access to HIV and AIDS Services, Information ... Proven experience in making documentaries on development issues.

Request for Proposal
Nov 20, 2015 - Trade secrets and other proprietary data contained in proposals may be ..... The Town shall provide the bidder a reasonably secured storage space for .... Any bid containing a corporate bidder's certification to the statement of ...

Runtime Evolution for Online Gaming: A Case Study ...
inter-player trading of virtual world artifacts, sale of additional vendor created ... To satisfy the demand for processing resources, clusters of servers are employed ...