File:Crust of Rust- Atomics and Memory Ordering.webm

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Crust_of_Rust-_Atomics_and_Memory_Ordering.webm(WebM audio/video file, VP9/Opus, length 2 h 39 min 20 s, 640 × 360 pixels, 223 kbps overall, file size: 253.96 MB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary

[edit]
Description
English: In this episode of Crust of Rust, we go over Rust's atomic types, including the mysterious Ordering enum. In particular, we explore the std::sync::atomic module, and look at how its components can be used to implement concurrency primitives like mutexes. We also investigate some of the gotchas and sometimes counter-intuitive behaviors of the atomic primitives with different memory orderings, as well as strategies for testing for and debugging errors in concurrent code.

0:00:00 Introduction 0:02:03 What are atomics? 0:05:26 The Memory Model 0:07:33 AtomicUsize 0:12:23 Questions so far 0:20:20 Implementing a (bad) Mutex 0:27:39 Our Mutex works! 0:33:04 Pesky thread interleavings 0:39:42 compare_exchange 0:44:54 Mitigating compare_exchange contention 0:50:43 compare_exchange_weak 0:57:02 Ordering::Relaxed 1:12:13 Ordering::Acquire/Release 1:26:00 The fetch_ methods 1:34:07 Ordering::SeqCst 2:00:08 Breather 2:00:40 ThreadSanitizer 2:05:49 loom 2:22:09 Atomic fences 2:27:27 volatile 2:32:18 AtomicPtr 2:35:13 Atomics through FFI 2:36:44 Consume ordering? 2:38:08 Closing thoughts

You can read more about Rust's memory model in the Rust reference at https://doc.rust-lang.org/nightly/reference/memory-model.html and in the C++ memory model documentation at https://en.cppreference.com/w/cpp/atomic/memory_order.

Live version with chat: https://www.youtube.com/watch?v=0Vq2aJxwB1o
Date
Source YouTube: Crust of Rust: Atomics and Memory Ordering – View/save archived versions on archive.org and archive.today
Author Jon Gjengset

Licensing

[edit]
This video, screenshot or audio excerpt was originally uploaded on YouTube under a CC license.
Their website states: "YouTube allows users to mark their videos with a Creative Commons CC BY license."
To the uploader: You must provide a link (URL) to the original file and the authorship information if available.
w:en:Creative Commons
attribution
This file is licensed under the Creative Commons Attribution 3.0 Unported license.
Attribution: Jon Gjengset
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
This file, which was originally posted to an external website, has not yet been reviewed by an administrator or reviewer to confirm that the above license is valid. See Category:License review needed for further instructions.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current20:33, 29 September 20242 h 39 min 20 s, 640 × 360 (253.96 MB)Momiji-Penguin (talk | contribs)Imported media from https://www.youtube.com/watch?v=rMGWeSjctlY

The following page uses this file:

Transcode status

Update transcode status
Format Bitrate Download Status Encode time
VP9 360P 204 kbps Completed 23:14, 29 September 2024 1 h 6 min 53 s
VP9 240P 148 kbps Completed 22:56, 29 September 2024 53 min 23 s
WebM 360P 532 kbps Completed 23:04, 29 September 2024 56 min 30 s
Streaming 144p (MJPEG) 1 Mbps Completed 22:06, 29 September 2024 4 min 32 s
Stereo (Opus) 84 kbps Completed 22:15, 29 September 2024 2 min 45 s
Stereo (MP3) 128 kbps Completed 22:16, 29 September 2024 3 min 35 s

Metadata