Question 1
Q1A systems architect is evaluating compilation and linking strategies for a constrained Linux-based Internet of Things (IoT) edge device with limited Flash storage and strict operational memory constraints. The system runs ten separate daemon processes that all rely on a custom cryptography utility library. Which linking strategy provides the most efficient utilization of physical system memory (RAM) across these concurrent processes, and why?
Show answer & explanation
Correct answer: A
Dynamic linking relies on shared libraries (.so files on Linux) where the operating system loader maps the read-only text (code) segment of the library into physical memory only once, sharing pages across multiple independent process virtual address spaces. In contrast, static linking copies the entire library code into each executable binary, duplicating that memory footprint across each running daemon process. While static linking avoids runtime library missing dependencies, it wastes significant RAM and Flash storage when multiple running programs use the same library.