Hi,
I'm communicating with the user mode via shared memory
back by a file (display mirror driver).

Is this efficient?

Is the OS reads/writes to the disk anyhow or is everything in memory?
If there is disk I/O then is there a way to avoid disk I/O at all?

Sincerely,

Omer

Re: Is EngMapFile/CreateFileMapping pair efficient? by Maxim

Maxim
Sun May 21 11:56:02 CDT 2006

Note that you cannot 100% guarantee that the user app which sees your
shared memory will apply the proper locking to access its structures.

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

"Omer Boyaci" <omerboyaci@hotmail.com> wrote in message
news:uvQOuGFfGHA.4892@TK2MSFTNGP02.phx.gbl...
> Hi,
> I'm communicating with the user mode via shared memory
> back by a file (display mirror driver).
>
> Is this efficient?
>
> Is the OS reads/writes to the disk anyhow or is everything in memory?
> If there is disk I/O then is there a way to avoid disk I/O at all?
>
> Sincerely,
>
> Omer


Re: Is EngMapFile/CreateFileMapping pair efficient? by Omer

Omer
Sun May 21 12:03:05 CDT 2006

Maxim S. Shatskih wrote:
> Note that you cannot 100% guarantee that the user app which sees your
> shared memory will apply the proper locking to access its structures.
>

Then what is your suggestion for mirror driver-user app communication?

By the way, user app only reads from the shared memory therefore locking
seems unnecessary. Therefore there will be no corruption of memory but
maybe the content of the shared memory will be inconsistent during the
reading.

Thanks

Omer

Re: Is EngMapFile/CreateFileMapping pair efficient? by Maxim

Maxim
Mon May 22 11:25:00 CDT 2006

> Then what is your suggestion for mirror driver-user app communication?
>
> By the way, user app only reads from the shared memory therefore locking

OK, then shared memory is a solution.

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


Re: Is EngMapFile/CreateFileMapping pair efficient? by Tim

Tim
Wed May 24 00:33:44 CDT 2006

Omer Boyaci <omerboyaci@hotmail.com> wrote:
>
>I'm communicating with the user mode via shared memory
>back by a file (display mirror driver).
>
>Is this efficient?
>
>Is the OS reads/writes to the disk anyhow or is everything in memory?
>If there is disk I/O then is there a way to avoid disk I/O at all?

There will only be disk I/O if the operating system needs to reassign those
physical pages for other uses. It uses a "least-recently used" algorithm,
so if your pages are active, they'll probably last a long time.

And if it decides it needs to swap them to disk, then it has a very good
reason to do so. It'll swap them back in when you need them again.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.