Question

I was reading a MSDN doc about driver synchronization and I come across a statement that goes like this

a driver can wait if

• The driver is executing in a nonarbitrary thread context. That is, you can identify the thread that will enter a wait state. In practice, the only driver routines that execute in a nonarbitrary thread context are the DriverEntry, AddDevice, Reinitialize, and Unload routines of any driver, plus the dispatch routines of highest-level drivers. All these routines are called directly by the system

now my question is that why dispatch routines are considered in arbitrary thread context ?? Since read, write and other routines will be invoked when a request will be raised from user space, so we can know that which thread did that in system space ?? My be I am completely messed up or it could be a silly question but still help me coz i am a newbie in windwos.

Was it helpful?

Solution

ok i found the answer in a document :) and here is what it states ..

Although the highest-level drivers receive I/O requests in the context of the requesting thread, they often forward those requests to their lower level drivers on different threads. Consequently, you can make no assumptions about the contents of the user-mode address space at the time such routines are called

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top