CS452 - Real-Time Programming - Fall 2011
Lecture 1 - Introduction
Pubilc Service Annoucements
- Due date for assignment 0
- Combination to trains lab
- Ubuntu 10.10
- How to compile and run your first
program
Practical Details: pdf
Embedded Systems
Artifacts that use computation to manipulate the real-world, including
user interfaces, have a structure that can be described in one of two
different ways.
- Computation measures the response of sensors to determine the correct
state for its internal model of the world, and that model is used to
calculate appropriate activator responses.
- Actvators are manipulated according to the state of the artifacts
internal model of the world,after which computation reads sensors to
calculate the effect of their action on the world.
Most of the mediation between the internal representations and the
real-world is done by embedded systems
- invisible computing
- sense and control
- billions and billions sold
Development Model
Two box model
- develop on one box, which contains a development environment
- execute on a different box which is in contact with the real-world.
Development cycle
- edit & compile on one box
- download to second box
- execute
Problem one
- raw code that owns the hardware itself
- hardware-specific libraries provide access to hardware
- microcontroller/hopper example
Problem two
- OS-like abstraction of hardware
- looks like a bunch of libraries, plus a little more.
What is real-time programming?
Actually real-world programming, which means
- World is measured in seconds, metres, etc.
- Programs manipulate bits, bytes, words, which must be translated into
into real-world measures.
For example,
- formatted output: translate from int, which computers manipulate,
to decimal, which humans read
- out in the open: i2a( ), printf( )
- hidden: print, cout
- Banking: int translates into, e.g., number of cents
- program says dispense( 10000 ), which means `put five twemties
into the hopper'.
- microcontrollers start
- activating motors
- sensing forces
- reading digitized video
- etc.
- Train control: contents of messages map into change speed, switch
turn-out, sensor triggered
What is important for real-time?
- Throughput
- e.g., number of frames per second in a game
- e.g., frequency of sensor sampling in process control
- no solution except
- getting better hardware
- getting better algorithms
- restructuring the task
- Response time
In cs452 we take guaranteed response time as the defining quality of
real-time computation.
Return to: