Menu
Sign In Search Podcasts Charts People & Topics Add Podcast API Blog Pricing

Eliza Weisman

๐Ÿ‘ค Speaker
138 total appearances

Appearances Over Time

Podcast Appearances

Oxide and Friends
Crates We Love

And it really depends pretty substantially on the usage patterns, and there is no sort of the right move. So it's useful to document those sort of performance trade-offs and the ways in which this might be suitable for one type of use but not for another.

Oxide and Friends
Crates We Love

And it really depends pretty substantially on the usage patterns, and there is no sort of the right move. So it's useful to document those sort of performance trade-offs and the ways in which this might be suitable for one type of use but not for another.

Oxide and Friends
Crates We Love

I want to point out that Lexopt has in its readme a very nice why and why not section in which it says basically everything the range has told us.

Oxide and Friends
Crates We Love

I want to point out that Lexopt has in its readme a very nice why and why not section in which it says basically everything the range has told us.

Oxide and Friends
Crates We Love

Well, I do really feel like I will be sad if I don't get the opportunity to plug what I feel is the crate that has had the biggest and most profound impact on my life personally. And that crate is Loom, which is pretty different from everything we've discussed so far. This is a crate that Karl Lerka wrote while he was working on the Tokyo scheduler.

Oxide and Friends
Crates We Love

Well, I do really feel like I will be sad if I don't get the opportunity to plug what I feel is the crate that has had the biggest and most profound impact on my life personally. And that crate is Loom, which is pretty different from everything we've discussed so far. This is a crate that Karl Lerka wrote while he was working on the Tokyo scheduler.

Oxide and Friends
Crates We Love

And what Loom is, is a model checker for concurrent Rust programs. And the way that it works is it gives you sort of a set of all of the primitives in standard thread, standard sync atomics, and standard sync mutex, and so on, and a sort of simulated unsafe cell. And the way these things work is that they have basically the same API as the standard library functions,

Oxide and Friends
Crates We Love

And what Loom is, is a model checker for concurrent Rust programs. And the way that it works is it gives you sort of a set of all of the primitives in standard thread, standard sync atomics, and standard sync mutex, and so on, and a sort of simulated unsafe cell. And the way these things work is that they have basically the same API as the standard library functions,

Oxide and Friends
Crates We Love

But rather than actually being like you're spawning a real thread or you're just creating a real single word that you're doing atomic compare and swap operations on, instead what they do is they deterministically simulate all of the potential interleavings of concurrent operations that are permitted by Rust's memory model or the C++ memory model which Rust inherits.

Oxide and Friends
Crates We Love

But rather than actually being like you're spawning a real thread or you're just creating a real single word that you're doing atomic compare and swap operations on, instead what they do is they deterministically simulate all of the potential interleavings of concurrent operations that are permitted by Rust's memory model or the C++ memory model which Rust inherits.

Oxide and Friends
Crates We Love

And this is sort of based on a paper, I believe, that describes a sort of model checker like this for C++. And so what you can do is you can have, like, using some conditional compilation, you can say, normally I want to actually spawn threads or use real atomics or what have you, but when I'm running my tests...

Oxide and Friends
Crates We Love

And this is sort of based on a paper, I believe, that describes a sort of model checker like this for C++. And so what you can do is you can have, like, using some conditional compilation, you can say, normally I want to actually spawn threads or use real atomics or what have you, but when I'm running my tests...

Oxide and Friends
Crates We Love

I want to be able to write these deterministic models that will exhaustively explore all of the permitted interleaving, like the Rust compiler is allowed to emit or allowed to allow the operative scheduler to emit.

Oxide and Friends
Crates We Love

I want to be able to write these deterministic models that will exhaustively explore all of the permitted interleaving, like the Rust compiler is allowed to emit or allowed to allow the operative scheduler to emit.

Oxide and Friends
Crates We Love

then if you use the loom unsafe cell, it will check like, okay, if I have a immutable access from one of the simulated threads, and then this thread yields, and now I'm executing some other thread, and now there's a mutable access to that same unsafe cell, it will then generate a reasonably nice panic,

Oxide and Friends
Crates We Love

then if you use the loom unsafe cell, it will check like, okay, if I have a immutable access from one of the simulated threads, and then this thread yields, and now I'm executing some other thread, and now there's a mutable access to that same unsafe cell, it will then generate a reasonably nice panic,

Oxide and Friends
Crates We Love

And when you do this, you sort of have to sit and run this task for tens of thousands of iterations because this is sort of a combinatorial explosion of potential paths that the model permits through this test that you've written. But the reward for that is that if you've written complex concurrent code like a log-free data structure, you get to learn all of the ways in which you've done it wrong.

Oxide and Friends
Crates We Love

And when you do this, you sort of have to sit and run this task for tens of thousands of iterations because this is sort of a combinatorial explosion of potential paths that the model permits through this test that you've written. But the reward for that is that if you've written complex concurrent code like a log-free data structure, you get to learn all of the ways in which you've done it wrong.

Oxide and Friends
Crates We Love

Which is, I would say, deeply and profoundly humbling. You learn the ways that, like, perhaps you were executing this code in real life on an x86 machine, and you've never seen any of these possible data races because you're running on an x86 machine. but someday your code might be cross-compiled for ARM, and it just so happens that you've used sufficiently relaxed atomic orderings that...

Oxide and Friends
Crates We Love

Which is, I would say, deeply and profoundly humbling. You learn the ways that, like, perhaps you were executing this code in real life on an x86 machine, and you've never seen any of these possible data races because you're running on an x86 machine. but someday your code might be cross-compiled for ARM, and it just so happens that you've used sufficiently relaxed atomic orderings that...