CS452 - Real-Time Programming - Fall 2009

Lecture 20 - Task Structure: Warehouse, Receptionist

Reminders


Servers and Attendant Tasks

Why do servers need attendant tasks?

1. Proprietor with a Notifier

Notifier Code for a UART

Proprietor Code for a UART

Notes

  1. Notifier is usually of higher priority than server
  2. When, and how, do interrupts get enabled and/or cleared?
  3. We have made the code

2. Using a Courier

Simplest is best

Notifier Code

Courier Code

Proprietor Code

Notes

This gets you through a bottleneck where no more 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 initialization

Distributed gating


3. Using a Warehouse

Add a warehouse between the courier and the notifier.

Notifier Code

Warehouse Code

Courier Code

Proprietor Code

Note

This structure clears up problems when the notifier runs too fast for the server.

Two issues:

  1. Handles bottlenecks of all sizes.

    Define `bottleneck'.

  2. Doesn't handle excessive ongoing message throughput

4. Adding a Receptionist

In the solution above there should be, on average,

We also know that the Warehouse will buffer messages coming and going from the hardware.

A task that can screen requests can lower the buffering required in the Proprietor. We call such a task a receptionist.

Receptionist Code

Proprietor Code

Note


Return to: