Task - Its an unit of execution(function) for a program these are sheduled by RTOS
on diff diff priority order

What is a critical section in an RTOS and how is it protected?
A critical section is a part of code in an RTOS where a shared resource is
accessed, and it must be protected to prevent concurrent access by multiple tasks.
It is protected using mechanisms such as semaphores or mutexes to ensure that only
one task can access the critical section at a time.

Semaphore - syncronisation mechanism used in rtos to control the access to shared 
resorces.Tasks can acquire and release semaphores to gain access to shared resources. 
If a semaphore is not available, a task can be put into the wait queue until the 
semaphore is released by another task.

A mutex (short for mutual exclusion) is a synchronization mechanism used in an RTOS
to ensure that only one task at a time can access a shared resource. It works by
allowing a task to lock a mutex when it wants to access a shared resource, and then 
unlock it when it is finished. 

What is a priority inversion and how can it be prevented?
Priority inversion is a situation in which a lower-priority task holds a resource 
that a higher-priority task needs, causing the higher-priority task to be blocked.
To prevent priority inversion, an RTOS can use priority inheritance, where the 
priority of a lower-priority task holding a resource is temporarily raised to that
of the highest-priority task waiting for the resource.

What is a context switch in an RTOS?
A context switch is the process of saving the context of the currently executing 
task and restoring the context of a different task to allow it to execute. Context
switches occur frequently in an RTOS as the scheduler decides which task to run
next.

What is a round-robin scheduler in an RTOS?
A round-robin scheduler is a type of scheduling algorithm used in an RTOS, where 
each task is given a fixed time slice to run before being preempted and allowing 
the next task to run. This ensures that all tasks get an equal share of CPU time.

What is the difference between a task and a thread in an RTOS?
In an RTOS, a task and a thread are often used interchangeably. However, in some 
systems, a task may refer to a unit of work that is executed by the RTOS 
scheduler, while a thread may refer to a unit of work that is executed by the
underlying operating system.

What is a memory pool in an RTOS?
A memory pool is a pre-allocated area of memory used by an RTOS to provide memory
to tasks. It is typically used to improve performance and reduce fragmentation by
allocating a fixed amount of memory up front and then managing it internally.

What is preemption in an RTOS?
Preemption is the ability of an RTOS to interrupt the execution of a lower-priority
task to allow a higher-priority task to run. Preemption can be either preemptive
or cooperative, depending on the scheduling policy of the RTOS.

What is a watchdog timer in an RTOS?
A watchdog timer is a hardware timer used in an RTOS to detect and recover from 
system failures. The timer is periodically reset by the system software, and if it
is not reset within a certain time period, the system is assumed to have failed, 
and the watchdog timer triggers a system reset or other recovery mechanism.

What is a context switch in an RTOS and how does it work?
In an RTOS, a context switch is the process of saving the current context of a 
running task and restoring the context of another task. The context switch is 
typically triggered by the RTOS scheduler, which determines which task should 
run next based on the scheduling policy of the system.

What is an interrupt in an RTOS and how does it work?
In an RTOS, an interrupt is a signal sent to the processor by an external device 
or by software to indicate that a particular event has occurred. When an interrupt 
occurs, the processor suspends the current task and executes an interrupt service
routine (ISR) to handle the event. Once the ISR is complete, the processor resumes 
the interrupted task.

What is a kernel in an RTOS and what is its role?
In an RTOS, the kernel is the core component that provides the basic services
needed to manage tasks, interrupts, and other system resources. The kernel is
responsible for scheduling tasks, managing memory and other resources, handling
interrupts, and providing synchronization and communication mechanisms for tasks.



Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: