













































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This practice exam measures competency in contributing to the Zephyr RTOS project. Coverage includes RTOS architecture, device drivers, Kconfig usage, board bring-up, Zephyr build system operations, and debugging embedded applications. Candidates complete tasks such as fixing kernel issues, configuring device trees, writing extensions, optimizing real-time behavior, and following Zephyr’s contribution workflow. Emphasis is placed on code quality, maintainability, and adherence to community standards.
Typology: Exams
1 / 85
This page cannot be seen from the preview
Don't miss anything!














































































Question 1. Which Zephyr kernel design principle allows the application and kernel to be combined into a single binary image? A) Microkernel architecture B) Monolithic image design C) Hybrid kernel model D) Distributed kernel approach Answer: B Explanation: Zephyr uses a unified monolithic image where the application and kernel are linked together, simplifying deployment on constrained devices. Question 2. What is the primary benefit of Zephyr’s compile‑time configuration system? A) Allows runtime module loading B) Reduces binary size by eliminating unused features C) Enables dynamic memory allocation of kernel objects D) Provides automatic over‑the‑air updates Answer: B Explanation: Compile‑time configuration lets developers include only needed kernel features, minimizing footprint for resource‑constrained targets. Question 3. Which hardware architecture is not officially supported by Zephyr? A) ARM Cortex‑M B) RISC‑V C) MIPS D) x Answer: C Explanation: As of the current release, Zephyr supports ARM, RISC‑V, and x86, but MIPS support is not part of the official port list.
Question 4. In Zephyr, what tool is used to manage multiple repositories and to invoke the build system? A) make B) west C) bazel D) gradle Answer: B Explanation: The west meta‑tool handles repository fetching, environment setup, and forwards commands to CMake for building. Question 5. Which file format does Zephyr use to describe hardware resources such as GPIOs and UARTs? A) JSON B) XML C) Device Tree Source (DTS) D) INI Answer: C Explanation: Zephyr adopts the Device Tree Source format, allowing hardware description in .dts and .dtsi files. Question 6. How can a developer apply a peripheral configuration overlay without modifying the board’s original DTS file? A) Edit the kernel source directly B) Create a Device Tree Overlay (DTO) and pass it to the build system C) Use runtime API calls to reconfigure pins D) Recompile the bootloader only
C) thread_spawn() D) os_thread_new() Answer: B Explanation: Zephyr implements a subset of the POSIX pthread API, allowing pthread_create() for compatible applications. Question 10. What is the purpose of a binary semaphore in Zephyr? A) Count multiple resources B) Protect a critical section with ownership tracking C) Signal a single event between threads D) Transfer data buffers between threads Answer: C Explanation: A binary semaphore holds only 0 or 1 and is used to signal a single occurrence, such as an ISR notifying a thread. Question 11. Which Zephyr primitive is best suited for transferring variable‑length messages between threads? A) k_queue B) k_fifo C) k_pipe D) k_mem_slab Answer: C Explanation: k_pipe provides a byte‑stream interface that can handle variable‑length data, unlike queues or FIFOs which work with discrete objects. Question 12. How does Zephyr implement “interrupt bottom half” processing? A) Directly inside the ISR
B) Using a dedicated high‑priority thread C) Via the meta‑IRQ scheduler and workqueues D) By disabling interrupts globally Answer: C Explanation: The meta‑IRQ scheduler defers non‑time‑critical work to a workqueue, acting as the “bottom half” of an interrupt. Question 13. Which compile‑time macro registers an ISR in the device tree? A) ISR_DECLARE() B) IRQ_CONNECT() C) ISR_REGISTER() D) IRQ_HANDLED() Answer: B Explanation: IRQ_CONNECT() binds an ISR to an interrupt line and configures its priority based on device‑tree information. Question 14. What Zephyr feature provides hardware‑level memory protection for user‑mode threads? A) Kernel Object Access Control (KOAC) B) Memory Protection Unit (MPU) integration C) Stack Guard Pages D) Virtual Memory Manager (VMM) Answer: B Explanation: Zephyr can configure the MPU at build time to enforce access rights for user‑mode threads, preventing illegal memory accesses. Question 15. Which Zephyr API checks for stack overflow in a thread?
Question 18. How does Zephyr’s power management framework typically reduce power consumption? A) By increasing CPU clock speed B) By disabling unused peripherals and entering low‑power states C) By disabling the kernel scheduler D) By forcing all threads to run at highest priority Answer: B Explanation: The power management subsystem can suspend peripherals and put the CPU into sleep or deep‑sleep modes when idle. Question 19. Which Zephyr networking stack component handles IPv6 Neighbor Discovery? A) net_ipv4.c B) net_ipv6.c C) net_nbr.c D) net_mld.c Answer: C Explanation: net_nbr.c manages neighbor tables for both IPv4 and IPv6, including IPv6 ND. Question 20. What is the primary purpose of the Zephyr Bluetooth Mesh subsystem? A) To provide classic Bluetooth audio streaming B) To enable low‑power, many‑to‑many device communication C) To implement Wi‑Fi Direct connections D) To replace the BLE GATT profile Answer: B Explanation: Bluetooth Mesh is designed for scalable, low‑power networking of many devices, typical in IoT deployments.
Question 21. Which Zephyr security feature ensures that only signed firmware images can be executed at boot? A) Stack canaries B) Secure boot support C) Runtime code signing D) Kernel object authentication Answer: B Explanation: Zephyr’s secure boot verifies digital signatures of firmware images before handing control to the kernel. Question 22. Which functional safety standard is most closely associated with automotive electronic systems? A) IEC 61508 B) ISO 27001 C) ISO 26262 D) NIST SP 800‑ 53 Answer: C Explanation: ISO 26262 addresses functional safety for automotive electrical/electronic systems. Question 23. In Zephyr testing, which tool orchestrates test execution across multiple platforms? A) CTest B) Twister C) Jenkins D) GTest Answer: B
D) No such feature; history is volatile only Answer: D Explanation: Zephyr’s shell keeps history in RAM; it is lost on power‑off. Persistent history is not currently supported. Question 27. Which license governs contributions to the Zephyr Project? A) GPL‑2. B) MIT C) Apache‑2. D) BSD‑ 3 - Clause Answer: C Explanation: Zephyr is released under the Apache License 2.0, which also applies to contributed code. Question 28. What does the “Signed‑off‑by:” line in a commit indicate? A. That the commit has been reviewed by a maintainer B. That the author certifies the contribution follows the DCO C. That the code is signed with a GPG key D. That the commit is ready for release Answer: B Explanation: The “Signed‑off‑by:” line confirms the author agrees to the Developer Certificate of Origin. Question 29. Which Git command creates a new topic branch named feature/uart from the current HEAD? A) git branch feature/uart B) git checkout - b feature/uart
C) git create feature/uart D) git fork feature/uart Answer: B Explanation: git checkout - b <branch> both creates and checks out the new branch. Question 30. When submitting a pull request to Zephyr, what is the recommended maximum size for a single PR? A) 10 files B) 500 lines of code C) No hard limit, but keep it focused and reviewable D) Exactly one commit only Answer: C Explanation: While there is no strict size limit, maintainers prefer small, self‑contained PRs that are easy to review. Question 31. Which commit message prefix should be used when adding a new driver for an I2C sensor? A) doc: B) test: C) drivers: i2c: sensor_name: D) fix: Answer: C Explanation: The drivers: prefix categorizes the change, followed by the subsystem (i2c) and a brief description. Question 32. What is the purpose of an RFC in the Zephyr development process? A) To request code review from the community
Question 35. Which Zephyr feature allows a thread to run in “userspace” with restricted privileges? A) Kernel mode only, no userspace support B) User mode threads via CONFIG_USERSPACE C) Supervisor mode only D) Secure mode via CONFIG_SECURE_MODE Answer: B Explanation: Enabling CONFIG_USERSPACE creates a separation where threads run with limited access to kernel objects. Question 36. What does the Zephyr subsystem “net_mgmt” provide? A) Wi‑Fi connection management B) Generic network interface control and event notification C) DHCP client implementation only D) TCP socket API Answer: B Explanation: net_mgmt abstracts interface configuration (up/down, address assignment) and emits events to interested modules. Question 37. Which Zephyr logging macro prints a message only when the log level is set to “ERROR” or higher? A) LOG_DBG() B) LOG_INF() C) LOG_WRN() D) LOG_ERR() Answer: D
Explanation: LOG_ERR() logs at the error level; it is emitted when the system log level includes errors. Question 38. In Zephyr, which command line option tells west build to generate a binary for the QEMU x86 target? A) --board=qemu_x B) - t qemu_x C) --target=qemu_x D) - b qemu_x Answer: A Explanation: --board=qemu_x86 selects the board definition for the build. Question 39. Which of the following is not a Zephyr workqueue type? A) System workqueue B) User workqueue C) Delayed workqueue D) High‑priority workqueue Answer: B Explanation: Zephyr provides a system workqueue and delayed work; there is no separate “user workqueue” concept. Question 40. What does the CONFIG_BOOTLOADER_MCUBOOT option enable? A) Support for a network bootloader B) Integration of the MCUboot secure bootloader C) Ability to boot multiple images simultaneously D) Dynamic loading of kernel modules Answer: B
D) serial_usb Answer: B Explanation: The usb_device subsystem includes CDC ACM support for virtual serial ports. Question 44. What is the default Zephyr scheduling policy for user‑mode threads when CONFIG_USERSPACE is enabled? A) Cooperative only B) Preemptive only C) EDF only D) Same as kernel threads (configurable) Answer: D Explanation: User‑mode threads follow the same scheduler configuration as kernel threads; they can be cooperative or preemptive based on Kconfig. Question 45. Which of the following is a valid Zephyr Kconfig option to enable Bluetooth Low Energy? A) CONFIG_BT_LE=y B) CONFIG_BLUETOOTH=y C) CONFIG_BT=y D) CONFIG_BLE=y Answer: C Explanation: CONFIG_BT enables the full Bluetooth stack, which includes BLE functionality. Question 46. Which Zephyr command prints the list of all registered devices at runtime? A) device list B) sysinfo devices C) log show devices
D) device_get_binding() in code Answer: D Explanation: There is no shell command; devices are accessed programmatically via device_get_binding(). Question 47. What is the effect of setting CONFIG_LOG_IMMEDIATE? A) Logs are buffered and flushed at shutdown B) Log messages are output directly from the ISR context without buffering C) Logging is disabled completely D) Logs are stored in flash memory only Answer: B Explanation: Immediate mode forces log output to occur instantly, even from interrupt context, bypassing the normal buffering. Question 48. Which Zephyr subsystem provides the “shell” command interpreter? A) console_subsys B) shell_subsys C) command_line D) sys_shell Answer: B Explanation: The shell subsystem implements the interactive command line interface. Question 49. In Zephyr, which API is used to read a GPIO pin synchronously? A) gpio_read() B) gpio_pin_get() C) gpio_input_get() D) gpio_port_read()
Answer: A Explanation: K_OBJECT_INIT is used to place kernel objects in the initialization data segment. Question 53. In Zephyr’s networking stack, which API is used to send a UDP datagram? A) net_udp_send() B) net_socket_sendto() C) udp_sendto() D) net_send_udp() Answer: B Explanation: Zephyr uses the BSD‑style socket API; net_socket_sendto() transmits UDP packets. Question 54. Which Zephyr configuration enables the “shell” over UART0 by default on nRF52840 boards? A) CONFIG_SHELL=y B) CONFIG_UART_CONSOLE=y C) CONFIG_SHELL_BACKEND_SERIAL=y D) CONFIG_NRF_UART=y Answer: C Explanation: CONFIG_SHELL_BACKEND_SERIAL configures the shell to use the UART console. Question 55. What is the purpose of the west init command? A) Build the Zephyr kernel B) Initialize a new Zephyr project repository and fetch Zephyr sources C) Flash the target board D) Run unit tests
Answer: B Explanation: west init creates a workspace and clones the Zephyr repository. Question 56. Which Zephyr logging level corresponds to the most verbose output? A) LOG_ERR B) LOG_WRN C) LOG_INF D) LOG_DBG Answer: D Explanation: LOG_DBG (debug) is the highest verbosity, showing detailed diagnostic information. Question 57. Which Zephyr API creates a timer that calls a handler after a specified delay? A) k_timer_start() B) k_delayed_work_submit() C) k_timeout_set() D) k_sleep() Answer: A Explanation: k_timer_start() configures a timer with a timeout and optional period, invoking its handler when expired. Question 58. In Zephyr, which file typically contains board‑specific pin multiplexing definitions? A) board.c B) pins.dtsi C) pinmux.c D) board.dts