Many operating systems (OS) today do not include a built in mechanism, called user exits, to divert program control from the operating system or related services to user supplied functions. In many programming instances it is desirable to divert or intercept system calls, issued from a user application, and execute user supplied code instead. The code supplied by the user might bypass the entire original system function call or it might perform a function in conjunction with the original system function call. One application of such a system might include a security system whereby operating system calls issued by a user application are not permitted to execute unless the calling process has the requisite authority or privileges. Another application of this system of providing user exits might include a system profiler whereby any or all operating system calls issued by an application are tracked and used to generate statistics about the behavior of the user application. Yet another application of the system is a system used for enhancing operating system services where it is not desired to permanently modify the internal kernel functions built into the operating system.
User exit are used extensively on mainframe computer. They provide a mechanism to allow a system routine to be executed when a running program arrives at certain points. The system routine, however, might contain code supplied by the user for performing a particular function. For example, user supplied system code might function to determine whether a process should be granted or denied permission to use certain system services or resources. The security example presented above is similar in that user exits are employed to deny or allow user applications access to system services such as communications channels, access to devices or other system resources.
Implicit in the concept of providing user exits on an operating system platform, is that the supplied user exit code itself is able to be inserted and installed within the operating system where it can be accessed. Some operating systems provide the capability of inserting user supplied code into kernel space. Kernel space refers to the area of memory that contains the core operating system software including associated system calls and various data structures needed to manage and operate the computer platform on which the operating system is installed. Other operating systems, however, do not provide a capability of inserting user code into kernel space.