wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Real-Time Operating Systems Quiz 1

Total questions: 13

Worksheet time: 7mins

Name
Class
Date
1.

What is the primary role of the kernel in a real-time operating system (RTOS)?

a)

Manage low-level I/O operations directly

b)

Handle interrupt requests only

c)

Manage tasks, scheduling, and resource allocation

d)

Replace hardware-level timers

2.

What is CMSIS-Core designed to provide?

a)

High-level task management

b)

A hardware abstraction layer for Cortex-M microcontrollers

c)

Peripheral drivers for STM32 microcontrollers

d)

Power management for low-power systems

3.

Which of the following accurately describes context switching in an RTOS?

a)

Swapping hardware interrupts between cores

b)

Saving and restoring the state of a task to switch to another task

c)

Resetting all tasks when a new task arrives

d)

Allocating additional stack space for higher-priority tasks

4.

In Rate-Monotonic Scheduling (RMS), why are tasks with shorter periods assigned higher priority?

a)

To ensure deadlines of low-priority tasks are always missed

b)

Because they have longer deadlines

c)

To meet frequent execution requirements for time-critical tasks

d)

To improve CPU power consumption

5.

How do interrupts and preemptive scheduling differ?

a)

Interrupts pause only kernel tasks, while preemption affects all tasks

b)

Preemption is used for real-time deadlines, while interrupts are for event handling

c)

Interrupts are triggered by software events, preemption by hardware

d)

Interrupts are synchronous, preemption is asynchronous

6.

What is the main advantage of using fixed-priority scheduling in embedded systems?

a)

It guarantees 100% CPU utilization

b)

It avoids task starvation by balancing priorities dynamically

c)

It provides predictable timing for real-time applications

d)

It ensures tasks are executed in the order they are created

7.

Which timer function is typically implemented by the SysTick Timer in Cortex-M microcontrollers?

a)

Generating PWM output

b)

Time-stamping UART data

c)

Periodic scheduler interrupts for task management

d)

Resetting stack pointers

8.

What is the purpose of Auto-Reload Register (ARR) in PWM generation?

a)

Control the duty cycle of the output waveform

b)

Set the maximum count value for the timer period

c)

Enable interrupts for task switching

d)

Store task context data during preemption

9.

In CMSIS-RTOS, which mechanism is used to block a task for a specific time delay?

a)

osContextSwitch()

b)

osSignalSet()

c)

osDelay()

d)

Delay()

10.

How does a task in a real-time system return to an ready state?

a)

By calling a yield function

b)

When another higher-priority task preempts it

c)

When its time slice expires and no other task is ready

d)

By disabling its priority manually

11.

Which feature differentiates cyclostatic scheduling from round-robin scheduling?

a)

Cyclostatic scheduling uses time slices for each task

b)

Round-robin scheduling gives tasks fixed priorities

c)

Cyclostatic scheduling predefines static time slots for each task in a repeating cycle

d)

Round-robin scheduling prioritizes tasks based on deadlines

12.

What role does the NVIC (Nested Vector Interrupt Controller) play in ARM Cortex-M systems?

a)

It handles all power management for the processor

b)

It schedules periodic task executions

c)

It prioritizes and manages hardware interrupts

d)

It allocates stack memory for threads

13.

What scenario would justify disabling preemption in an embedded system design?

a)

When time-sensitive interrupts must not be delayed

b)

When all tasks require equal time slices

c)

When tasks have no dependency on each other

d)

When critical tasks cannot tolerate any interruption during execution