Hardware Transactional Memory - Why You Should Care (Hebrew)
Concurrency in modern computers has changed. Moore’s Law, which observed that “the number of transistors in a dense integrated circuit will double approximately every two years”, is no longer true.
Nowadays, to handle concurrency, modern computers contains more cores that bring more computation power. To maximize such hardware architecture, concurrency programming kicked in. Most of the concurrency models under the hood use locks, so the code becomes serialized in some parts. This brings less throughput & more latency.
HTM (Hardware Transactional Memory) is a new extension to the modern CPU, which helps speeding up multi-threaded software. Databases, Queue & Cache systems, Interpreted languages and more core software elements already support it to gain more speedup.
The most popular language in the world - Java - added (in version 8u40) support for that mechanism by default when the CPU supports it.
So, if I already have it in my core software, and Java has support for it under the hood, why I should care about such “mechanical” stuff?
Well - like any black magic in software, you should be familiar with how it works in order to get the most out of it. And besides - it’s fun!