Lock-Free to Wait-Free Simulation in Rust

Lock-Free to Wait-Free Simulation in Rust

In this stream, we start implementing the concurrency algorithm from the academic paper "A Practical Wait-Free Simulation for Lock-Free Data Structures" by Erez Petrank and and Shahar Timnat in Rust. The paper details a general way to turn lock-free concurrent data-structures into wait-free ones. The first half or so of the stream is us going through what problem the paper is solving, and the proposed algorithm, and the second half is us working towards encoding it in Rust. We didn't get all the way there in this video, so there are more videos to come!

In this stream, we start implementing the concurrency algorithm from the academic paper "A Practical Wait-Free Simulation for Lock-Free Data Structures" by Erez Petrank and and Shahar Timnat in Rust. The paper details a general way to turn lock-free concurrent data-structures into wait-free ones (we also talk about what that means), and you can find it at http://cs.technion.ac.il/~erez/Papers/wf-simulation-full.pdf. The first half or so of the stream is us going through what problem the paper is solving, and the proposed algorithm, and the second half is us working towards encoding it in Rust. We didn't get all the way there in this video, so there are more videos to come!

  • 0:00:00 Introduction
  • 0:04:44 Questions about what we'll cover
  • 0:09:04 Lock-based concurrency
  • 0:14:50 Non-blocking concurrency
  • 0:17:30 Wait-freedom
  • 0:19:10 Q&A on concurrency guarantees
  • 0:26:51 What does simulation mean?
  • 0:30:04 What does practical mean?
  • 0:40:19 The fast-path-slow-path method
  • 0:46:02 Going from lock-free to wait-free
  • 0:51:28 Cat time
  • 0:52:09 Q&A on going wait-free
  • 0:54:23 The basic algorithm
  • 1:00:40 Cat time
  • 1:01:29 Q&A on algorithm
  • 1:05:42 The basic algorithm cont'd
  • 1:10:12 Visualizing linked list helping
  • 1:26:15 Challenges
  • 1:32:52 System assumptions
  • 1:34:52 Wait-free algorithm examples
  • 1:37:41 Q&A on algorithm
  • 1:42:00 Intermission
  • 1:44:10 Resuming
  • 1:45:20 Blindly writing the normalized representation
  • 2:28:55 Comparing against the paper
  • 2:59:57 The ABA problem
  • 3:09:23 Q&A on code and ABA
  • 3:17:20 Understanding the normalized representation
  • 3:21:06 Intermission
  • 3:22:40 Fat points for ABA?
  • 3:24:50 Implementing the simulator
  • 3:39:10 Operation records and the help queue
  • 4:07:14 The help state machine: preCAS
  • 4:22:10 The help state machine: executeCAS
  • 4:24:12 The help state machine: postCAS
  • 4:26:23 The help state machine: retrying
  • 4:30:40 Returning the operation output
  • 4:31:12 Tidying up warnings
  • 4:33:15 Monitoring pre/post runs
  • 4:43:30 What's missing in execute?
  • 4:44:49 Q&A for today

rust

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Rust Casting, Shadowing, Consts and Static

A mix of topics of casting, shadowing, constants and static variables inside the Rust Programming Language. This Rust programming language tutorial series is aimed at easing your training step by step.

Rust Zürichsee, April: Gerhard Bräunlich - PyO3 and Rust in action

This presentation was the first experiment with livestreaming of the Rust Zürisee meetup group in Switzerland. Gerhard is sharing parts of his story migratin...

"Rust Isn’t Afraid to be Imperfect as Long as we Ship something Useful"

Steve Klabnik is a member of the Rust core team, an active open-source contributor, and author of The Rust Programming Language, Rails 4 in Action, and Designing Hypermedia APIs books. In 2012 and 2016, we invited Steve to speak at the RailsClub (now RubyRussia) conference. Since then, Steve has been working on Rust a lot, did a lot of interesting things and we realized that we should definitely interview him once again!

Prevent Breaking Code Changes in Future Releases using `non exhaustive` enums in Rust

Hello everyone, recently I have come across a feature in Rust, known as non_exhaustive. It was introduced in Rust 1.40.0 . This attribute prevents source code-breaking changes in projects downstream.

Rust vs Go - Which Is More Popular?

Rust vs Go - Which Is More Popular - Go and Rust are two of the hottest compiled programming languages. I develop in Go full-time and love it, and I'm learning more about Rust recently - its an exc