0
votes

I am a beginner in RTOS programming.I have a query regarding the same.

Query:I understand that context switching happens between various tasks as per priority assigned. I wanted to know how exactly does a higher priority task interrupts a low priority task technically? Does each task is assigned to hardware interrupt pin so that whenever micro-controller is interrupted on that pin by external hardware,the specific task is processed provided it is assigned higher priority when compared to the task that is presently being processed? But practically speaking if there are 128 tasks present in the program it might require 7 hardware pins reserved for interrupts. What is the logic I am missing?

2

2 Answers

0
votes

I recommend to read the pretty good docs on https://www.freertos.org e.g. RTOS Fundamentals

I’m sure this will provide a good overview and related details. Besides that you’ll find out that usually you don’t need external hardware pins to run a multitasking OS.

0
votes

Free RTOS uses only sys_tick/os_tick hw-interrupt for context switching. This is high precision periodic interrupt configured on any underlying controller

for example on Cortex M: https://www.keil.com/pack/doc/CMSIS/Core/html/group__SysTick__gr.html

In the interrupt handling of this, FreeRTOS schedular switches the tasks based on the Ready Queue Task list and its priorities.