RTC Website

Summary

This chapter has introduced the principles of real-time operating systems, threads, interrupts, and elemental digital logic. The main concepts are as follows:

  • An operating system is the interface between the programs that we have written and the computer hardware. The operating system determines when and how programs will be executed and what to do with the data and other information associated with the program.
  • An operating system must manage several processes simultaneously. A context switch is a processor changing from one process to another. A process can be composed of one or more subprocesses called threads.
  • A real-time operating system is an operating system that has support for scheduling applications that process data and events that have critically defined time constraints. A scheduler determines the order in which tasks are executed by processors available to the real-time system.
  • Real-time task scheduling depends on three types of conditions: time constraints, precedence constraints, and resource constraints.
  • Our myRIO uses the NI Linux Real-Time operating system. Its scheduler can preempt a task in favor of another to ensure timely execution of critical tasks.
  • An interrupt is an asynchronous signal that causes the currently running thread to be suspended. The processor services the interrupt by running a separate function that responds appropriately to the interrupt. When the service function is completed, processing returns to the point in the previous thread where the interruption occurred.
  • In Real-Time Linux, POSIX threads, usually referred to as pthreads, allow a program to control multiple flows of work that overlap in time. Each flow of work is a thread, and creation and control over these flows are achieved by making calls to the Real-Time Linux API.
  • Boolean algebra is used to perform propositional logic. Values in this algebra are limited to the set \(B= \{0, 1\}\), representing either false or true. The basic operators on the members include addition (or), multiplication (and), and complement (not).
  • A logic gate is an electronic device that produces a digital signal corresponding to false (0) or true (1) given digital signal inputs. Logic gates approximate the behavior of the Boolean operators.
  • Sequential logic is a type of logic circuit whose output depends on the present value of its input signals and on the sequence of past inputs.
  • The two primary types of sequential logic circuits are synchronous and asynchronous. Synchronous sequential logic circuits change state and output at discrete moments in time, typically at fixed time intervals set by a shared system clock. At any time, asynchronous circuits can change state and output due to an input change.
  • The phenomenon of mechanical switch bounce can be problematic for DI. The NAND-gate method of switch debouncing is described.

Online Resources for Section 5.9

No online resources.