chapter 2 companion and outline
This page contains companion resources and an outline for chapter 2 of the book An Introduction to Real-Time Computing for Mechanical Engineers, and it therefore lacks most of chapter 2’s contents. While some sections of the book are fully available on this site, many are not. Please consider purchasing a copy from the MIT Press.
Efficient design and programming the midlevel User Interface
In computing, efficiency concerns the performance of required tasks within the constraints of limited resources. Real-time computing has specific timing constraints, as we have seen. Meeting these timing constraints is easier when the number of tasks and each task’s duration—called run time—are minimized. There are many ways to minimize run time. The most direct way is to simply use faster computer hardware. Of course, this comes at an economic cost and is limited by the state of the art. Other methods of reducing run time are those of efficiency.
Another aspect of computing efficiency is in the use of memory. Memory efficiency depends on the nature of the computing process. Often, different algorithms for computing the same task differ widely in the amount of memory used. In all computing, memory is finite, so its efficient use is always of importance.
In this chapter, we examine methods of improving efficiency, with special attention to algorithmic and programmatic efficiency. The latter is, of course, tightly coupled to programming language. Furthering our exploration of the C programming language, we describe certain fundamental techniques for improving efficiency. These will be applied in lab 2 to midlevel user interface (UI) functions for character input/output (I/O).
Efficiency for real-time computing
Algorithmic efficiency
Programmatic efficiency and efficient C programs
C operator precedence and associativity
The UI functions of the T1 library
Summary
Problems
Programming the Midlevel User Interface
Online resources for Chapter 2
No online resources.