Everything You Need to Know About Multithreading: The Realistic Release Consistency [Part 2]

Written by xylophoon | Published 2020/11/04
Tech Story Tags: multithreading | c++ | assembly | programming | software-development | atomic-swaps | software-engineering | threads

TLDR The most common memory consistency model in practice is release consistency, release consistency. The beauty of this consistency is that while it's much cheaper for systems to implement, given proper locking however, we can formally prove that it is equivalent to sequential consistency. Locks are so essential to release consistency's intuition and implementation and implementation. We can also write a full program that produces this result: <iostream> # include <thread> int id = 0 ; int my_id[ 2 ; int j = 0; int output[ 2 ] ; int output = 1; void func0() { for (;;) return 0; } returnvia the TL;DR App

no story

Written by xylophoon | Xoogler, Ph.d in computer systems. Startuper in the San Francisco bay area.
Published by HackerNoon on 2020/11/04