4

Classical programs run a loop with prioritized ISRs. How do RTOS do this differently of better?

1
  • Also, though not specifically your question, embedded OS applications tend to run in the kernel (mode) (and using single address space) rather than as user mode with multiple address spaces. Paging is typically also disabled: no virtual memory -- everything runs from in real memory not just the kernel.
    – Erik Eidt
    Commented Sep 12, 2017 at 9:03

1 Answer 1

6

By not treating all Interrupt Service Routines (ISR's) as the highest priority.

The kernel of an RTOS is preemptible where as a GPOS kernel is not preemptible. This is a major issue when it comes to serving high priority process/threads first. If kernel is not preemptible, then a request/call from kernel will override all other process and threads. For example:- a request from a driver or some other system service comes in, it is treated as a kernel call which will be served immediately overriding all other process and threads. In an RTOS the kernel is kept very simple and only very important service requests are kept within the kernel call. All other service requests are treated as external processes and threads. All such service requests from kernel are associated with a bounded latency in an RTOS. This ensures highly predictable and quick response from an RTOS.

circuitstoday.com : GPOS versus RTOS for an Embedded System

People will make a fuss over things being "time critical" but there's really no such thing as anything that isn't time critical. What a Real Time Operating System (RTOS) really does is eliminate some of the random nature of scheduling in a general purpose operating system (GPOS).

1
  • The current Linux kernel is for general purpose operating systems, and is preemptable. Commented Sep 12, 2017 at 23:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.