WorksheetsReal-Time Operating Systems Quiz 1
Total questions: 13
Worksheet time: 7mins
What is the primary role of the kernel in a real-time operating system (RTOS)?
Manage low-level I/O operations directly
Handle interrupt requests only
Manage tasks, scheduling, and resource allocation
Replace hardware-level timers
What is CMSIS-Core designed to provide?
High-level task management
A hardware abstraction layer for Cortex-M microcontrollers
Peripheral drivers for STM32 microcontrollers
Power management for low-power systems
Which of the following accurately describes context switching in an RTOS?
Swapping hardware interrupts between cores
Saving and restoring the state of a task to switch to another task
Resetting all tasks when a new task arrives
Allocating additional stack space for higher-priority tasks
In Rate-Monotonic Scheduling (RMS), why are tasks with shorter periods assigned higher priority?
To ensure deadlines of low-priority tasks are always missed
Because they have longer deadlines
To meet frequent execution requirements for time-critical tasks
To improve CPU power consumption
How do interrupts and preemptive scheduling differ?
Interrupts pause only kernel tasks, while preemption affects all tasks
Preemption is used for real-time deadlines, while interrupts are for event handling
Interrupts are triggered by software events, preemption by hardware
Interrupts are synchronous, preemption is asynchronous
What is the main advantage of using fixed-priority scheduling in embedded systems?
It guarantees 100% CPU utilization
It avoids task starvation by balancing priorities dynamically
It provides predictable timing for real-time applications
It ensures tasks are executed in the order they are created
Which timer function is typically implemented by the SysTick Timer in Cortex-M microcontrollers?
Generating PWM output
Time-stamping UART data
Periodic scheduler interrupts for task management
Resetting stack pointers
What is the purpose of Auto-Reload Register (ARR) in PWM generation?
Control the duty cycle of the output waveform
Set the maximum count value for the timer period
Enable interrupts for task switching
Store task context data during preemption
In CMSIS-RTOS, which mechanism is used to block a task for a specific time delay?
osContextSwitch()
osSignalSet()
osDelay()
Delay()
How does a task in a real-time system return to an ready state?
By calling a yield function
When another higher-priority task preempts it
When its time slice expires and no other task is ready
By disabling its priority manually
Which feature differentiates cyclostatic scheduling from round-robin scheduling?
Cyclostatic scheduling uses time slices for each task
Round-robin scheduling gives tasks fixed priorities
Cyclostatic scheduling predefines static time slots for each task in a repeating cycle
Round-robin scheduling prioritizes tasks based on deadlines
What role does the NVIC (Nested Vector Interrupt Controller) play in ARM Cortex-M systems?
It handles all power management for the processor
It schedules periodic task executions
It prioritizes and manages hardware interrupts
It allocates stack memory for threads
What scenario would justify disabling preemption in an embedded system design?
When time-sensitive interrupts must not be delayed
When all tasks require equal time slices
When tasks have no dependency on each other
When critical tasks cannot tolerate any interruption during execution
