Preemptive multitasking or multi-threading

In this type of system, a low-level piece of code switches between
tasks or threads based on a timer (connected to an interrupt). This is
the level at which the system is generally considered to have an
"operating system" kernel. Depending on how much functionality is
required, it introduces more or less of the complexities of managing
multiple tasks running conceptually in parallel.

As any code can potentially damage the data of another task (except in
larger systems using an MMU) programs must be carefully designed and
tested, and access to shared data must be controlled by some
synchronization strategy, such as message queues, semaphores or a
non-blocking synchronization scheme.

Because of these complexities, it is common for organizations to buy a
real-time operating system, allowing the application programmers to
concentrate on device functionality rather than operating system
services, at least for large systems; smaller systems often cannot
afford the overhead associated with a generic real time system, due to
limitations regarding memory size, performance, and/or battery life.

No comments:

Post a Comment