From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,MSGID_SHORT autolearn=no autolearn_force=no version=3.4.5-pre1 Date: 18 Feb 93 21:12:21 GMT From: visicom!rlk@nosc.mil (Bob Kitzberger) Subject: Re: Interrupts Message-ID: <288@VisiCom.COM> List-Id: dl10696@ehsn4.cen.uiuc.edu (Dat Trieu Le) writes: >task service is > entry ISR; > for ISR use at 16#xxx#; >end service; > >My question is: instead of using the overhead of tasks, is it >possible to tie the interrupt directly to a procedure? It's something of a non-sequiter that tasks themselves have too much overhead. There are _characteristics_ of tasks that incur varying amounts of overhead, such as context switch time, interrupt latency, interrupt lockout, frequency of interaction, stack usage, etc. In the case of interrupt handling, the main concern is usually interrupt latency. Most Ada vendors support interrupt entries for tasks, and many provide features specifically geared towards reducing the interrupt latency of task entries to a point where they're just about as quick to respond as interrupt handling procedures. Basically, the approach is to tie the task's interrupt entry to the interrupt vector with a minimal amount of preambl and postamble processing. This is usually just a handful of assembly instructions to save registers, swap in the new task's stack limits, and jump directly to the interrupt entry. TeleSoft calls this optimization "function mapped" entries, and Verdix calls theirs "passive interrupt tasks". There are subtle differences, but both allow the task entry to make a call to another task, as long as that call is guaranteed not to block. Other vendors have similar capabilities, and your mileage may vary. Of course, you can still use the conventional model of tying subprogram addresses to interrupt vectors. Even in this case, your vendor will probably provide some sort of capability for you to do this painfully (usually a generic package, where one of the generic actual parameters is the interrupt service routine) . .Bob. ---------------- Bob Kitzberger VisiCom Laboratories, Inc. rlk@visicom.com 10052 Mesa Ridge Court, San Diego CA 92121 USA +1 619 457 2111 FAX +1 619 457 0888