K
kirchner
Guest
> As far as I understand the synchronous I/O on Windows are performed by process itself while asynchronous I/O - by the kernel (a process just sends I/O request to the kernel) All kinds of I/O are performed by the kernel. The usermode does not have direct access to the devices/drivers/etc. I believe it goes this way in every OS, doesn't it? Also, from the kernel POV pretty much everything in the I/O stack is async. If the request can be served immediately, say from the filesystem cache, then it returns control to the application and off it goes. But if the request needs to hit the actual device then the kernel dispatches a request to the driver which will eventually set the device in motion. Once the device is in motion the driver returns and there is no waiting/blocking in the kernel. If the request was a sync one, the requesting thread (usermode) is put to sleep until the request is completed. For async requests the usermode thread gets control back and continue its execution. > Could it be just a matter of a privilege for account that run proutil? AFAIK there is no such thing as sync/async privileges. Once you can do I/O to a handle, you can do it sync or async, buffered or unbuffered, whatever suits better.
Continue reading...
Continue reading...