0
554views
What is real time system? Compare RTOS with traditional OS. Discuss interrupts with respect to real time behaviour.
1 Answer
0
8views

A real time operating system (RTOS) is an operating system that guarantees a certain capability within a specified time constraint.

RTOS Traditional OS
It is time deterministic i.e. the tasks are time bounded. It may or may not be time deterministic (Eg Hard OS is time - deterministic)
High accuracy Resource allocation General level Resource allocation
Configurable Kernel Configurable(may or may not be) Kernel(e.g. in LINUX you can configure some application level kernel)
BSP support for external dependency to another system Package support is available here
Mostly used in Embedded systems Mostly used in general purpose systems

Interrupts:

The extra time required for interrupt to be acknowledged and the time required for switching the contexts between the interrupted task and the Interrupt Service Routine (ISR) is called as Interrupt latency. If there are multiple interrupts or tasks being executed, it takes time for the interrupt to be acknowledged and begin its service. When branching to the ISR, the return address of the interrupted program is to be pushed on to the stack top. Also the registers and other context information of the interrupted program is to be pushed on the stack top.

The various factors that affect the interrupt latency are:

  1. Microprocessor design or the architecture of the microprocessor:
    Certain microprocessors have a specially designed architecture to handle the interrupt latency in a better manner. These processors have a separate set of registers to be used by the ISR and hence reducing the latency. Some processors also have a special register to store the return address and hence no need to push and pop the return address of the interrupted program.

  2. Microprocessor clock speed:
    It is very obvious that faster the clock frequency of the microprocessor, faster will be the performance and hence less will be the interrupt latency.

  3. OS (Operating System):
    It also depends on the OS that resides on the system to reduce the latency during an interrupt. If the OS schedules the tasks in a special manner so as to have minimal switching the interrupt latency can be minimized.

  4. Interrupt controller:
    This is the most important factor on which the interrupt latency depends. There are many interrupting sources that interrupt the processor through the interrupt controller. More the interrupting sources, and their simultaneous occurrence, more will be the latency. Hence the priority mechanism and the priority of the interrupting source also matters a lot for the time required for the interrupt latency.

Please log in to add an answer.