FreeRTOS - Task SchedulingIf a high priority task becomes ready while a low priority task is running, what will FreeRTOS scheduler do?AContinue running the low priority task until it finishesBIgnore the high priority task until the low priority task yieldsCPreempt the low priority task and run the high priority taskDRun both tasks at the same timeCheck Answer
Step-by-Step SolutionSolution:Step 1: Recall preemptive scheduling behaviorFreeRTOS preempts lower priority tasks when higher priority tasks become ready.Step 2: Apply this to the scenarioThe scheduler will stop the low priority task and run the high priority one immediately.Final Answer:Preempt the low priority task and run the high priority task -> Option CQuick Check:Preemption = High priority runs immediately [OK]Quick Trick: High priority tasks preempt lower ones instantly [OK]Common Mistakes:Thinking low priority task runs to completionAssuming tasks run simultaneouslyBelieving scheduler ignores high priority tasks
Master "Task Scheduling" in FreeRTOS9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More FreeRTOS Quizzes RTOS Fundamentals - Tick timer and scheduler - Quiz 4medium RTOS Fundamentals - Hard real-time vs soft real-time - Quiz 5medium Task Creation and Management - Stack size allocation - Quiz 1easy Task Creation and Management - xTaskCreate() function - Quiz 9hard Task Creation and Management - Stack size allocation - Quiz 8hard Task Creation and Management - Why tasks are the building blocks - Quiz 7medium Task Creation and Management - xTaskCreate() function - Quiz 14medium Task Priorities - Choosing priorities for real applications - Quiz 1easy Task Scheduling - Priority-based scheduling - Quiz 1easy Task Scheduling - vTaskDelayUntil() for precise timing - Quiz 13medium