how to program I/O

Hi every 1:

I am a novice in NT driver writing, I am studying the programming windows driver model.

In the book of Walter Oney:
Chapter 4 Synchronization
He say

The operating system can preempt any subroutine at any moment for an arbitrarily long period of time, …

if so, when the H/W programming is not interrupt driven, and it must follow some H/W communication protocol,
How to do the I/O programming
that can follow H/W handshake timing protocol ? (If the I/O routine is doing H/W I/O handshake ,and O.S. preempty the I/O routine for a time)

Best Regards,

Alan