CS452 - Real-Time Programming - Spring 2009
Lecture 28 - History : Controllers
1. Deadlock
2. Livelock (Deadly Embrace)
3. Critical Races
4. Performance
Priority
The hardest thing to get right
- Sizing stacks used to be harder, but now we have lots of memory
- NP-hard for the human brain
- Practical method starts with all priorities the same, then adjusts
- symptoms of good priority assignment
- The higher priority, the more likely the ready queue is to be
empty
- The shorter the run time in practice the higher the priority
Problems with priority
- Priority inversion
- One resource, many clients
- Tasks try to do too much
Congestion
- Too many tasks
- blocked tasks don't count,
- lowest priority tasks almost don't count
- Not enough tasks
- priority doesn't work any more
Layered abstraction are costly
e.g. Notifier -> SerialServer -> InputAccumulater -> Parser ->
TrackServer
Hardware
- Turn on optimization, but be careful
- There are places where you have done register allocation by
hand
- Turn on caches
- Size & align calibration tables by size & alignment of cache
lines
- Slowing and stopping
- each train has a built in velocity profile when stopping
- you can create your own velocity profile
Hardware for Real-Time
First Generation
- Big mainframe computers
- transaction processing
- try to be fast, but it's up to the human to wait
- Finite state machine controllers
Second Generation
- Big mainframe computers
- transaction processing
- humans still wait, just not as long
- Mini-computers
- Other tools, such as state charts
Third Generation
- Multi-CPU servers
- more or less tightly coupled
- dominated by RPC and its relatives
- Micro-computers
- many (most?) were used in real-time applications
- point-of-sale systems
- games
- telephone switches
- supported by DOS (still in use!)
- much ad hoc intercommunication
- Micro-controllers
Fourth Generation
- Multi-(multi-core CPUs) called servers
- communicate and synchronize using shared memory
- using techniques from CS343
or using RPC
- using techniques from CS454
- multi-core, cache, and shared memory don't play well together
- performance limited by threading
- explicit support for threading, e.g. register windows (Sun)
increases performance hugely
- communication still costly
- Multi-core microprocessors
- performance strongly hampered by difficulty of multi-threading
- multi-core, cache, and shared memory don't play well together
- Stream processors
Return to: