Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTFSD
Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


RE: off topic: Multiprocessor safety in the User Mode

Rohit_GaubaRohit_Gauba Member Posts: 160
If in a Multi processor system, i released the mutex, then can the thread
from different process running on different processor acquire the same mutex
or not. Or how can we notify another process that some event has occured in
multiprocessor systems

Comments

  • Rohit_GaubaRohit_Gauba Member Posts: 160
    If criticalSection is multiprocessor safe then i feel that all the user mode
    threads corresponding to a single process will run on same processor on
    multiprocessor machine

    Can you please confirm wether this assumption is right or not

    On 12/13/06, Rohit wrote:
    >
    > If in a Multi processor system, i released the mutex, then can the thread
    > from different process running on different processor acquire the same mutex
    > or not. Or how can we notify another process that some event has occured in
    > multiprocessor systems
    >
    >
    >
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    > If in a Multi processor system, i released the mutex, then can the thread
    > from different process running on different processor acquire the same mutex
    > or not.

    Yes it can.

    >Or how can we notify another process that some event has occured in
    > multiprocessor systems

    Lots of ways, event objects is one, completing the pending IRPs is another.

    Maxim Shatskih, Windows DDK MVP
    StorageCraft Corporation
    [email protected]
    http://www.storagecraft.com
  • Rohit_GaubaRohit_Gauba Member Posts: 160
    these lines are from file system internals by rajeev nagar

    Typically, spin locks and other higher level (Executive) synchronization
    mechanisms must be used consistently and correctly in Windows NT drivers to
    ensure correct functionality on multiprocessor systems

    Is this indicates that mutex are not multiprocessor safe in kernel drivers,
    then how can it be possible that user level mutex are multi processor safe

    On 12/13/06, Maxim S. Shatskih < [email protected]> wrote:
    >
    > > If in a Multi processor system, i released the mutex, then can the
    > thread
    > > from different process running on different processor acquire the same
    > mutex
    > > or not.
    >
    > Yes it can.
    >
    > >Or how can we notify another process that some event has occured in
    > > multiprocessor systems
    >
    > Lots of ways, event objects is one, completing the pending IRPs is
    > another.
    >
    > Maxim Shatskih, Windows DDK MVP
    > StorageCraft Corporation
    > [email protected]
    > http://www.storagecraft.com
    >
    >
    > ---
    > Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17
    >
    >
    > You are currently subscribed to ntfsd as: [email protected]
    > To unsubscribe send a blank email to [email protected]
    >
  • David_J._CraigDavid_J._Craig Member Posts: 1,885
    Since you are in the file systems newsgroup you will find spinlocks are very seldom needed because of eresources. They can do most of what you need to do in this arena. There are no hardware interrupts in file systems.
    "Rohit" wrote in message news:[email protected]
    these lines are from file system internals by rajeev nagar

    Typically, spin locks and other higher level (Executive) synchronization mechanisms must be used consistently and correctly in Windows NT drivers to ensure correct functionality on multiprocessor systems

    Is this indicates that mutex are not multiprocessor safe in kernel drivers, then how can it be possible that user level mutex are multi processor safe


    On 12/13/06, Maxim S. Shatskih < [email protected]> wrote:
    > If in a Multi processor system, i released the mutex, then can the thread
    > from different process running on different processor acquire the same mutex
    > or not.

    Yes it can.

    >Or how can we notify another process that some event has occured in
    > multiprocessor systems

    Lots of ways, event objects is one, completing the pending IRPs is another.

    Maxim Shatskih, Windows DDK MVP
    StorageCraft Corporation
    [email protected]
    http://www.storagecraft.com


    ---
    Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

    You are currently subscribed to ntfsd as: [email protected]
    To unsubscribe send a blank email to [email protected]
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    >> Typically, spin locks and other higher level (Executive) synchronization
    >> mechanisms must be used consistently and correctly in Windows NT
    >> drivers to ensure correct functionality on multiprocessor systems

    > Is this indicates that mutex are not multiprocessor safe in kernel drivers,

    Really ? I guess it just indicates they must be used correctly :-)
    All synchro objects are of course able to handle multiprocessor issues.

    L.
  • Don_BurnDon_Burn Member - All Emails Posts: 1,710

    Why are you commenting on a 14 year old post? And you are incorrect, Windows runs on NUMA systems, on systems where not all processors can receive all interrupts. Your data is as out of data as the post.

This discussion has been closed.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Internals & Software Drivers 30 Nov 2020 LIVE ONLINE
Writing WDF Drivers 7 Dec 2020 LIVE ONLINE
Developing Minifilters Early 2021 LIVE ONLINE