Re: OS Question



"Hugogleaves@xxxxxxxxxxx>" <hugh<underbar> wrote in message news:2A136AC4-76AD-4404-B0C1-67E6EC6BC15E@xxxxxxxxxxxxxxxx
Hi
This isnt strictly about a driver issue, but many driver coders may have
insights.

Basically we plan to user some of the Interlock functions (exchange,
exchange compare etc) as the basis for a simple fast lock (not in driver code
though).

However, we are also placing the integer values in pages that have had their
access set to Read Only. Currently when code attempts to write to such a page
we trap the exception, run a few checks and then update the page to have
Write access.

This is all standard stuff, BUT if we locate an integer in such a page AND
try to use an interlock exchnage kind of function on it, it raises an
interesting question.

The interlock operations are defined as being uniterruptible BUT if they are
in a ReadOnly page the operation WILL be interrupted (by the exception that
prevents writes to read only pages).

So would it work or not??

Any insights much appreciated.

PS: We are using XP, Vista, Server 2003 and 2008 both 32-bit and 64-bit.

Ok I'll try to answer this, as there's still no other replies.

Interlocked... functions do work with variables in pageable memory.
If these can be interrupted by paging operations, they can be
interrupted by other resumable exceptions as well;
so it will work exactly in same way.

Regards,
--PA


.



Relevant Pages

  • OS Question
    ... This isnt strictly about a driver issue, but many driver coders may have ... Basically we plan to user some of the Interlock functions (exchange, ... exchange compare etc) as the basis for a simple fast lock (not in driver code ...
    (microsoft.public.development.device.drivers)
  • Re: OS Question
    ... This isnt strictly about a driver issue, but many driver coders may have ... Basically we plan to user some of the Interlock functions (exchange, ... we trap the exception, run a few checks and then update the page to have ... its access set to Read only. ...
    (microsoft.public.development.device.drivers)
  • Re: OS Question
    ... This isnt strictly about a driver issue, but many driver coders may have ... Basically we plan to user some of the Interlock functions (exchange, ... that the access exception occurs only once (per ... user API call) because once the page is set to ReadWrite inside the API lib, ...
    (microsoft.public.development.device.drivers)
  • Re: Oh dear, train crash !
    ... counterproductive on such vehicles. ... because if the driver had the ability to override the interlock (at ... accident caused by the signalman deliberately overriding the interlocks. ...
    (uk.railway)