Software Timer 분석 — Daemon Task·자료구조·ISR-Safe API
FreeRTOS Software Timer 내부를 따라가며 daemon task 구조, sorted list와 timer wheel 자료구조, one-shot/auto-reload 동작, xTimerStartFromISR과 xTimerPendFunctionCall을 통한 ISR 워크 deferral을 정리합니다.
Tech articles, book reviews, and presentations.
페이지 45 / 73
FreeRTOS Software Timer 내부를 따라가며 daemon task 구조, sorted list와 timer wheel 자료구조, one-shot/auto-reload 동작, xTimerStartFromISR과 xTimerPendFunctionCall을 통한 ISR 워크 deferral을 정리합니다.
ARM LDREX/STREX exclusive monitor와 ARMv8.1 LSE를 출발점으로 SMP spinlock 구현을 따라갑니다. test-and-test-and-set, ticket lock, MCS lock의 fairness와 cache bouncing trade-off, WFE/SEV로 만드는 저전력 spin을 정리합니다.
FreeRTOS 11 SMP와 Zephyr SMP를 단일 ready list와 per-CPU ready list 두 축으로 비교합니다. task affinity, IPI, cross-core wake, cache coherency 경계까지 설계 관점에서 정리합니다.
임베디드 가장 흔한 silent bug가 스택 오버플로우입니다. FreeRTOS canary, MPU region 기반 hardware 보호, high-water mark 측정, 정적 분석 도구까지 다층 방어 전략을 정리합니다.
같은 크기 객체를 다수 alloc/free하는 패턴을 위한 fixed-size pool입니다. free list 구조, O(1) 보장, per-class pool, lock-free 변형까지 실전 패턴을 정리합니다.
모든 RTOS 객체를 컴파일 타임에 fixed로 두는 패턴입니다. FreeRTOS Static API, Zephyr 매크로, linker section 배치, MISRA/DO-178C 호환성까지 정리합니다.
Masmano 2004의 TLSF 알고리즘을 풀어봅니다. Bitmap과 CLZ 명령으로 alloc·free·coalesce 모두 O(1)을 보장하며, 자동차·로봇·RT 게임의 표준 dynamic allocator가 된 이유를 살펴봅니다.
FreeRTOS가 제공하는 다섯 가지 heap 구현을 source 수준에서 비교합니다. heap_1의 bump부터 heap_5의 multi-region까지, 실시간성과 단편화 관점에서 어떤 워크로드에 어떤 구현이 맞는지 정리합니다.
동적 할당의 한계와 fragmentation, WCET-bounded allocator, safety-critical 기준을 살펴봅니다.
FreeRTOS 10+ 추가된 Stream/Message Buffer. Lock-free SPSC ring buffer로 queue보다 10배 빠른 IPC. ISR-safe variant, byte stream vs variable-length frame의 선택.