Skip to content
You are not logged in |Login  
     
Limit search to available items
Record:   Prev Next
Resources
More Information
Bestseller
BestsellerE-book
Author L. Troutwine, Brian.

Title Hands-On Concurrency with Rust : Confidently build memory-safe, parallel, and efficient software in Rust.

Imprint Birmingham : Packt Publishing, 2018.

Item Status

Description 1 online resource (453 pages)
Contents Cover; Title Page; Copyright and Credits; Dedication; Packt Upsell; Contributors; Table of Contents; Preface; Chapter 1: Preliminaries -- Machine Architecture and Getting Started with Rust; Technical requirements; The machine; The CPU; Memory and caches; Memory model; Getting set up; The interesting part; Debugging Rust programs; Summary; Further reading; Chapter 2: Sequential Rust Performance and Testing; Technical requirements; Diminishing returns; Performance; Standard library HashMap; Naive HashMap; Testing with QuickCheck; Testing with American Fuzzy Lop.
Performance testing with CriterionInspecting with the Valgrind Suite; Inspecting with Linux perf; A better naive HashMap; Summary; Further reading; Chapter 3: The Rust Memory Model -- Ownership, References and Manipulation; Technical requirements; Memory layout; Pointers to memory; Allocating and deallocating memory; The size of a type; Static and dynamic dispatch; Zero sized types; Boxed types; Custom allocators; Implementations; Option; Cell and RefCell; Rc; Vec; Summary; Further reading; Chapter 4: Sync and Send -- the Foundation of Rust Concurrency; Technical requirements; Sync and Send.
Racing threadsThe flaw of the Ring; Getting back to safety; Safety by exclusion; Using MPSC; A telemetry server; Summary; Further reading; Chapter 5: Locks -- Mutex, Condvar, Barriers and RWLock; Technical requirements; Read many, write exclusive locks -- RwLock; Blocking until conditions change -- condvar; Blocking until the gang's all here -- barrier; More mutexes, condvars, and friends in action; The rocket preparation problem; The rope bridge problem; Hopper-an MPSC specialization; The problem; Hopper in use; A conceptual view of hopper; The deque; The Receiver; The Sender.
Testing concurrent data structuresQuickCheck and loops; Searching for crashes with AFL; Benchmarking; Summary; Further reading; Chapter 6: Atomics -- the Primitives of Synchronization; Technical requirements; Linearizability; Memory ordering -- happens-before and synchronizes-with; Ordering::Relaxed; Ordering::Acquire; Ordering::Release; Ordering::AcqRel; Ordering::SeqCst; Building synchronization; Mutexes; Compare and set mutex; An incorrect atomic queue; Options to correct the incorrect queue; Semaphore; Binary semaphore, or, a less wasteful mutex; Summary; Further reading.
Chapter 7: Atomics -- Safely Reclaiming MemoryTechnical requirements; Approaches to memory reclamation; Reference counting; Tradeoffs; Hazard pointers; A hazard-pointer Treiber stack; The hazard of Nightly; Exercizing the hazard-pointer Treiber stack; Tradeoffs; Epoch-based reclamation; An epoch-based Treiber stack; crossbeam_epoch::Atomic; crossbeam_epoch::Guard::defer; crossbeam_epoch::Local::pin; Exercising the epoch-based Treiber stack; Tradeoffs; Summary; Further reading; Chapter 8: High-Level Parallelism -- Threadpools, Parallel Iterators and Processes; Technical requirements.
Note Thread pooling.
Summary Writing safe and correct parallel programs is tough. Reasoning about concurrent memory modification is tough; efficiently exploiting the modern computing environment (with its multi-layered caches and deep execution pipelines) is also tough. Most systems programming languages add a further complication: unsafe memory access. The burden on you ...
Local Note eBooks on EBSCOhost EBSCO eBook Subscription Academic Collection - North America
Subject Rust.
Programming languages.
Portable & handheld devices: consumer/user guides.
Mobile phones: consumer/user guides.
Parallel processing.
Programming & scripting languages: general.
Computers -- Programming -- Parallel.
Computers -- Hardware -- Handheld Devices.
Computers -- Programming Languages -- C.
Other Form: Print version: L. Troutwine, Brian. Hands-On Concurrency with Rust : Confidently build memory-safe, parallel, and efficient software in Rust. Birmingham : Packt Publishing, ©2018
ISBN 9781788478359 (electronic bk.)
1788478355 (electronic bk.)