DSRT/NT: A Dynamic Soft Real Time Scheduler for Windows NT

 

Description

Soft Real-Time API

Installation

Run

Demo

1.Description

Soft real-time multimedia applications become increasingly popular and coexist with traditional best-effort applications on Windows NT platform. On one hand, Windows NT provides multimedia applications with standard user interface, network capabilities, development tools and off-the-shelf components. On the other hand, however, Windows NT is not designed as a real-time operating system and does not provide soft real-time service directly. 

DSRT/NT is a middleware framework to extend Windows NT with soft real-time service. As a middleware framework, DSRT/NT enables multimedia applications to probe system level resource requirements, reserve processor resource and adapt reservation, and also allows the operating system to manage processor resource in a predictable way to satisfy both system-wide properties, such as starvation-free environment for best-effort applications, and application-specific properties, such as soft real-time guarantees for multimedia applications. 

DSRT/NT employs a Reservation-based preemptive EDF(R-EDF) algorithm to schedule multiple classes of soft real-time tasks and best-effort tasks. The unique feature of R-EDF is that it provides overrun protection and handling so that (a) overrun task will not cause other tasks to miss their deadlines, and (b) overrun task will finish its work within an acceptable and predictable time bound.

The architecture of DSRT/NT is shown as follows. Soft real-time applications use SRT API to query processor resource status, probe resource requirement, make resource reservation and adapt behavior. The broker interacts with soft real-time applications to receive requests from applications and reply with resource availability and application performance, for example, deadline missing. The scheduler makes admission control on reservation and schedules soft real-time applications and best-effort applications.

 

2.Soft Real-Time API

DSRT/NT provides following API to ease the programming of QoS-Aware multimedia applications.

SRT API Description
Probe  Map a user level QoS to a system level QoS to determine CPU service class and parameters 
ProbeEnd Stop probing and retrieve the probing result
Reserve  Make a resource reservation with specified CPU service class and parameters 
FreeReservation  Free current reservation
UpdateReservation Update current reservation
StartRTRun  Start to run in a real-time mode with resource reservation
StopRTRun  Stop running in real-time mode and run in a best-effort mode
YieldCPU  Yield CPU to mark the end of current job execution and block task until next period

With the above SRT API, a typical programming model is shown as follows

3.Installation

Source code of DSRT/NT is written in Visual C++ 6.0, and we also provide a Java version of SRT API. The zipped file (9.6MB)contains the source code and executable binary. After unzipping, you will get following directories:

+ DSRT_NT

   +---- Bin                 #including executable code and DLLs

   +---- Source              #source code for DSRT/NT

         +--- Mpeg2player    #source code of modified Berkeley Mepg Player

   +---- VCProject           #Project files

 

4.Run

DSRT/NT can run in three modes:

(1) proxy mode, which can sun existing program without modification

    (1.1) Start DSRT server

          Bin>CpuSvc

    (1.2) Start DSRT client program

          Bin>CpuCln period percentage program arguments

          For example: >CpuCln 100 0.3 mpeg2ply 

          Reserve 100ms period and 30% for mepg2ply. In mepg2ply, use menu file|open to open 4slice.mpg and 

          use contol|play to play the movie. 

(2) non-proxy mode, the client program is instrumented with SRT API

    (2.1) Start DSRT server

          Bin>CpuSvc

    (2.2) Start instrumented client program, for example

          Bin>player

          #Please see the source code of the modified mpeg2player for the programming model.

 

(3) Java program. We are still building Java examples. Please check later.

(4) DSRT server can be killed by command

          Bin>killcpusvc

 

5.Demo 


Following steps show a demo of DSRT/NT: 

   (1) Bin>CpuSvc 

   (2) Bin>CpuCln 100 0.2 mpeg2ply

       Reserve 100us period and 20% for mepg2ply. In mepg2ply, use menu file|open to open 4slice.mpg and use contol|play to play the movie. 

   (3) Bin>CpuCln 50 0.4 mpeg2ply 

       Reserve 50us period and 40% for another mepg2ply. In mepg2ply, use menu file|open to open 4slice.mpg and use contol|play to play the movie. 

   (4) Bin> mpeg2ply 

       Do not reserve CPU for another mepg2ply. In mepg2ply, use menu file|open to open 4slice.mpg and use contol|play to play the movie. 

   (5) Bin> consumer 1

       Run the consumer program to see the effect of soft real-time guarantee of DSRT/NT. 


Direct comments and suggestions to Wanghong Yuan (wyuan1@cs.uiuc.edu).

Copyright © 2000-2001, Multimedia Operating Systems and Networking Group, University of Illinois at Urbana-Champaign.

Last updated at February 15, 2000