0

Instructions:implement Burst-times are assigned at random (10x10^6 cycles - 50x10^12 cycles). How would I convert this to ms the measurement of burst times.

asdpoi
  • 1

1 Answers1

0

Theoretically? Pick a clock you know it's accurate, run a simulated burst of 10^6 cycles, and measure how long that took.

Now whenever you get a burst assigned, divide by that originally measured time to get the wall clock duration it's going to take.

Only works if cycle execution time is fixed though. So, by design, it won't work on any non-embedded CPU with dynamic clock states or modern architectures which can't be tricked into busy-waiting at a constant instruction throughput.

Ext3h
  • 5,713
  • 17
  • 43