Real-time programming in Modula-2
Article
Article Title | Real-time programming in Modula-2 |
---|---|
Article Category | Article |
Authors | Gough, K. John (Author), Mohay, George M. (Author) and Pease, Wayne (Author) |
Journal Title | Australian Computer Journal |
Journal Citation | 23 (4), pp. 175-182 |
Number of Pages | 8 |
Year | 1991 |
Place of Publication | Australia |
Abstract | The unit of pseudo-parallelism in Modula-2 is the coroutine; coroutines switch control to one another through the use of simple coroutine TRANSFER operations. In the case of programs which need to cater for realtime events (i.e. interupts) an I/O coroutine awaiting an interrupt suspends itself pending the occurrence of the specified interrupt using the IOTRANSFER operation. Recognition of the awaited interupt, when it occurs, then causes execution of an asynchronous coroutine transfer which despatches the awaiting I/O coroutine. The module priority mechanism ensures inter alia, that other interrupts occurring during execution of that I/O or device handler coroutine will only be recognised if they are of higher priority. A modified set of Modula-2 coroutine primitives, prototyped using the PDP-11 M23 Modula-2 system, has been described previously. That model included the new primitive operation Attachinterrupt which effectively replaces IOTRANSFER, leading to an arguably simpler and more elegant structure for real-time pseudo- parallel Modula-2 programs. That model has now been extended to incorporate the additional primitive functions Priority and Previous respectively. The former provides a means by which a realtime coroutine may interrogate the priority of the coroutine which it has preempted (interrupted), while the latter is invoked by a coroutine in order to establish the identity of the coroutine which it has preempted via an interrupt or which it has succeeded via a synchronous transfer operation. This paper discusses the rationale for the extended model and its implementation in one of the most popular Modula-2 systems in use today, the Logitech Version 3 compiler for the IBM PC, and illustrates its use. |
Keywords | Modula-2, realtime programming, coroutines, pseudo-parallelism, priorities |
ANZSRC Field of Research 2020 | 469999. Other information and computing sciences not elsewhere classified |
461204. Programming languages | |
460699. Distributed computing and systems software not elsewhere classified | |
Public Notes | There are no files associated with this item. |
Byline Affiliations | No affiliation |
Faculty of Business |
https://research.usq.edu.au/item/9y7x1/real-time-programming-in-modula-2
1984
total views0
total downloads4
views this month0
downloads this month