Skip to content

CPU usage time, simulation time and determinism #1675

Answered by robgjansen
bergerch asked this question in Q&A
Discussion options

You must be logged in to vote

The Shadow v1.x design has a preliminary cpu modeling feature that attempted to take into account CPU usage of the plugins running in Shadow. It works roughly as follows:

  • Shadow starts a timer before it jumps over to the plugin stack to continue running it.
  • When the plugin executes a blocking syscall that requires us to jump back to the Shadow stack and continue progressing simulation time, we stop the timer.
  • The delay time is the difference between the timer start and stop time.
  • Shadow adds the delay time to a CPU model for the host.
  • If the cumulative delay is greater than a threshold, then the CPU is considered blocked and will become unblocked again after the simulation time advances …

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
1 reply
@bergerch
Comment options

Comment options

You must be logged in to vote
8 replies
@lifeoftomi
Comment options

@bergerch
Comment options

@lifeoftomi
Comment options

@bergerch
Comment options

@robgjansen
Comment options

Answer selected by robgjansen
Comment options

You must be logged in to vote
1 reply
@robgjansen
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants