2

Imagine that I have a linux program that does some network IO. Execution of the program is not deterministic: it gonna produce different results depending on how it's threads are scheduled, what random values provided by OS, how kernel IO is handled, how long it gonna take to execute this or that piece of code, what memory is in CPU cache.

Is it possible to configure docker run in such a way, that I will always have exactly same behavior of the program? Just specify some random seed before run and have exactly same kernel scheduling, exactly same CPU cache? Given that all input is provided precisely in same time.

Probably it's not possible today, but what are limitations for implementation of that kind of deterministic runs?

1
  • You could capture the network I/O with precise timestamps, and then replay it with an emulator, injecting it at the correct (simulated) times. Will require modifying the emulator a bit, and won't run in realtime. It will also require an emulator that handles cache misses and their timing (or ignores caches completely). Commented Dec 11, 2018 at 15:12

1 Answer 1

2

A docker container is just a process with different namespaces, it otherwise runs in the system exactly like other processes (in particular its thread and I/O scheduling). So if you can't to it do a standard process you can't do in in a Docker container.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.