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

Virtual Private Network (VPN) - Browsing Anonymous

  Privacy is a major concern when browsing the internet. Your data could be eavesdropped by hackers, companies targeting ads or even rogue state actors. What gets revealed would be personal browsing history, location monitoring, IP addresses to name a few. Enter the tech... Virtual Private Network or simply known as VPN is a technology used to prevent unauthorized access of your private data. Even if a hacker penetrates the network and get hold of data packets, all that is revealed is gibberish.  This is because all the information that passes through your device is encrypted and can be only revealed through a personal key.  Internet Service Provider Before going further, a knowledge of Internet Service Provider (ISP) is needed. They are the backbone of the World Wide Web. ISP provides each device with a unique IP (Internet Protocol) address, bandwidth allocation and network security. When a website is searched, first it goes from your device to the Router or Modem which...

Ransomware - Trojan in Disguise

  You log into the computer, and it boots up. But instead of seeing the welcome screen, you get a dialog box.  "Your data has been encrypted. To recover, pay $$ of Bitcoin." The message also has a countdown timer, which indicates a payment deadline.  Passwords, credit card details, personal videos/pictures all have been compromised. The hacker even threatens to leak everything online. What happened...... Ransomware is a type of malware that encrypts personal data and blocks access to a computer/network. To regain control, a ransom needs to be paid. Usually this is through Bitcoin, or other crypto currencies. On payment, a key is given, which decrypts everything, and returns access to the system.  However, you could be placed in a "Sucker's list" which is sold in the dark web. This can attract more ransomware attacks, in future. History.... Originating in the 90s, the attacks were first recorded in Russia. Since then, it has crossed into Europe and North America...

Clock Speed - Benchmark for Processors?

Intel i7 - Base Frequency 2.80 GHz, 4.70 GHz (Turbo Frequency) Intel i9 - Base Frequency 2.2 GHz, 5.8 GHz (Turbo Frequency)  AMD Ryzen 7 - Base Frequency 3.4 GHz, 4.6 GHz (Max Boost Clock) Whenever we shop for a laptop or home PC, we note the processor speed. The saying being more the clock speed, higher the performance . However, efficiency of a chip is determined by a range of other factors What is clock speed? The CPU (Central Processing Unit), or processor performs various arithmetic operations, at any given time. This is performed by opening and closing billions of transistors, embedded within it. That constitutes a cycle.  Simply put, clock speed is the number of cycles executed per second ,  calculated in GHz.  So, a processor having 3 GHz speed, performs 3 billion cycles per second. Higher this ratio, better the performance. At least, in paper. But there are other things in play, when looking at the overall functionality.   Multi Core processing A sing...