Saturday, December 17, 2011

RTOS vs Normal OS

Discuss the components that differentiate RTOS and Normal OS.

Real TIme Computing:
A system is said to be real-time if the total correctness of an operation depends not only upon its logical correctness, but also upon the time in which it is performed. Real-time systems, as well as their deadlines, are classified by the consequence of missing a deadline.
Hard
Missing a deadline is a total system failure.
Firm
Infrequent deadline misses are tolerable, but may degrade the system's quality of service. The usefulness of a result is zero after its deadline.
Soft
The usefulness of a result degrades after its deadline, thereby degrading the system's quality of service.
Thus, the goal of a hard real-time system is to ensure that all deadlines are met, but for soft real-time systems the goal becomes meeting a certain subset of deadlines in order to optimize some application specific criteria. The particular criteria optimized depends on the application, but some typical examples include maximizing the number of deadlines met, minimizing the lateness of tasks and maximizing the number of high priority tasks meeting their deadlines.

RTOS:
A real-time operating system (RTOS) is an operating system (OS) intended to serve real-time application requests.
Features of RTOS:
1.An RTOS has an advanced algorithm for scheduling. Scheduler flexibility enables a wider, computer-system orchestration of process priorities, but a real-time OS is more frequently dedicated to a narrow set of applications.
2. Interrupt Handlers and schedulers:
Key factors in a real-time OS are minimal interrupt latency and minimal thread switching latency; a real-time OS is valued more for how quickly or how predictably it can respond than for the amount of work it can perform in a given period of time.

Since an interrupt handler blocks the highest priority task from running, and since real time operating systems are designed to keep thread latency to a minimum, interrupt handlers are typically kept as short as possible. The interrupt handler defers all interaction with the hardware as long as possible; typically all that is necessary is to acknowledge or disable the interrupt
3.Intertask communication and resource sharing:
 i]Temprarily masking interrupts
ii]Binary Semaphores
iii]Messsage Passing 
4.Memory allocation is more critical in an RTOS than in other operating systems.
First, speed of allocation is important. A standard memory allocation scheme scans a linked list of indeterminate length to find a suitable free memory block.This is unacceptable in an RTOS since memory allocation has to occur within a certain amount of time.
The simple fixed-size-blocks algorithm works quite well for simple embedded systems because of its low overhead.

Real time OS Examples:
http://www.chibios.org/dokuwiki/doku.php?id=chibios:documents

2 comments:

  1. http://en.wikipedia.org/wiki/Real-time_computing

    ReplyDelete
  2. http://en.wikipedia.org/wiki/Real-time_operating_system

    ReplyDelete