Skip to main content

Posts

Software architectures for embedded systems part 2 - real-time systems

< Prev: Standalone systems There is a class of systems that need to carry out multiple concurrent activities in order to accomplish the application objectives. Some of these activities may have timing deadlines and hence may have to be given a priority over the others. Such systems use a real-time operating system (RTOS), which allows implementing the system as multiple tasks and execute them according to their priorities. Since meeting the deadline is critical, such systems are known as real-time systems. 2. Real-time Systems To understand multitasking, let us take an example of an internet music player. Here, we are talking about an embedded system with a microcontroller, some on-chip memory, some off-chip memory and a few peripheral devices. The microcontroller would typically run at a few tens of MHz. The RAM could range from a few tens to a few hundreds of kilobytes. The ROM / flash could be a few tens of kilobytes, either on-chip or off-chip, to store the program. The peripher...
Recent posts

polling and interrupt-driven systems

Polling and interrupt-driven systems There is a class of embedded systems that run without any operating systems. The program running on CPU receives inputs from one or more IO devices, processes them as required by the system functionality and transmits outputs to one or more IO devices. The system is classified as a polling system or an interrupt driven system based on how the program interacts with the IO devices. Polling system The program needs to know if there are any IO activities in the system. An IO activity could be data received from an input device or data transmission completed to an output device. In a polling system , the program running on the CPU actively checks for any IO activities and if so, it takes action accordingly. while(1) {      wait until input is received <-- polling      read the input data      process the input data and generate output data      wait till previous output ...

Software architectures for embedded systems part 1 - standalone systems

An embedded system is defined as a computing system that is a part of a larger system – such as a music player, a microwave oven, a printer or an engine control unit in an automobile. Unlike a desktop computer, the above definition says that an embedded system can not be fully defined on its own; it always has to be looked at within the context of the larger system. The characteristics of an embedded system, therefore, depend on the larger system that contains the embedded system. There are a large number of diverse embedded systems. A remote control, a cell-phone, an aircraft landing system, an industrial robotic arm, a gaming station, a mobile phone gateway and a medical ECG machine are all examples of embedded systems. They all vary in size, speed and complexity drastically. The CPU used could vary from a single tiny microcontroller to multiple powerful processors. The speed of the processor could vary from under a MHz to over a GHz depending on the type of system. The memory used i...