FreeRTOS - Task SchedulingWhat happens in FreeRTOS when a higher priority task becomes ready while a lower priority task is running under preemptive scheduling?AThe scheduler ignores the higher priority task until the lower priority task yields.BThe lower priority task continues running until it finishes.CBoth tasks run at the same time.DThe higher priority task immediately preempts the lower priority task and starts running.Check Answer
Step-by-Step SolutionSolution:Step 1: Understand preemptive scheduling behaviorIn preemptive scheduling, the system always runs the highest priority task that is ready.Step 2: Apply to the scenarioWhen a higher priority task becomes ready, it interrupts the lower priority task immediately.Final Answer:The higher priority task immediately preempts the lower priority task and starts running. -> Option DQuick Check:Preemptive scheduling = immediate switch to higher priority task [OK]Quick Trick: Higher priority tasks always interrupt lower ones immediately [OK]Common Mistakes:Thinking tasks run simultaneously on a single coreBelieving lower priority tasks finish before switchingConfusing preemptive with cooperative scheduling
Master "Task Scheduling" in FreeRTOS9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More FreeRTOS Quizzes RTOS Fundamentals - Why RTOS over bare-metal - Quiz 14medium RTOS Fundamentals - Real-time vs general-purpose OS - Quiz 10hard RTOS Fundamentals - Tick timer and scheduler - Quiz 11easy Task Creation and Management - Why tasks are the building blocks - Quiz 14medium Task Creation and Management - Task priority assignment - Quiz 12easy Task Creation and Management - Task function signature - Quiz 4medium Task Scheduling - vTaskDelay() for periodic tasks - Quiz 9hard Task Scheduling - Why scheduling determines real-time behavior - Quiz 7medium Task Scheduling - vTaskDelayUntil() for precise timing - Quiz 3easy Task Scheduling - Time-slicing for equal priority tasks - Quiz 4medium