RTOS_1586939996
RTOS_1586939996
By
C.Mythili
A.P/EEE
Task state
• At any instant of time a task can be in one of
the following states:
• Dormant, ready, running and blocked
• When a task is first created it is in the
dormant task. When it is added to RTOS for
scheduling it is a ready task. If the input or a
resource is not available the task gets blocked.
• If no task is ready to run and all of the tasks
are blocked, the RTOS will usually run the idle
task. An idle task does nothing. The idle task
has lowest priority
Interrupt service routine(ISR)
• An interrupt service routine also known as an
interrupt handler is a callback subroutine in an
operating system or device driver.
• In a real embedded system there are two
possible interrupt
• Hardware interrupt and software interrupt
• Hardware interrupt are asynchronous interrupt
(timer, keyboard devices) which are triggered by
an electric pulse where as software interrupt are
synchronous interrupt and these are triggered by
a command or instruction.
• ISR is a small program which is executed to
develop an interface between the user and the
hardware. The CPU will execute the ISR
subroutine when it receives either a hardware or
software interrupt
Task communication
• In a multitasking system multiple tasks or
multiple processes run concurrently and each
process may not interact between
– Co-operating process
– Competing process
– Shared memory
Co-operating process