Thread: reliable time-stamp counter (TSC) in multicore environment

  1. #1
    Registered User
    Join Date
    Jul 2009
    Posts
    2

    reliable time-stamp counter (TSC) in multicore environment

    Hello,

    I am working on a project to measure the execution time of a program in multicore environment. I realized that TSC of one core is not synchronized with another core. How can I get an uniform and reliable TSC across 8 cores lets say.

    Thanks

  2. #2
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    There's no way. You can lock your thread to one core, however.

  3. #3
    Registered User
    Join Date
    Jul 2009
    Posts
    2
    Basically, I tried to measure the latency of spinlock (from unlock -> acquire lock) in multicore environment. I have one thread with its affinity set on certain core to release the lock and the other thread with different affinity to acquire lock. So far the observed latency tend to fluctuate a lot.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Killing someones grandparents
    By nickname_changed in forum A Brief History of Cprogramming.com
    Replies: 37
    Last Post: 09-07-2003, 07:56 AM
  2. inputting time in separate compilation
    By sameintheend01 in forum C++ Programming
    Replies: 6
    Last Post: 03-13-2003, 04:33 AM
  3. I apologize. Good bye.
    By doubleanti in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 05-03-2002, 06:51 PM
  4. Is this really true or it's just science fiction?
    By Nutshell in forum A Brief History of Cprogramming.com
    Replies: 145
    Last Post: 04-09-2002, 06:17 PM
  5. time class
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 12-11-2001, 10:12 PM