Hi, I want to confirm that i correct in how i think the threads run in KMDF.

If I have multiple WorkItems, do these run concurrently as seperate threads?

If a EvtDeviceIOControl callback occurs (running at dispatch level), does
this hold out all the work items (running at passive level)?

If the DeviceObject synchronisation scope is set to
WdfSynchronizationScopeDevice, even if the IOControl queue is set to
parallel dispatch, I can only be in one instance of the framework callback
at once? Does this hold true on dual core machines?

Thanks in advance.

Laurence.

Re: KMDF threads by Eliyas

Eliyas
Fri May 19 11:25:19 CDT 2006

> If I have multiple WorkItems, do these run concurrently as seperate
> threads?

Yes they do.

> If a EvtDeviceIOControl callback occurs (running at dispatch level), does
> this hold out all the work items (running at passive level)?
>

No, not on a multiproc system.


> If the DeviceObject synchronisation scope is set to
> WdfSynchronizationScopeDevice, even if the IOControl queue is set to
> parallel dispatch, I can only be in one instance of the framework callback
> at once? Does this hold true on dual core machines?

Yes. It will block other dispatch routines and other object's (such as dpc,
workitem, timer) that has opted for AutomaticSeriaization from running
because they get synchronized using the same global device-level lock.

-Eliyas



Re: KMDF threads by Maxim

Maxim
Fri May 19 12:09:30 CDT 2006

> If I have multiple WorkItems, do these run concurrently as seperate threads?

Yes, but all of these threads belong to System process and run under
LocalSystem security account.

> If a EvtDeviceIOControl callback occurs (running at dispatch level), does
> this hold out all the work items (running at passive level)?

Yes, any DISPATCH_LEVEL code will preempt any PASSIVE_LEVEL code on the same
CPU.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com