After sending asynchronous I/O using Readfile()/Writefile() / Deviceiocontrol() from user mode, and wait for I/O completion using waitforsingleobject(event,...), how I/O gets completed
1. will context switch happens, i mean will thread be preempted by another thread?
2. if context switch happens how I/O is completed?
3. when wait is satisfied?
4. how the system sets the event on which user is waiting when I/O completes?
5. will the APC routine queued to APC queue of that thread, if yes when APC routine will be run?