Knowledge (XXG)

Asynchronous System Trap

Source 📝

249:. In fact, it is possible for a process to put itself into a "hibernate" state (with the $ HIBER system call), or to wait for an event flag by calling e.g. $ WAITFR, whereupon it does nothing but wait for ASTs to be delivered. When an AST is delivered (triggered by an IO completion, timer, or other event), the process is temporarily taken out of the wait to execute the AST. After the AST procedure completes, the call that put the process into hibernation or the event flag wait is made again; in essence, the reason for the wait is re-evaluated. The only way to get out of this loop (apart from process deletion) is to execute a $ WAKE or $ SETEF system call to satisfy the wait. This can be done by the process itself by invoking $ WAKE or $ SETEF within the AST, or (if a global event flag is used) $ SETEF within another process. 206:. Completion of the I/O can be signalled by the issuance of an AST to the calling process/task. Certain runtime errors could also be signalled using the AST mechanism. Within OpenVMS, Special Kernel-Mode ASTs are used as the standard mechanism for getting relatively convenient access to a process context (including getting the process paged into physical memory as may be needed). These types of ASTs are executed at the highest possible per-process priority the next time the scheduler makes that process current, and are used among other things for retrieving process-level information (in response to a $ GETJPI "getjob/process information" system call) and for performing process deletion. 36: 278:) it would check the second flag to see if it had become set during this time: if so, then ASTs really have become disabled, and $ SETAST should be called to re-enable them. In the most common case, no ASTs would have become pending during this time, so there would be no need to call $ SETAST at all. 269:
So for user mode only (the least privileged ring, normally used by ordinary user programs), a pair of bit flags was provided at a predefined user-writable memory location (in per-process "P1" space). The meanings of these two flags could be construed as "don't deliver any ASTs" and "ASTs have been
253:
VAX/VMS V4 and later implemented an interesting optimization to the problem of synchronizing between AST-level and non-AST-level code. A system service named $ SETAST could be used to disable or enable the delivery of ASTs for the current and all less-privileged
241:
There are no "signal codes" assigned to ASTs: instead of assigning a handler to a signal code and raising that code, the AST is specified directly by its address. This allows any number of ASTs to be pending at once (subject to process
270:
disabled". Instead of the usual pair of $ SETAST calls, the user-mode code would set the first flag before executing the sequence of instructions during which ASTs need to be blocked, and clear it after the sequence.
281:
The kernel AST delivery code, for its part, would check the first flag before trying to deliver a user-mode AST; if it was set, then it would directly set the ASTs-disabled bit in the
266:
needing protection from ASTs was only a few instructions long, then the overhead of making the $ SETAST calls could far outweigh the time to execute those instructions.
285:(the same bit that would be set by an explicit $ SETAST call from user mode), and also set the second flag, before returning and leaving the AST undelivered. 190:
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
57: 310:
OpenVMS Alpha Internals and Data Structures : Scheduling and Process Control : Version 7.0, Ruth Goldenberg, Saro Saravanan, Denise Dumas,
330: 108: 80: 315: 127: 87: 61: 152: 94: 289: 76: 46: 65: 50: 203: 175:
back to the user processes via the AST mechanism. These ASTs act like subroutine calls but they are delivered
184: 156: 282: 179:, that is, without any regard to the context of the main thread. Because of this, care must be taken: 101: 176: 183:
to ensure that any code that is shared between the main thread and the AST must be designed to be
311: 335: 263: 191: 148: 259: 17: 275: 324: 160: 234: 172: 35: 293: 246: 224: 219: 213: 231: 199: 29: 198:
ASTs are most commonly encountered as a result of issuing
171:
Various events within these systems can be optionally
296:
family of operating systems is a similar mechanism.
27:
Mechanism used in several computer operating systems
147:) refers to a mechanism used in several computer 209:The following operating systems implement ASTs: 8: 64:. Unsourced material may be challenged and 128:Learn how and when to remove this message 7: 262:security features). However, if the 62:adding citations to reliable sources 274:(note the ordering here, to avoid 25: 247:abort any system call in progress 237:. The important differences are: 34: 216:(including all of the variants) 230:ASTs are roughly analogous to 1: 153:Digital Equipment Corporation 331:Operating system technology 290:asynchronous procedure call 352: 77:"Asynchronous System Trap" 141:Asynchronous System Trap 18:Asynchronous system trap 151:designed by the former 258:(the OpenVMS term for 283:process control block 58:improve this article 292:mechanism in the 192:critical sections 149:operating systems 138: 137: 130: 112: 16:(Redirected from 343: 264:critical section 133: 126: 122: 119: 113: 111: 70: 38: 30: 21: 351: 350: 346: 345: 344: 342: 341: 340: 321: 320: 307: 305:Further reading 302: 276:race conditions 169: 134: 123: 117: 114: 71: 69: 55: 39: 28: 23: 22: 15: 12: 11: 5: 349: 347: 339: 338: 333: 323: 322: 319: 318: 306: 303: 301: 298: 251: 250: 243: 228: 227: 222: 217: 196: 195: 188: 177:asynchronously 168: 165: 136: 135: 42: 40: 33: 26: 24: 14: 13: 10: 9: 6: 4: 3: 2: 348: 337: 334: 332: 329: 328: 326: 317: 316:1-55558-156-0 313: 309: 308: 304: 299: 297: 295: 291: 286: 284: 279: 277: 273: 267: 265: 261: 257: 248: 244: 240: 239: 238: 236: 233: 226: 223: 221: 218: 215: 212: 211: 210: 207: 205: 202:calls to the 201: 193: 189: 186: 182: 181: 180: 178: 174: 166: 164: 162: 161:Massachusetts 158: 154: 150: 146: 142: 132: 129: 121: 118:February 2009 110: 107: 103: 100: 96: 93: 89: 86: 82: 79: –  78: 74: 73:Find sources: 67: 63: 59: 53: 52: 48: 43:This article 41: 37: 32: 31: 19: 287: 280: 271: 268: 256:access modes 255: 252: 229: 208: 197: 170: 144: 140: 139: 124: 115: 105: 98: 91: 84: 72: 56:Please help 44: 245:ASTs never 325:Categories 300:References 294:Windows NT 260:ring-based 88:newspapers 185:reentrant 173:signalled 167:Mechanism 155:(DEC) of 45:does not 242:quotas). 336:OpenVMS 235:signals 225:OpenVMS 157:Maynard 102:scholar 66:removed 51:sources 314:  220:RSTS/E 214:RSX-11 204:kernel 104:  97:  90:  83:  75:  187:, and 109:JSTOR 95:books 312:ISBN 288:The 272:Then 232:Unix 81:news 49:any 47:cite 200:QIO 145:AST 60:by 327:: 163:. 159:, 194:. 143:( 131:) 125:( 120:) 116:( 106:· 99:· 92:· 85:· 68:. 54:. 20:)

Index

Asynchronous system trap

cite
sources
improve this article
adding citations to reliable sources
removed
"Asynchronous System Trap"
news
newspapers
books
scholar
JSTOR
Learn how and when to remove this message
operating systems
Digital Equipment Corporation
Maynard
Massachusetts
signalled
asynchronously
reentrant
critical sections
QIO
kernel
RSX-11
RSTS/E
OpenVMS
Unix
signals
abort any system call in progress

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.