CS452 - Real-Time Programming - Fall 2009

Lecture 29 - CSP

Reminders


CSP - Communicating Sequential Processes

Overall Context

  1. Collection of sequential processes. Examples
  2. Interprocess communication. Examples

CSP

Based on the concept of a channel

There has to be a way for the two processes to get hold of the same channel. Examples,

When CSP is provided by an operating system type safety is most likely to be provided at run-time.

When CSP is provided by a programming language type safety can often be provided at compile-time.


The Transputer

Use many co-operating, medium capability microCPUs to do a big job.

Problem is communication

Comminication requires either

The transputer was an early, now vanished, example of the latter

Occam 2

Basic idea

  1. processes (tasks)
  2. channels
  3. time

Combining processes

  1. sequential
  2. conditional
  3. looping
  4. parallel
  5. alternation

Channels

  1. input
    channel ? variable
  2. output
    channel ! value // the value of a variable or the result of an procedure
  3. input & output provide synchronization

Time

The Result

You can write a type-safe server, BUT

Program structure is more static than is allowed in your system.

This might be a good thing.


Go

For comprehensive information: Go here.


Return to: