Moving beyond Arc˂Mutex˂T˃˃ - Katharina Fey

Sdílet
Vložit
  • čas přidán 28. 02. 2023
  • Rust enforces unique lifetime and access bounds to data inside a program and thus impacts how memory must be managed. This is especially relevant for multi-threaded systems or applications where multiple parts may want to access some congested data. In this talk, I will cover some data synchronisation theory in Rust, starting at the common Arc˂Mutex˂T˃˃ pattern, and ending in an exploration of smart pointers and lock-free data structure design.
  • Věda a technologie

Komentáře • 8

  • @brunozimmermann8017
    @brunozimmermann8017 Před rokem +45

    Lockfree crate's author here. I would like to just point out two things:
    1. Lockfree crate's biggest drawback is not replacing the global, blocking allocator by a non-blocking one (that is a feature I ended up never implementing);
    2. Lockfree crate's performance is actually... worse than some of the blocking counterparts in all benchmarks I have written, and so, I would not advise one to use lockfree seeking performance, but rather seeking properties such as being reliable, free from deadlocks, etc.

  • @mikkelens
    @mikkelens Před 5 měsíci +11

    I did not expect to actually understand the practical use and abstracted hardware concepts of Atomics when I started watching this talk, but I am very happy with this outcome!

  • @YannSimon
    @YannSimon Před rokem +7

    I said "consensus" in front of my screen, and you heard it! Crazy technology with space-time travels.

  • @samuelsquire4035
    @samuelsquire4035 Před rokem +6

    Thank you for this talk. In my experience, memory latency is so high that mutexed access to data is a bottleneck. Instead, I shard my data between threads and each thread handles a subset of requests. This can give you embarassingly parallel performance due to the single threaded nature of each shard.

  • @oleksrow
    @oleksrow Před rokem +1

    Nice deep dive!❤

  • @SquirrltheRiddl
    @SquirrltheRiddl Před měsícem

    greaaaaat talk! thx

  • @arubaga
    @arubaga Před měsícem

    At 34:08 it should be // unlock the mutex