|
You are here |
fgiesen.wordpress.com | ||
| | | | |
stefansf.de
|
|
| | | | | [AI summary] The provided text discusses the misuse of the `volatile` keyword in C programming and its inability to address concurrency and memory ordering issues. It explains that `volatile` ensures that compiler optimizations do not remove accesses to variables, but it does not guarantee memory visibility or prevent hardware reordering. The text highlights that `volatile` is only suitable for specific use cases like memory-mapped I/O, and that for thread-safe operations, atomic types and memory barriers are necessary. It also covers examples of how `volatile` can lead to incorrect behavior in multi-threaded programs and how C11's memory model and atomic operations provide a more robust solution. | |
| | | | |
www.mikeash.com
|
|
| | | | | [AI summary] The article discusses the use of atomic operations and memory barriers in multithreaded programming, highlighting the importance of these techniques to ensure data consistency and prevent race conditions. It covers the OSAtomic functions in macOS, such as OSAtomicCompareAndSwap32 and OSMemoryBarrier, and explains their role in managing shared data without locks. The text also addresses common pitfalls, like incorrect use of volatile and memory reordering, and emphasizes the need for careful handling of memory access across different CPU architectures. Finally, it touches on the historical context of atomic operations and their relevance in modern computing. | |
| | | | |
dgraph.io
|
|
| | | | | [AI summary] The text provides an in-depth overview of the Ristretto cache library, highlighting its design and features. It discusses the implementation of TinyLFU and Sampled LFU for efficient cache admission and eviction policies, along with optimizations such as bloom filters, metrics tracking, and avoiding false sharing. The text also includes benchmark comparisons with other Go caches and outlines future improvements and potential applications. | |
| | | | |
initialcommit.com
|
|
| | | In this article, we will discuss the difference between Java and JavaScript. The biggest similarity might be... you've guessed it! They both have the word "Java" in their name, which is a type of Indonesian coffee. And the obvious difference is that they are two different programming languages that fulfill different needs on different occasions. | ||