Qualcomm RTOS Interview Prep Guide
C Language for Embedded
- Pointers: *, &, pointer to pointer, function pointers, pointer arrays.
- Memory Management: malloc, calloc, free, static vs extern vs volatile.
- Bitwise Ops: &, |, ^, ~, <<, >>.
- Structs & Unions: Memory layout, #pragma pack.
- Const & Volatile: const = read-only, volatile = prevent compiler optimization.
RTOS Essentials
- Threads/Tasks: Lifecycle, scheduling (preemptive/cooperative), priority inversion.
- Synchronization: Mutex, Semaphore, Spinlocks, Events.
- IPC: Message Queues, Shared Memory.
- Deferred Work: ISR to deferred callback.
- Stack Management: Overflow detection.
Data Structures in C
- Singly/Doubly Linked List, Stack, Queue, Circular Buffer.
- Trees, Heap.
- Sorting: Insertion, Merge.
Processor Architecture & Memory
- Cache: Write-back vs write-through, DMA coherency.
- Memory Barriers: DMB, DSB, ISB.
- Interrupts: Masking, nesting.
- MMU/MPU: Memory protection.
- Ordering: Strong vs Weak.
Debugging & Toolchain
- LLDB: Breakpoints, Watchpoints, Inspecting memory.
- JTAG: Real-time debugging.
- Profilers: Instruction count, cache miss.
- Simulators/Emulators: Trace memory, test peripherals.
Assembly
- Registers, Basic Ops: MOV, LDR, STR, ADD, SUB, B, BL.
- Stack frame and ISR context switching.
Python in Embedded
- Used for scripting peripherals, log parsing, automation, test harnesses.
Mock Interview Q&A
Q1: What happens if you dereference NULL?
A1: Segmentation fault.
Qualcomm RTOS Interview Prep Guide
Q2: Difference between const int* ptr and int* const ptr?
A2: const int* = read-only data; int* const = constant pointer.
Q3: What is priority inversion?
A3: Low-priority task holds lock needed by high-priority; solved by priority inheritance.
Q4: Use of volatile?
A4: Prevents compiler optimization on shared/hardware variables.
Q5: What happens during context switch?
A5: Save CPU state of current task, restore next.
Q6: How does CPU find ISR?
A6: Vector table points to ISR address.