TimerS: Types of Computing

Just like we use time in our lives to run on a schedule and organize our lives, we use time to synchronize different actions in a computer program. In particular, embedded systems heavily depend on time for their proper operation. This is because most embedded systems perform what is called real-time computing as opposed to general-purpose computing.

With general-purpose computing, the program does not have to worry about performing the task within a time limit. Generally, programs that fall under general-purpose computing aim to be as fast as possible; however, the program does not lose its usefulness if it is relatively slow. An example of this would be a calculation. If you typed 2 + 2 into a calculator, and five seconds later it displays the result of 4, has the calculator lost its usefulness? In a simple sense, no. While it would be desirable to get the result much quicker, the calculator's primary function is to do arithmetic. The calculator was able to add 2 and 2. Thus it was able to satisfy its purpose, regardless of how much time it took to do that task. Real-life examples of general-purpose computing are a variety of scientific modelings and calculations such as gene sequencing. 

Real-time computing, on the other hand, is subject to real-time constraints that need to be met. This type of computing requires that tasks be done at the right time, and if this time constraint is not met, the program is no longer useful. An example of this would be the airbag systems in a car. If a driver got into a crash, the airbags have to deploy fast enough to protect the driver from serious injury. If they deployed after the driver already sustained an injury, the airbags would have failed to serve their purpose.

In both cases, the program is performing a task. In the case of general-purpose computing, the process of performing the task could take as long as needed with no casualties aside from efficiency. However, with real-time computing, if the task is not performed within a specified timeframe, the program would fail to work correctly at all. Interestingly enough, in real-time computing as long as the program can meet the specified deadline, it does not need to be any faster. In other words, in general-purpose computing, we wish the task to be "as fast as possible," while in real-time computing, "fast enough" is enough! With time being such an essential factor to real-time computing methods, we need something to let the program keep track of time. Thus, we use hardware timers.

The following table summarizes the different types of computing and thier objectives.

<- Introduction