General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Mikko Rantalainen
ThePrimeTime
comments
Comments by "Mikko Rantalainen" (@MikkoRantalainen) on "The Unfixable ARM Memory Bug" video.
Using constexpr everywhere is otherwise nice but you cannot have any input, which reduces the usability a little bit.
8
And the more modern version goes like this: there are only three hard things in computer science: naming things, cache invaparalleldation and off by one errors.execution
6
@christopheroliver148 I think preemptive threading is just a small subclass of parallel execution. I would argue that parallel execution even includes stuff like Spectre and Meltdown vulnerabilities.
1
@christopheroliver148 I took "cache invalidation" and "naming things" to be pretty generic, too. Preemptive multithreading is just the part that most programmers have to consider because that's the minimum bar to do any kind of parallel processing that improves performance. I feel preemptive multithreading is the easy part compared to more complex stuff. Especially with x86-64 platform where the architecture has easy-to-use guarantees for memory syncronization. On ARM you have to always execute extra instructions to syncronize even RAM contents between cores because CPU caches are not guaranteed to be synchronous.
1
@gruntaxeman3740 Yes, and you can run different processes on different pieces of hardware. In fact, you may want to do this for redundancy even if you don't need to do it for extra performance. And avoiding races and split heads is really hard when when you want to handle the case where a single computer or network port or a switch suddenly fails or hangs.
1
@gruntaxeman3740 There are multiple solutions to handle multiple threads. You can avoid state machine with locking as long as you always acquire locks in the same order. If you try to use locks and acquire locks in somewhat random order, you''ll end up with a deadlock sooner or later. However, the best implementation depends on the actual algorithm and hardware you're using because performance optimized code always depends on CPU cache implementation these days. And since the cache implementation is not documented, you can only write some code and test it to see how it performs.
1