Skip to main content

RTOS-Operating System for Embedded Devices

 

If hardware is the body...

Then software is the brain controlling the tasks and operations behind the scenes. It provides memory management, task allotment, priority scheduling etc. Operating system or OS is mainly divided into two main categories Real Time Operating Systems (RTOS) or General-Purpose Operating Systems (GPOS). The classification is based on how they allocate resources

The difference

GPOS is used in desktop, laptops, tablets or smart phones where the processor performs several tasks at once. Here deadline for a given process is not important, and small delays are overstepped.

RTOS is used in embedded systems such as medical equipment, flight avionics etc where one task is processed at any given time. Here deadline needs to be met without compromise, and data inputs are computed in real time.

GPOS are usually used in microprocessors which have high computation power and voltage requirements. Examples include Intel x86/64 and AMD Ryzen chips

RTOS are used in microcontrollers which are reverse of the same, with low computational power and lower voltage requirements. Examples are ESP32, Atmel chipsets

In depth

RTOS has several features which are detailed below.

  • Priority based execution is the hallmark of this system. Each task is processed based on the importance assigned. When two tasks compete for execution, the higher priority is given preference, and lower one is kept on hold. The priority level can be changed by developer input.
  • Interrupts when a task needs to be processed, it raises an interrupt. The processor then checks the request, and services it. This is known as an interrupt service routine. Again, higher priority is processed first, followed by the lesser one 
  • Memory is stored in the form of stacks and heaps. Stacks are used to store local variable and functions. They are constantly monitored to prevent overflows. Heaps are used to store variables or objects, during runtime.
  • Scheduler is used to assign priorities to various tasks, provide time limit on when to start and stop an operation. Preemptive scheduling is a process by which a high priority task is allowed to continue till completion, unobstructed.
  • Symmetric multiprocessing is used when multiple processors are given access to the same resources, typically memory. This helps to split task between them, allowing for load balancing and reduced latency
  • Fast dispatch latency is the rate at which a processor can switch between tasks. Higher this ratio, better the processing power and reduced delay.

Types
  • Hard RTOS here deadlines need to met by precision, and any delay could result in an error generation. Examples include avionic systems, radar control.
  • Firm RTOS here also deadlines are crucial, but occasional miss is allowed. Examples include factory equipment, robotics.
  • Soft RTOS delays are completely overlooked, and more focus is given to accuracy and user interaction. Examples include smart phones, tablets 
 Additional Information

Comments

Popular posts from this blog

Man In The Middle Attack - EavesDropping in the Digital World

    This is a term used to describe a cyber attack where a hacker acts as middleman, during data transfer between user and an application. The app can be a financial or an E commerce website, Software as a Service (SaaS) etc. The hacker can intercept data passed via the browser to the website, and collect sensitive information such as account and credit card details, user login etc. To put it into context, it is like a postman who reads all the letters addressed to you, then reseals the same, on delivery. This way no one suspects a foul play.   Interception This is the first phase of the attack. Here the hacker establishes a connection with the target device whether a PC, Laptop or Smart phone. This is done   through various methods   like   Free WiFi  : Here a WiFi hot spot is set up  which is not password protected. When a user logs in to the network, they are in essence connecting to the hacker's system. Now any data transfer occurs via this co...

Internet of Things-Connection Redefined

  Imagine driving home after a long day of work. En route the car instructs the residence to automatically turn on the lights, prepare a hot bath, and download the latest Netflix series. While this may seem like a line from a SciFi script, the future is more realistic than ever. Welcome to the world of IoT or Internet of Things. Though not as popular as its famous counterpart, Artificial Intelligence, its penetration into the consumer market is indeed extensive. What is IoT...... It is the term used to describe a   device, or set of devices which are connected to the internet,   and also communicate with each other. They can share data obtained from various sensors to a central hub, analyze it using  AI, and take appropriate actions. For example, a smart thermostat can read the room temperature, analyze the same, and adjust the heating system without any human intervention. Another example would be a smart camera which provides video footage when a movement is detect...

Bluetooth - You are Connected

       We are entering the era of Internet of Things (IoT) devices, where each device connects remotely to one another, and the world wide web. This makes them smart in the way of integration to Artificial Intelligence, Machine learning and Data analysis. There are number of network protocols that facilitate this peer to peer communication be it ZigBee, Matter etc. More on that later.    What is Bluetooth  Invented  in 1994 by Ericsson and widely used, Bluetooth allows for short distance communication, within 10 meter radius. The data speed is between 1 Mbps and 3 Mbps. The bandwidth is in the range of 2.4 GHz to 2.485 GHz.   Frequency Hopping Unfold Spectrum This is the underlying tech used in Bluetooth. Data signals by default have low frequency, and high bandwidth. This makes them prone to distortion, affecting long distance transmission. Also the receiving antennas  have to be large in size which is a limitation for mobile phone...