PCLSRing - Asynchronous Approaches

Asynchronous Approaches

A different approach is possible. It is seems in the above that the system call has to be synchronous--that is, the calling process has to wait for the operation to complete. There is no reason for this: in the OpenVMS operating system, all I/O and other time-consuming operations are inherently asynchronous, which means the semantics of the system call is "start the operation, and perform one or more of these notifications when it completes" after which it returns immediately to the caller. There is a standard set of available notifications (such as set an event flag, or deliver an asynchronous system trap), as well as a set of system calls for explicitly suspending the process while waiting for these, which are a) fully restartable in the ITS sense, and b) much smaller in number than the set of actual time-consuming system calls.

OpenVMS provides alternative "start operation and wait for completion" synchronous versions of all time-consuming system calls. These are implemented as "perform the actual asynchronous operation" followed by "wait until the operation sets the event flag". Any access to the process context during this time will see it about to (re)enter the wait-for-event-flag call.

Read more about this topic:  PCLSRing

Famous quotes containing the word approaches:

    Someone approaches to say his life is ruined
    and to fall down at your feet
    and pound his head upon the sidewalk.
    David Ignatow (b. 1914)