Thread: Thread switch

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    1
    Rep Power
    0

    Thread switch


    On a single-processor machine, I need to measure the time cost for two threads alternate switch using a mutex lock.
  2. #2
  3. Contributing User

    Join Date
    Aug 2003
    Location
    UK
    Posts
    5,117
    Rep Power
    1803
    Originally Posted by homsky642
    On a single-processor machine, I need to measure the time cost for two threads alternate switch using a mutex lock.
    And your question is...?

    The answer may depend on the target processor and OS in question. In a desktop environment the attempt is probably doomed since a non-realtime scheduler is by no means deterministic, and besides your threads/process there will be much else going on besides.

IMN logo majestic logo threadwatch logo seochat tools logo