As part of standardization, a proposal for Structured Concurrency (http://wg21.link/p2300) will be discussed. The proposed components are a bit abstract, and it requires some explanation of how things fit together. This presentation will discuss and demonstrate the implementation of a simple networking application using sender/receivers. In particular, the presentation will show:
- How to build asynchronous tasks using senders/receivers.
- How cancellation is integrated.
- Some aspects of the underlying implementation.
- Highlights of the proposed standard's positive properties.
---
Dietmar Kühl
Dietmar Kühl is a senior software developer at Bloomberg L.P. working
on the data distribution environment used both internally and
by enterprise installations at clients. Before joining Bloomberg
he has done mainly consulting for software projects in the
finance area. He is a regular attendee of the ANSI/ISO C++
standards committee, presents at conferences, and he used to
be a moderator of the newsgroup comp.lang.c++.moderated. He
frequently answers questions on Stackoverflow.
---
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk
Parallelism Safety-Critical Guidelines for C++ - Michael Wong, Andreas Weis, Ilya Burylov & Christof Meerwald - CppCon 2022
https://github.com/CppCon/CppCon2022
There are many C++ safety guidelines, including the C++ Core Guidelines, MISRA, AUTOSAR, JSF, CERT, High Integrity C++. But most of these either have no coverage of parallelism and concurrency safety or very little.
Part of this is due to the lack of experts that cover both the parallelism and concurrency domain, where high performance is the key focus, as well as the safety domain, which often can be counter to performance.
The next revision of MISRA C++ is heavily anticipated, with the first batch of rules being moved into public review in 2022. What you may not know is that there is also a group working on C++ parallel concurrency safety rules to be issued alongside the next MISRA C++.
C++ Core Guidelines also has a small section on parallelism and concurrency but it is small compared to the guidelines on sequential execution. Last year, we announced our intention to divide some of the rules found in this Misra parallel C++ safety group into both C++ CG and MISRA.
As many in the industry head towards multicore, manycore, and heterogeneous architectures, especially the case in the automotive, medical, and engineering industries, there has been increasing demands for these kinds of guidelines. However, most safety rules tend to focus only on sequential code. This WG within MISRA C++ in cooperation with C++ Core Guidelines is attended by safety experts with a parallelism background attempting to unify these guidelines.
This talk will take a look into the future and speak of some of the challenges we see with newer parallelism features from C++20 and beyond, analyzing potential issues in the context of safety-critical software and how they could be addressed by future rules. We will also summarize the latest progress of the group, reviewing the rules that have the potential of entering MISRA NEXT, or C++ CG covering parallelism features up to and including C++17.
---
Michael Wong
Michael Wong is a Distinguished Engineer at Codeplay Software, a Scottish company that produces compilers, debuggers, runtimes, testing systems, and other specialized tools to aid software development for heterogeneous systems, accelerators, and special purpose processor architectures, including GPUs and DSPs. For twenty years, he was the Senior Technical Strategy Architect for IBM compilers. Michael is also Chair of the Khronos C++ Heterogeneous Programming language SYCL, Editor for the Concurrency TS and the Transactional Memory TS, Canadian Head of Delegation to the ISO C++ Standard, Founding member of the ISO C++ Directions group, Director and VP of ISOCPP.org and Chair of al Programming Languages for Canada’s Standard Councils.
---
Andreas Weis
Andreas Weis has been writing C++ code in many different domains, from real-time graphics, to distributed applications, to embedded systems. As a library writer by nature, he enjoys writing portable code and exposing complex functionalities through simple, richly-typed interfaces. Both of which C++ allows him to do extensively. Andreas is also one of the co-organizers of the Munich C++ User Group, which allows him to share this passion with others on a regular basis.
He currently works for Woven Planet, where he focuses on building modern software for use in safety critical systems.
---
Ilya Burylov
Ilya is an architect of C++ software solutions for autonomous driving market. He is working on contribution into functional safety standard MISRA and C++ standard bodies in threading and vectorization.
Ilya has contributed into various Intel software products such as Intel DAAL and Intel MKL.
---
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk
Algorithmic Complexity, Data Locality, Parallelism, and Compiler Optimizations, Seasoned with Some Concurrency - A Deep Dive into C++ Performance - Avi Lachmish - CppCon 2022
https://github.com/CppCon/CppCon2022
In C++, efficiency is usually the name of the game, so what can we do to make sure we are ahead of the game?
In this talk, we will focus on the selection of algorithms and data structures and analyze their effect on program performance.
We will discuss the importance of data locality, proper data structures, and using the stack vs. heap for our runtime efficiency.
Taking into consideration tradeoffs such as space complexity vs. time complexity and setup-time vs. run-time.
We will present benchmarks that would widen our perspective on those considerations.
Concurrency and parallelism will also be added to the mixture, making sure to conclude also for a multithreaded environment.
---
Avi Lachmish
Avi is an expert in Web and networking technologies, operating systems, and software development methodologies. Avi has extensive experience in C++, object-oriented analysis, design and distributed architectures.
---
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk
An Introduction to Multithreading in C++20 - Anthony Williams - CppCon 2022
https://github.com/CppCon/CppCon2022
Where do you begin when you are writing your first multithreaded program using C++20? Whether you've got an existing single-threaded application, or you're starting from scratch, C++20 provides the basic tools to help. In this talk we'll look at the C++20 facilities you should reach for first, and how to use them safely.
---
Anthony Williams
Anthony Williams’ primary area of expertise is in the development of multi-threaded applications and libraries in C++. Anthony is the author of C++ Concurrency in Action, published by Manning. He is a UK-based developer and trainer with over 20 years of experience in C++.
Anthony has been an active member of the BSI C++ Standards Panel since 2001, and is author or coauthor of many of the C++ Standards Committee papers that led up to the inclusion of the thread library in the C++11 Standard. He continues to work on new facilities to enhance the C++ concurrency toolkit, both with standards proposals, and implementations of those facilities.
Anthony lives in the far west of Cornwall, England, where he currently spends most of his time developing automotive software for Woven Planet.
---
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk
C++ Concurrency TS 2 Use Cases and Future Direction - Michael Wong, Maged Michael, Paul McKenney - CppCon 2022
https://github.com/CppCon/CppCon2022
C++ Concurrency TS 2 has been approved, and is now accumulating content. It already contains two major sections covering hazard pointers and RCU. Because hazard pointers and RCU both have a long and rich history of implementation and use, minimal versions of both are also being proposed for inclusion in C++26. Both RCU and hazard pointers have more advanced features but they are confined to TS 2, and independent reference implementations of these advanced features are in progress. This talk will focus on additional use cases for RCU and hazard pointer and potential additions to TS 2.
Potential TS 2 additions include asymmetric fences, snapshot_ptr (also known as latest or cell), concurrent counters, concurrent queues, and synchronized <T>. TS 2 might therefore include concurrent data structures as well as the existing hazard pointers and RCU safe/deferred-reclamation techniques.
Next, we will describe hazard pointers can be used to replace slow and contended code (e.g., using shared_mutex and shared_ptr) to equivalent fast and scalable code using Concurrency TS 2 support.
Last, but hopefully not least, we will describe the phased-state-change RCU use case that can be used to create synchronization primitives that have RCU-reader-like overhead on fast paths. Of course, there is no free lunch in concurrency, so this also means that slow paths have RCU-grace-period-like latencies. This use case will be illustrated with a fast-readers reader-writer lock.
---
Michael Wong
Michael Wong is a Distinguished Engineer at Codeplay Software, a Scottish company that produces compilers, debuggers, runtimes, testing systems, and other specialized tools to aid software development for heterogeneous systems, accelerators, and special purpose processor architectures, including GPUs and DSPs. For twenty years, he was the Senior Technical Strategy Architect for IBM compilers. Michael is also Chair of the Khronos C++ Heterogeneous Programming language SYCL, Editor for the Concurrency TS and the Transactional Memory TS, Canadian Head of Delegation to the ISO C++ Standard, Founding member of the ISO C++ Directions group, Director and VP of ISOCPP.org and Chair of al Programming Languages for Canada’s Standard Councils.
---
Maged Michael
Maged Michael is a software engineer at Meta Platforms (Facebook). He is the inventor of hazard pointers, lock-free malloc and several algorithms for concurrent data structures. He received a Ph.D. in computer science from the University of Rochester. He is an ACM Distinguished Scientist. He is an elected member of the Connecticut Academy of Science and Engineering. He received the 2014 ACM SIGPLAN Most Influential PLDI Paper Award for his paper on Scalable Lock-Free Dynamic Memory Allocation and the 2022 Dijkstra Prize for his 2004 paper "Safe Memory Reclamation for Dynamic Lock-Free Objects Using Atomic Reads and Writes".
---
Paul McKenney
Paul E. McKenney has been coding for almost four decades, more than half of that on parallel hardware, where his work has earned him a reputation among some as a flaming heretic. Paul is at Meta Platforms (Facebook), where he maintains the RCU implementation within the Linux kernel, where the variety of workloads present highly entertaining performance, scalability, real-time response, and energy-efficiency challenges. Paul was previously an IBM Distinguished Engineer at the IBM Linux Technology Center. Prior to that, he worked on the DYNIX/ptx kernel at Sequent, and prior to that on packet-radio and Internet protocols (but long before it was polite to mention Internet at cocktail parties), system administration, business applications, and real-time systems. His hobbies include what passes for running at his age along with the usual house-wife-and-kids habit.
---
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk
HPX - A C++ Library for Parallelism and Concurrency - Hartmut Kaiser - CppCon 2022
https://github.com/CppCon/CppCon2022
With the advent of modern computer architectures characterized by -- amongst other things -- many-core nodes, deep and complex memory hierarchies, heterogeneous subsystems, and power-aware components, it is becoming increasingly difficult to achieve best possible application scalability and satisfactory parallel efficiency. The community is experimenting with new programming models that rely on finer-grain parallelism, and flexible and lightweight synchronization, combined with work-queue-based, message-driven computation. The recently growing interest in the C++ programming language in industry and in the wider community increases the demand for libraries implementing those programming models for the language.
In this talk, we present HPX -- A C++ Standards Library for Parallelism and Concurrency that is built around lightweight tasks and mechanisms to orchestrate massively parallel (and -- if needed -- distributed) execution. We also implement a full set of standard parallel algorithms and related asynchronous extensions to those. The library enables an asynchronous execution model that uses the concept of (Standard C++) futures to make data dependencies explicit, employs explicit and implicit asynchrony to hide latencies and to improve utilization, and manages finer-grain parallelism with a work-stealing scheduling system enabling automatic load balancing of tasks. Lately we have been experimenting with the new sender/receiver model that is currently being discussed as part of the C++ standardization process.
HPX is a C++ library exposing a higher-level parallelism API that is fully conforming to the existing C++11/14/17/20 standards and is aligned with the ongoing standardization work. This API and programming model has shown to enable writing highly efficient parallel applications for heterogeneous resources with excellent performance and scaling characteristics. This talk will highlight the implemented extensions to the C++ standard parallel algorithms and shows recent performance results.
---
Hartmut Kaiser
Hartmut is a research professor at Louisiana State Universities Center for Computation and Technology (CCT). He is probably best known for his involvement in open-source software projects, such as being the author of several C++ libraries he has contributed to Boost, which are in use by thousands of developers worldwide. His current research is focused on leading the STE||AR group at CCT working on the practical design and implementation of future execution models and programming methods. His research interests are focused on the complex interaction of compiler technologies, runtime systems, active libraries, and modern system's architectures. His goal is to enable the creation of a new generation of scientific applications in powerful, though complex environments, such as high-performance computing, distributed and grid computing, spatial information systems, and compiler technologies.
__
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk