Premium
Synchronous and asynchronous handling of abnormal events in the μsystem
Author(s) -
Buhr Peter A.,
Macdonald Hamish I.,
Zarnke C. Robert
Publication year - 1992
Publication title -
software: practice and experience
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.437
H-Index - 70
eISSN - 1097-024X
pISSN - 0038-0644
DOI - 10.1002/spe.4380220904
Subject(s) - computer science , interrupt , asynchronous communication , event (particle physics) , task (project management) , psychological intervention , uniprocessor system , concurrency , unix , programming language , distributed computing , multiprocessing , operating system , computer network , embedded system , psychology , engineering , physics , systems engineering , software , quantum mechanics , psychiatry , microcontroller
This paper presents a general model for dealing with abnormal events during program execution and describes how this model is implemented in the μSystem. (The μSystem is a library of C definitions that provide light‐weight concurrency on uniprocessor and multiprocessor computers running the UNIX operating system.) Two different techniques can be used to deal with an abnormal event: an exception, which results in an exceptional change in control flow from the point of the abnormal event; and an intervention, which is a routine call from the point of the abnormal event that performs some corrective action. Users can define named exceptions and interventions in conjunction with ones defined by the μSystem. Exception handlers and intervention routines for dealing with abnormal events can be defined/installed at any point in a program. An exception or intervention can then be raised or called, passing data about the abnormal event and returning results for interventions. Interventions can also be activated in other tasks, like a UNIX signal. Such asynchronous interventions may interrupt a task's execution and invoke the specified intervention routine. Asynchronous interventions are found to be useful to get another task's attention when it is not listening through the synchronous communication mechanism.