Concurrency and Memory Safe System Software Development in Rust

Concurrency and Memory Safe System Software Development in Rust
Slide Note
Embed
Share

A language that prioritizes safety by detecting and flagging various unsafe behaviors at compile time. Its features help in preventing common issues seen in languages like C and C++, making it suitable for developing efficient and secure system software. The course covers topics on concurrency, memory safety, and using Rust for system software development.

  • Rust
  • Concurrency
  • Memory Safety
  • System Software

Uploaded on Feb 16, 2025 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. E81 CSE 542S: Concurrency and Memory Safe System Software Development About Rust Department of Computer Science & Engineering Washington University, St. Louis MO Chris Gill cdgill@wustl.edu 1

  2. Undefined Behavior Common languages like C and C++ allow program behavior that diverges wildly from what s expected E.g., arbitrary modification of memory locations may crash the program, or provide a side channel for a malicious attacker (Stuxnet worm exploited font parsing) Even without a malicious adversary this can be bad Never attribute to malice what can be explained adequately by someone else s feature. Terry Tidwell Concurrency and dynamic memory management increase the opportunities for this attack surface or accident surface Empirical studies (e.g., by Peng Li using modified compilers that can detect such issues) reveal that this is an unfortunately widespread problem in C and C++ programs 2 CSE 542S Concurrency and Memory Safe System Software Development

  3. Safety in Rust Rust detects and flags many kinds of unsafe usage E.g., dangling aliases, double freeing memory, and dereferencing null aliases are all caught at compile time E.g., array and buffer bounds checking at run-time Concurrency hazards like data races are also caught Concurrency safety leans heavily on memory safety features Libraries richly support safe concurrency and synchronization This restricts how (and to a lesser extent what) you can program successfully in Rust Throughout the semester you ll gain experience with that Unsafe code can be declared as such and wrapped with safe code, but only if absolutely necessary and as a last resort 3 CSE 542S Concurrency and Memory Safe System Software Development

  4. Rust for System Software Rust supports production of efficient system software As in C++, if you don t use it you don t pay for it Defaults are efficient but you can also customize Concurrency support exploits modern multicore chips Multiple threads executing in parallel can reduce latency Industrial grade generics and package management and build tools also facilitate code generality and reuse We will survey a number of those features next time 4 CSE 542S Concurrency and Memory Safe System Software Development

  5. Using the Linux Lab Servers Its best to use an SSH key to access school servers Too many bad password authentication attempts can lock you out All compilation, debugging and testing should be done on a Linux Lab cluster machine (not on shell.cec) Issue the qlogincommand from shell.cec.wustl.edu Add commands to your .bashrc file to load the correct version of the Rust tools+libraries at Linux Lab login Details can be found in Studio 1, which is posted early (officially assigned next time, but go ahead and start working on exercises 1-6 in case you need EIT help) 5 CSE 542S Concurrency and Memory Safe System Software Development

More Related Content