Selecting priorities


Data streaming is built upon the real-time multitasking facilities of the 3DO Portfolio operating system. As in any real-time system, the priorities of the tasks of the application are critical.

This section lists a recommended order of process priorities and explains the reasons for that order.

Recommended order of process priorities

System priorities are taken care of by the 3DO Portfolio operating system. Arrange relative process priorities of all DataStreamer threads, including your own program, as follows, starting with the most important:

  1. Control subscriber
  2. Audio subscriber
  3. Data acquisition
  4. Other subscribers
  5. Streamer
  6. User display/interface process (your own playback application)
Here are the reasons for assigning priorities in the order listed:

Note that all priorities discussed above are relative. That is, the actual numeric values of task priorities do not matter as long as the relative priorities are preserved.

How bad priorities can stop your stream

When deciding on subscriber process priorities, consider their effect on the overall utilization of data streaming buffers.

All data chunks in a stream buffer must be processed before data acquisition can refill the buffer-you don't want to overwrite data that hasn't been processed yet. If a subscriber does not reply to its arriving data quickly enough, the stream eventually stops flowing, as in the following situations:

The second situation is, in fact, the normal case; it represents what happens when the streamer gets ahead of the subscribers in delivering data. This is desirable for covering disc seeks: more data are stored buffered in memory than are needed right away. While those data are played, the disc seek can happen and new data can then be acquired without additional delay.