I don’t think the cost of completing the IRP is that high compared to
the context switch involved in either case to get the sleeping thread
running again.
-p
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Monday, November 28, 2005 1:27 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] kmode talking to user mode
I would think that the event model would be faster since it is only
setting a value in a structure that is shared between user-mode and
kernel and causing the app to wake up. It bypasses the IO manager -
there are no IRPs associated with it once the initial setup has been
done. With the IRP model, the notification has to travel through the IO
manager for each nitification.
Beverly
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Roddy, Mark
Sent: Monday, November 28, 2005 4:01 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] kmode talking to user mode
The driver presumably has all the infrastructure in place for handling
‘IRPs’ and cancellation thereof, or it is a broken driver to begin with.
The problem stated included sending a request packet to the driver - in
other words the event model is less efficient as the IRP model already
has the request IRP in the driver to begin with while the event model
has to supply one after the event is signaled. I continue to be
unimpressed with the explanations of why the event model is superior,
although the idea that it provides compatibility with windos9x is
intriguing, in that this implies that developers are still providing new
software for that wretched platform 
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David J. Craig
Sent: Monday, November 28, 2005 3:12 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] kmode talking to user mode
It is easier or so it appears. The driver has no work to do to handle
cancel and other problems associated with a process terminating with
outstanding IO requests. The event becomes bad, but no much that it
will cause a blue screen. The process just becomes almost ‘terminated’,
but it appears safer. It also permits support for both 9x & NT without
having to write different code in the application. There is one runtime
check that can solve the ‘who gets the kernel handle’ problem and after
that it all
just works with the same code.
“Roddy, Mark” wrote in message
news:xxxxx@ntdev…
I’ve never understood why the event model was a better solution to the
‘inverted call’ problem than simply feeding the driver with async read
requests and waiting for their completion.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Daniel Terhell
Sent: Monday, November 28, 2005 10:15 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] kmode talking to user mode
Create an event in user mode and open it in the kernel. For details on
how best to achieve this check out the OSR article on sharing events
http://www.osronline.com/article.cfm?id=108.
Then let your service or app wait for the event object to be signalled.
When
the kernel wants attention, signal the event.
Your service or app can then contact the driver like using
DeviceIoControl and pass the information for the requests and the reply.
Regards,
Daniel Terhell
Resplendence Software Projects Sp
xxxxx@resplendence.com
http://www.resplendence.com
“lallous” wrote in message news:xxxxx@ntdev…
> Hello
>
> What is the best way to achieve the following:
>
> 1. kmode wants some data
> 2. kmode fills a request (request has a fixed size) and notifies user
mode
> 3. kmode waits for reply
> 4. user mode gets request and processes it 5. user mode finishes and
> sends the response (response has a variable
> size) to kmode
>
> Please advise.
>
> –
> Elias
>
>
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to xxxxx@lists.osr.com
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to xxxxx@lists.osr.com
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com