Asynchronous system trap (AST) refers to a mechanism used in several computer operating systems designed by the former Digital Equipment Corporation (DEC) of Maynard, Massachusetts.
Various events within these systems can be optionally signalled back to the user processes via the AST mechanism. These ASTs act like subroutine calls but they are delivered asynchronously, that is, without any regard to the context of the main thread. Because of this, care must be taken:
- to ensure that any code that is shared between the main thread and the AST must be designed to be reentrant, and
- any data that is shared must be safe against corruption if modified at any time by the AST. Otherwise, the data must be guarded by blocking ASTs during critical sections.
ASTs are most commonly encountered as a result of issuing QIO calls to the kernel. Completion of the I/O can be signaled by the issuance of an AST to the calling process/task. Certain runtime errors could also be signalled using the AST mechanism. Within VMS, Special Kernel-Mode ASTs are used to signal certain unblockable events back to the user processes.
The following operating systems implemented ASTs:
ASTs are roughly analogous to Unix signals.