CS452 - Real-Time Programming - Spring 2009
Lecture 29 - History : Controllers
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
- multi-user executives
- first multi-programming
- the multi-tasking
- humans still wait, just not as long
- Mini-computers
- Other tools, such as state charts
The Transputer: a Second Generation Offshoot
Use many co-operating, medium capability microCPUs to do a big job.
- An idea whose time has now come.
- Google
Problem is communication
- Big granularity (thick client: MS, Google)
- minimizes communication
- maximizes replicated data
- The Google approach: a problem nobody thought about.
- Small granularity
- minimizes replicated data
- maximizes communication
- Your system, like threading solutions, relies on shared memory for
communication
- The return of the FORTRAN common block
- How would you handle caching?
Comminication requires either
- a common bus, star topology
- passing messages along
The transputer was an early, now vanished, example of the latter
- CPU, memory, switch on one chip
- chips connected in an array
- presumably a run-time system decides where tasks will go in order to
- maximize CPU throughput
- minimize communication overhead
Occam 2
Basic idea
- processes (tasks)
- may be named, take arguments and return values
- channels
- need a protocol (for type safety)
- must be named
- time
Combining processes
- sequential
- conditional
- if/then
- selection by case
- looping
- without test/break
- with test/break
- parallel
- initiated when the keyword PAR occurs.
- alternation
- guarded alternatives
- if more than one guard is true then select at random
Channels
- input
channel ? variable
- variable type must match protocol
- real-world hardware acknowledged by the anarchic protocol
- blocks when channel is empty
- output
channel ! value // the value of a variable or the result of an procedure
- variable type must match protocol
- blocks until an input process accepts the data
- input & output provide synchronization
- similar to sockets except for output blocking
Time
The Result
You can write a type-safe server, BUT
- all possible clients must be known at compile time.
Program structure is more static than is allowed in your system.
This might be a good thing.
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: