Past Meetup

The Salami Method & Weak Memory Concurrency in C/C++11

This Meetup is past

63 people went

Lectures Auditorium - entry floor

Matam Building 23 · Haifa

How to find us

Old Microsoft building, right next to their new one. Free parking near Intel's IDC9.

Location image of event venue

Details

This time, we have an afternoon session with 2 great talks!

Agenda:

17:00 - 17:10: Gathering
17:10 - 18:00: Adi Shavit - The Salami Method
18:00 - 18:10: Break
18:10 - 19:00: Ori Lahav - Weak Memory Concurrency in C/C++11

(Note the short gathering and the tight schedule - our goal is to finish reasonably early)

Talks details:

1. The Salami Method
Be it creating DLLs, Android NDK/JNI, C++ on iOS or even GUI-based desktop apps, many samples, articles, tutorials and examples frequently mix platform specific code with core functionality. While this might serve to demonstrate specific API usage and techniques, it often leads to spaghetti code. The result is a refactoring and maintenance nightmare that is non-portable, untestable with ample nooks and crannies for bugs to hide in. To make things worse, module boundaries (e.g. DLL APIs), are dangerous places where error handling must be considered and addressed carefully as things like exceptions might not be able to percolate further causing program termination or undefined-behavior.
The Salami Method finely distinguishes between the different aspects and layers required for exposing platform-independent C++ on different “specific” platforms. At its extreme it strives to create a single, thin, transparent layer for each such aspect so that each layer is more easily built, tested, debugged, managed and maintained.
I will introduce the Salami Method and show a practical example of using it build a single C++ OpenCV app targeting both the desktop and the web with the same codebase.

Bio
Adi Shavit is an entrepreneur, independent consultant, experienced software architect and a computer vision, image processing, and machine learning expert with an emphasis on real-time applications. He specializes in building cross-platform, high-performance software combined with high production quality and maintainable codebases. He has built many products, apps, and services that leverage OpenCV. Adi has been an OpenCV user and contributor since it was in early beta back in 2000 and even designed the OpenCV logo. Since then, he has been using OpenCV pretty much continuously to build systems and products ranging from embedded, vehicle, and mobile apps, through to desktops and large, distributed, cloud-based servers and services. Adi is the founder of the Core C++ user group (https://www.meetup.com/CoreCpp) and blogs at videocortex.io (http://videocortex.io/). Find him on Twitter (https://twitter.com/adishavit), GitHub or on the C++ Slack (https://cpplang.now.sh/).

2. Weak Memory Concurrency in C/C++11
A memory model defines the semantics of memory accesses in multithreaded programs. For programmers, sequential consistency (i.e., interleaving-based semantics) is considered as the simplest model. However, naive sequential consistency is too costly to implement, and, in fact, designing a satisfactory memory model is highly challenging, as one has to carefully balance the conflicting desiderata of programmers, compilers, and hardware. In this talk I'll introduce the C/C++ formal concurrency memory model from 2011 and the key ideas behind it. I will discuss some of the flaws of the model, ways of correcting it, and some remaining open problems.

Bio
Ori Lahav is a senior lecturer at the Blavatnik School of Computer Science at Tel Aviv University (starting Oct'17). Beforehand, Ori was a postdoctoral researcher at Max Planck Institute for Software Systems (MPI-SWS). He obtained his Ph.D. from Tel Aviv University in 2014 under the guidance of Prof. Arnon Avron. His research interests include programming languages, concurrency, formal methods and verification, semantics and logic.