Real Time Operating System Race Car
Technical Background Information
When categorizing systems on their latency (Time between an event trigger and its servicing) bounds we often use the terms "soft real-time" and "hard real-time" when specifying their level of real time. In soft real-time missing a specific deadline (i.e sampling from a specific sensor) is not the end of the world, but the value of that data decreases as time passes. In hard real-time missing a deadline makes that data useless if not provided by the deadline. These deadlines may include a specific minimum time until data is given as well as a maximum.
In implementing embedded systems with the capabilities to be able to meet specific deadlines, we must consider a scheduling type of platform. To which we split up all tasks into items known a threads. These threads will be given a certain amount of processor run time as dictated by our thread scheduler. In implementing this type of system, we create what is known as an Operating System. This operating system acts as an abstraction between the hardware level of an embedded system and the software application layer. It provides a much richer means of integrating the software with the hardware.
With most low cost/low power embedded systems on the market utilizing single cores (ie. Microcontrollers) there is a need to be able to emulate systems such as microprocessors which have multiple cores that allow them to execute multiple threads at a time. The downside to microprocessors being their high cost and high power demands.
Linux is a perfect example of an open source operating system that runs on a lot of microprocessors today. However, most distributions (different renditions) do not design their thread scheduler (also known as a Kernel) to be a real time system. Instead most of these versions will try to implement fairness between all threads and give them equal amounts of CPU run time which could case some deadlines to not be met. Operating systems that design their thread scheduler to be able to meet the requirements of "hard real-time" will be categorized as a Real Time Operating System (RTOS). So to recap what this RTOS will give us is the ability to emulate the execution of multiple threads at a time, also known as Multi-threading on a single core microcontroller.
In implementing embedded systems with the capabilities to be able to meet specific deadlines, we must consider a scheduling type of platform. To which we split up all tasks into items known a threads. These threads will be given a certain amount of processor run time as dictated by our thread scheduler. In implementing this type of system, we create what is known as an Operating System. This operating system acts as an abstraction between the hardware level of an embedded system and the software application layer. It provides a much richer means of integrating the software with the hardware.
With most low cost/low power embedded systems on the market utilizing single cores (ie. Microcontrollers) there is a need to be able to emulate systems such as microprocessors which have multiple cores that allow them to execute multiple threads at a time. The downside to microprocessors being their high cost and high power demands.
Linux is a perfect example of an open source operating system that runs on a lot of microprocessors today. However, most distributions (different renditions) do not design their thread scheduler (also known as a Kernel) to be a real time system. Instead most of these versions will try to implement fairness between all threads and give them equal amounts of CPU run time which could case some deadlines to not be met. Operating systems that design their thread scheduler to be able to meet the requirements of "hard real-time" will be categorized as a Real Time Operating System (RTOS). So to recap what this RTOS will give us is the ability to emulate the execution of multiple threads at a time, also known as Multi-threading on a single core microcontroller.
Abstract
The purpose of this project is to implement a RTOS onto a mechanical Racecar giving it the ability to easily move throughout a race track and react to different turns and bends on a track. By utilizing multiple Infrared Sensors at different angles to get the distances from the walls of the track.