The swapper builds its I/O requests in a format similar to the ExecuteChain() format, using the SCB architecture and 32-bit physical page frame addresses. It then calls the file system to perform the paging operations.
When memory is overcommitted, page-in operations will occur in conjunction with page-outs which will free memory frames for the requested pages. The swapper may build request chains that contain both page-in and page-out operations, which results in a significant reduction in start I/O and interrupt processing overhead, thereby providing improved paging performance.
Normally the device driver has the possibility to sort I/O requests in order to optimize physical disk access. However, since a paging I/O request may contain both page-out and page-in instructions that address the same physical page in memory (as described above), the execution order of the individual operations may be critical.
In such circumstances, a flag indicating a critical I/O request is set by the swapper when issuing the request. The device driver will then not sort the chain, but will execute the operations in the exact sequence they were requested. The pager/swapper, therefore, optimizes I/O requests wherever possible, while maintaining the integrity of critical requests.
OS/2 Version 2.0 also contains a new interface (new calls) for those who program their own file systems. The new calls provide a clear interface between the file system and the FSD for paging. All calls are guaranteed to be used only for paging operations, so that the underlying FSDs may be optimized in supporting them. This guarantee implies that no argument checking, address verification, or size control takes place.