An embedded system has three tasks: sensor acquisition, control algorithm, and
communication. Each task must run independently but share CPU time.
Which RTOS concept best supports this design?
Threads
Two threads update the same global variable storing sensor data. Occasionally, corrupted
values appear.
What RTOS mechanism should be used to prevent this issue?
Mutex
A thread waits indefinitely for a shared resource and blocks the system when the resource
is never released.
Which RTOS feature prevents this situation?
Mutex timeout
A control task must execute every 10 ms with guaranteed maximum latency.
Which system property is most critical?
Deterministic timing
An RTOS scheduler decides which thread runs next, not the programmer.
What is the main benefit of this approach?
Deterministic execution control
A thread has its own stack in an RTOS.
What is the main purpose of this stack?
Save execution context
An RTOS guarantees bounded response times and predictable scheduling.
Which statement best describes such an OS?
Real-time
Why are mutexes preferred over disabling interrupts for protecting shared data in RTOS
applications?
Mutexes allow for safe concurrency
A thread waits up to 100 ms for a mutex. If unavailable, it continues execution.
What RTOS property does this demonstrate?
Deterministic behaviour
Which advantage of RTOS-based concurrency most directly improves software
maintainability?
Cleaner and modular code
In a multi-threaded RTOS system, only one thread accesses shared data at a time.
What does this ensure?
Safe concurrency
In the FreeRTOS firmware stack, user code interacts mainly with:
A. Vendor drivers directly
B. Hardware registers
C. FreeRTOS APIs
D. MCU peripherals
C) FreeRTOS APIs
What is the main role of CMSIS in an ARM-based system?
Hardware abstraction
Which application is least appropriate for using an RTOS?
A. Multi-protocol gateway
B. Graphical user interface
C. Periodic ADC sampling
D. Networked motor controller
C) periodic ADC sampling
Why can bare-metal systems be more deterministic?
No scheduler overhead
An RTOS provides the greatest benefit when:
A. Only one task exists
B. Timing is not critical
C. Multiple tasks compete for CPU
D. Code size must be minimal
Multiple tasks compete for CPU
Why should ISRs remain short in FreeRTOS systems?
To minimize latency because they delay task scheduling.
Which design best improvides portability across ARM MCUs?
A. Direct register access
B. Vendor-specific HAL only
C. CMSIS with FreeRTOS
D. Inline assembly
C) CMSIS with FreeRTOS
When a higher-priority task becomes ready, FreeRTOS will:
Preempt the current task
Why is bare-metal often chosen for encoder-based motion control?
Lower overhead
Which factor is least relevant when choosing an RTOS?
A. Real-time constraints
B. Available memory
C. Team expertise
D. Screen resolution
D) Screen resolution
What is the common property of all embedded
systems?
a) They rely on RTOS for execution.
b) They have a defined exit point.
c) They are designed for desktop environments.
d) They run continuously without an exit point
d) They run continuously without an exit point
What is a potential drawback of super loops in real-time systems?
Delays in one function propogate to the next.
What is jitter in the context of super loops?
The variability in delay for detecting an event/the variation in response time