Semaphore Overview (C++)

Semaphore Overview (C++)

Semaphore is a very important synchronization mechanism in concurrent programming (multithreading/multiprocessing), used to control access to shared resources by multiple threads or processes, preventing issues such as race conditions, data inconsistency, or deadlocks. 1. What is a Semaphore? ✅ Definition: A semaphore is a synchronization tool used to control access to shared resources by multiple … Read more

Semaphore Special Topic (C)

Semaphore Special Topic (C)

A semaphore is a mechanism used for inter-process synchronization and mutual exclusion, widely applied in multithreaded programming and operating systems. Semaphores can control access to shared resources, ensuring that multiple processes or threads can orderly use these resources, avoiding race conditions. 1. What is a Semaphore? ✅ Definition: A semaphore is a synchronization mechanism used … Read more

Implementing a Read-Write Spinlock in C++11 – Part 2 (Memory Order)

Implementing a Read-Write Spinlock in C++11 - Part 2 (Memory Order)

When implementing locks, it is necessary to ensure the memory order semantics of the lock: generally, an acquire memory order is required when acquiring the lock, and a release memory order is required when releasing the lock. This acquire-release semantics guarantees that memory read and write operations in the critical section do not get reordered … Read more

Lock Mechanisms from Microcontrollers to Linux

Lock Mechanisms from Microcontrollers to Linux

In concurrent programming development, lock mechanisms are core technologies to ensure data consistency and thread safety. Whether in resource-constrained microcontroller environments or feature-rich Linux systems, lock mechanisms play a crucial role. Lock Mechanisms What is a Lock Mechanism? A lock mechanism is a synchronization primitive used to control access to shared resources by multiple execution … Read more

In-Depth Analysis of Typical Issues When Synchronizing Multiple Σ-Δ ADCs

In-Depth Analysis of Typical Issues When Synchronizing Multiple Σ-Δ ADCs

This article introduces traditional methods for synchronizing distributed data acquisition systems based on SAR ADCs and sigma-delta (Σ-Δ) ADCs, and discusses the differences between these two architectures. We will also explore typical inconveniences encountered when synchronizing multiple Σ-Δ ADCs. Finally, we propose an innovative synchronization method based on the AD7770 sample rate converter (SRC), demonstrating … Read more

Detailed Explanation of Thread Programming: From Basics to Embedded Practice

Detailed Explanation of Thread Programming: From Basics to Embedded Practice

1. Introduction: Why Do We Need Threads? In the previous two documents, we explored the concept of processes, address space, and inter-process communication mechanisms. While processes provide the foundation for multitasking programming, in certain scenarios, the process model can be too heavyweight. Imagine if an application needs to handle multiple concurrent tasks simultaneously; creating a … Read more

C Language Multithreading Programming: From Beginner to Proficiency, Understand It Thoroughly in One Article

C Language Multithreading Programming: From Beginner to Proficiency, Understand It Thoroughly in One Article

Follow and star our public account for direct access to exciting content Content 1. Basic Concepts of Multithreading 1. What is a Thread? A thread is the smallest unit of execution in a program, representing an independent execution path within a process. A process can contain multiple threads that share the process’s memory space (such … Read more

AI Robots Perform Formation March Without Protection: What Cutting-Edge Technologies Are Behind It?

AI Robots Perform Formation March Without Protection: What Cutting-Edge Technologies Are Behind It?

You may have never thought that one day, the precision of robots marching in formation would make human instructors feel ashamed. This is not a scene from a science fiction movie. On August 14, 2025, under the dome of the National Speed Skating Hall in Beijing, 25 accelerated evolution BoosterT1 robots appeared in a 5×5 … Read more

Introduction to C++ Multithreaded Concurrent Programming

Introduction to C++ Multithreaded Concurrent Programming

Introduction: Why Do We Need Concurrency? In today’s world, where Moore’s Law is slowing down, the improvement of single-core performance has reached a bottleneck. CPU manufacturers have turned to multi-core architectures, which means modern computers generally have multiple cores capable of executing multiple computational tasks simultaneously. To fully utilize these hardware resources, concurrent programming has … Read more

Index of FreeRTOS Tutorials

Index of FreeRTOS Tutorials

1. Design of FreeRTOS Task Data Structures This article discusses the basic unit of resource management in FreeRTOS – the task data structure, providing readers with a macro understanding of task (process) management in embedded operating systems. Medical Engineering Notes, WeChat Official Account: Medical Engineering Notes FreeRTOS Core Mechanism Analysis: Task Structure Design 2. FreeRTOS … Read more