Real-Time Computing
For Human Computer Interfacing

October 23, 1997

Copyright* 1997, Perry R. Cook, Princeton University




Jump to Expanded Lecture Notes
or Text Only Version of Expanded Lecture Notes



I. What's Real-Time? Some Definitions



Encyclopedia of Computer Science (VNR 1993) says:

    Computer Processing Modes and Times:

    Card Oriented Batch

    100-10000s

    Keyboard Oriented Batch

    1-100s

    Interactive Computing

    1-10s

    Online Inquiry and Transactions

    1-10s

    Message Switching

    0.1-10s

    Data Acquisition and Control

    0.01-10s








Ib. What's Real-Time? Continued

What do the Computer Companies Say?
  • SGI: Media Playback is Synchronizable
    to 1 Audio Sample

  • Windows: Graphics Display Looks Smooth,
    Audio Doesn't Click too Much
    Prerecorded Game Sounds Play Quickly

  • Apple, NeXT, Others: Still different definitions.

  • Computer Company Definitions Typically Say Little
    About Latency Guarantees!








Ic. What's Real-Time? Continued

What do the Controls/Robotics People Say?
  • Systems Function Under Time Constraints

  • Imposed by External Processes

  • Scheduling and Resource Allocation Guarantees

  • Synchronous, or Guaranteed Timings (Stability)






II. Controls Systems vs. Media Delivery

    Media Delivery:
    • Make it look/sound smooth, degrade gracefully
    • No clicks or pops in audio, no jerks in video.

    Control Systems:

    • Close a feedback loop with sensors and motors.
    • Guarantee STABILITY.

    HCI is Both:

    We're really interested in combining two areas. We want to get user input,
    process it in a timely fashion, and display something smoothly and convincingly
    (with small or controllable delay) in response. The human and computer make
    a complete feedback system. Many modern HCI applications are active
    feedback control systems, and thus stability can be a consideration.





III. Control Systems

  • A Classic Feedback Control System

    • Feedback allows system to control itself

    • Human sets desired state, but is not part of feedback

    • Must worry about stability of feedback systems

  • What are some systems where human is part of feedback?




IIIb. Control Systems

    Humans in the Feedback Loop:
    • Cars and things you steer

    • Musical Instruments (some, but not all)

      • Theremin
      • Brass
      • Bowed





IIIc. Control Systems

    Car:

    • Actuator: Steering system
    • Mechanical System: Car, Wheels, Tires

    Human:

    • Sensor: Visual Sensors (maybe more!)
    • Controller: Brain and Arms

A More General Picture of a Feedback Control System:





IIId. Some Feedback Control Systems with Humans

    Broom Balancing

    • Actuator: Hand
    • System: Physics of Broomstick
    • Sensor: Visual/Tactile/Kinesthetic
    • Controller: Human

    Video Game

    • Actuator: Hand/Joystick
    • System: Computer running game software
    • Sensor: Visual (auditory) System(s)
    • Controller: Human

    Theremin

    • Actuator: Hands
    • System: Theremin electronics
    • Sensor: Auditory
    • Controller: Human





IIIe. Diagram of Control System with Human

    Problems:
    • Latency

    • Overcompensation, stability (gain)

      • Feedback means possibility for instability
      • System Delay (VR Sickness)
      • Sampling and measurement errors

      • Human overcompensation
      • Variable Reaction time (attention, ...)
      • Resolution
      • Training





IV. Synchronous vs. Asynchronous Models
Polled vs. Interrupt Operation

  • Synchronous Real-Time
      Based on time-ordered external events.
      Processor responds instantaneously to events.
      (or time between events >> response time)

  • Asynchronous Real-Time
      Events at times indexed on the real numbers.
      System responds within specified bounds.
To accomplish: We can Poll, use Interrupts, or both.







V. Data and Processing Models


  • Queues and Scheduling:
    • FIFOs (fixed priority)
    • Priority-based


  • Interrupts:
    • Single Priority
    • Multi-Level
    • Nestable
    • Hardware vs. Software







Vb. Data and Processing Models Continued


  • Process/Device Communication:
    • Shared Memory
    • Messages
    • DMA
    • Multi-Bus/Ring/Star/Common Bus


  • Input/Output Buffers
    • Ping Pong
    • Single with Hi/Low Water




VI. Complexity!!!

Online: Scheduling, Interrupt Handling, Load Monitoring, ..
Development: Debugging, Optimization, Profiling, ..

=> Need for an Operating System

Some Real-Time Operating Systems

VxWorks

.

OS-9

.

VRTX

.

LynxOS

.

Chimera:

MC680x0

RT Mach

80960, 80486, MIPS R3000

DSP/Media Processor Real-Time OS:

IBM MWave/OS

MWAVE DSP

AT&T VCOS

DSP3210

SPOX

TICX0, Motorola 56x, ADI 21x



Next Lecture:
VII. Multi Processes and Processors


VIII. DSP, and DSP Chips


IX. Micro Controllers


X. Micro/DSP/Host Real-time Processing Examples

Some Web References:

Educational Research Groups and Projects:

U. Michigan Real-Time Computing Lab

Carnegie Melon Real-Time Groups

A Good OS List from Leeds


Commercial:

Heurikon

Resource List Compiled by E. Douglas Jensen



Some Non-Web References Made from Dead Trees:

"Real-time programming : neglected topics"
Caxton C. Foster.
Reading, Mass. : Addison-Wesley Pub. Co., c1981.

"Real-time software for control : program examples in C"
David M. Auslander, Cheng H. Tham.
Englewood Cliffs, N.J. : Prentice Hall, c1990.

"Real-time systems, Specification, Verification, and Analysis,"
Mathai Joseph, ed.
Englewood Cliffs, N.J. : Prentice Hall, 1996

"Introduction to Real-time Software Design,"
S.T. Allworth and R.N. Zobel
New York, Springer Verlag, 1989



* Permission to make digital or hard copies of part or all
of this work for personal or classroom use is granted with
or without fee provided that copies are not made or dis-
tributed for profit or commercial advantage and that copies
bear this notice and full citation on the first page. To copy
otherwise,to republish, to post on services, or to redistribute
to lists, requires specific permission and/or a fee.

Back to Princeton General Information Section

Return to Main Page at San Jose