Rust Atomics and Locks: Low-Level Concurrency in Practice (Paperback)

Bos, Mara

  • 出版商: O'Reilly
  • 出版日期: 2023-02-07
  • 定價: $1,980
  • 售價: 9.5$1,881
  • 貴賓價: 9.0$1,782
  • 語言: 英文
  • 頁數: 220
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1098119444
  • ISBN-13: 9781098119447
  • 相關分類: Rust 語言
  • 立即出貨 (庫存 < 4)

買這商品的人也買了...

商品描述

The Rust programming language is extremely well-suited for concurrency, and its ecosystem has many libraries that include lots of concurrent data structures, locks, and more. But implementing those structures correctly can be very difficult. Even in the most well-used libraries, memory ordering bugs are not uncommon.

In this practical book, Mara Bos, leader of the Rust library team, helps Rust programmers of all levels gain a clear understanding of low-level concurrency. You'll learn everything about atomics and memory ordering and how they're combined with basic operating system APIs to build common primitives like mutexes and condition variables. Once you're done, you'll have a firm grasp of how Rust's memory model, the processor, and the roles of the operating system all fit together.

With this guide, you'll learn:

  • How Rust's type system works exceptionally well for programming concurrency correctly
  • All about mutexes, condition variables, atomics, and memory ordering
  • What happens in practice with atomic operations on Intel and ARM processors
  • How locks are implemented with support from the operating system
  • How to write correct code that includes concurrency, atomics, and locks
  • How to build your own locking and synchronization primitives correctly

商品描述(中文翻譯)

Rust程式語言非常適合並行處理,其生態系統中有許多包含許多並行資料結構、鎖等的函式庫。但是,正確實現這些結構可能非常困難。即使在最常用的函式庫中,記憶體排序錯誤也並不罕見。

在這本實用的書中,Rust函式庫團隊的領導者Mara Bos幫助各級Rust程式設計師清楚了解低層次的並行處理。您將學習有關原子操作和記憶體排序的一切,以及如何將它們與基本的作業系統API結合使用,以建立像互斥鎖和條件變數這樣的常見原語。完成後,您將牢牢掌握Rust的記憶體模型、處理器以及作業系統的角色如何相互配合。

通過這本指南,您將學到:
- Rust的類型系統如何非常適合正確編寫並行程式
- 互斥鎖、條件變數、原子操作和記憶體排序的一切
- 在Intel和ARM處理器上原子操作在實際中發生的情況
- 如何借助作業系統的支援實現鎖
- 如何編寫包含並行處理、原子操作和鎖的正確程式碼
- 如何正確地構建自己的鎖和同步原語

作者簡介

Mara Bos maintains the Rust standard library and builds real time control systems in Rust. As team lead of the Rust library teams, she knows all the ins and outs of the language and the standard library. In addition, she has been working with concurrent real time systems for years at the company she founded. Maintaining the most-used library in the Rust ecosystem and working daily on safety critical systems has given her the hands-on experience to both understand the theory and bring it to practice.

作者簡介(中文翻譯)

Mara Bos 維護 Rust 標準程式庫並使用 Rust 建立即時控制系統。作為 Rust 程式庫團隊的領導,她對語言和標準程式庫的各個細節都非常熟悉。此外,她在自己創辦的公司多年來一直從事並行實時系統的工作。維護 Rust 生態系中使用最廣泛的程式庫並且每天都在處理安全關鍵系統,使她具備了理論和實踐兩方面的實戰經驗。