CS452 - Real-Time Programming - Winter 2015

Lecture 21 - Task Structure

Public Service Annoucements

  1. Final exam: 16.00, 14 April, 2015.
  2. First Train Control Demo, Wednesday, 11 March, 2015.
  3. How to manage a demo.

Anthropomorphic Programming

We all, even most programmers (!), have effective intuitions about human relations

Tasks are independent entities


Servers and Attendant Tasks

Why do servers need attendant tasks?

1. Proprietor with a Notifier

Proprietor `owns' a service, which usually means a resource.

Notifier Code for a UART

Proprietor Code for a UART

Notes

  1. Notifier is usually of higher priority than server
  2. We assume that interrupts get turned on and/or off in the kernel?
  3. We hope that the code

2. Using a Courier

Simplest is best

Transmit Notifier Code

Transmit Courier Code

Transmit Proprietor Code

Notes

This gets you through a bottleneck where at most than two events come too fast.

Remember that all the calls provide error returns. You can/should use them for error recovery

Another possible arrangement for task creation

Another possible arrangement for initialization

Distributed gating

I am showing you collections of tasks implemented together because sets of related tasks is a level of organization above the individual task.

E.g., the decision to add a courier requires revision of code within the group, but not outside it.


3. The Warehouse

Add a warehouse between the courier and the notifier.