UNIT 3 Embedded Notes
UNIT 3 Embedded Notes
Real-time operating systems (RTOS) are used in environments where a large number of
events, mostly external to the computer system, must be accepted and processed in a short time
or within certain deadlines. such applications are industrial control, telephone switching
equipment, flight control, and real-time simulations. With an RTOS, the processing time is
measured in tenths of seconds. This system is time-bound and has a fixed deadline. The
processing in this type of system must occur within the specified constraints. Otherwise, This
will lead to system failure.
Examples of real-time operating systems are airline traffic control systems, Command Control
Systems, airline reservation systems, Heart pacemakers, Network Multimedia Systems, robots,
etc.
Types of RTOS
1. Hard Real-Time Operating System: These operating systems guarantee that critical
tasks are completed within a range of time.
For example, a robot is hired to weld a car body. If the robot welds too early or too late, the
car cannot be sold, so it is a hard real-time system that requires complete car welding by the
robot hardly on time., scientific experiments, medical imaging systems, industrial control
systems, weapon systems, robots, air traffic control systems, etc.
2. Soft real-time operating system: This operating system provides some relaxation in the
time limit.
For example – Multimedia systems, digital audio systems, etc. Explicit, programmer-defined,
and controlled processes are encountered in real-time systems. A separate process is changed
by handling a single external event. The process is activated upon the occurrence of the related
event signaled by an interrupt.
Multitasking operation is accomplished by scheduling processes for execution independently
of each other. Each process is assigned a certain level of priority that corresponds to the relative
importance of the event that it services. The processor is allocated to the highest-priority
processes. This type of schedule, called, priority-based preemptive scheduling is used by real-
time systems.
3. Firm Real-time Operating System: RTOS of this type have to follow deadlines as well.
In spite of its small impact, missing a deadline can have unintended consequences,
including a reduction in the quality of the product. Example: Multimedia applications.
4. Deterministic Real-time operating System: Consistency is the main key in this type of
real-time operating system. It ensures that all the task and processes execute with
predictable timing all the time,which make it more suitable for applications in which timing
accuracy is very important. Examples: INTEGRITY, PikeOS.
Advantages:
The advantages of real-time operating systems are as follows-
Maximum consumption: Maximum utilization of devices and systems. Thus more
output from all the resources.
Task Shifting: Time assigned for shifting tasks in these systems is very less. For
example, in older systems, it takes about 10 microseconds. Shifting one task to another
and in the latest systems, it takes 3 microseconds.
Focus On Application: Focus on running applications and less importance to
applications that are in the queue.
Real-Time Operating System In Embedded System: Since the size of programs is
small, RTOS can also be embedded systems like in transport and others.
Error Free: These types of systems are error-free.
Memory Allocation: Memory allocation is best managed in these types of systems.
Disadvantages:
The disadvantages of real-time operating systems are as follows-
Limited Tasks: Very few tasks run simultaneously, and their concentration is very less
on few applications to avoid errors.
Use Heavy System Resources: Sometimes the system resources are not so good and
they are expensive as well.
Complex Algorithms: The algorithms are very complex and difficult for the designer
to write on.
Device Driver And Interrupt signals: It needs specific device drivers and interrupts
signals to respond earliest to interrupts.
Thread Priority: It is not good to set thread priority as these systems are very less
prone to switching tasks.
Minimum Switching: RTOS performs minimal task switching.
Comparison of Regular and Real-Time operating systems:
Regular OS Real-Time OS (RTOS)
Complex Simple
https://prezi.com/p/oqfzyoqtfko0/interrupt-handling-in-rtos/
Watchdog Timer
Watchdog timer is a piece of hardware in micro-controller. Watchdog timer is used to generates
system reset if system gets stuck somewhere i.e. if system goes into endless loop of execution
watchdog timer will reset the system to come out of endless loop. Watchdog is safety
mechanism in embedded system which makes your system reliable, but it depends on how you
make use of watchdog timer.
NAND flash memory has a higher NOR flash memory has a lower density than
density(store more data in a smaller space) NAND Flash
NAND flash memory has a faster read NOR flash memory has faster random
speed. access times than NAND flash memory,
NAND flash memory can survive less NOR flash memory can survive more
erase/write cycles before starting to degrade erase/write cycles before starting to degrade
than NOR than NAND
Free RTOS
FreeRTOS is a market-leading real-time operating system (RTOS) for microcontrollers and
small microprocessors. Distributed freely under the MIT open source license, FreeRTOS
includes a kernel and a growing set of IoT libraries suitable for use across all industry sectors.
FreeRTOS is built with an emphasis on reliability and ease of use.
FreeRTOS provides methods for multiple threads or tasks, mutexes, semaphores and
software timers.
Thread priorities are supported.
FreeRTOS applications can be statically allocated, but objects can also be dynamically
allocated with five schemes of memory management (allocation).
A tickless mode is provided for low power applications.