OpSys Spring 2006 - HW4 FAQ

Click on a question to expand it (for the details).
Click on the question title again to hide the details.

+ Input Generator

Question:

How do I generate inputs to test my simulator?


Answer:

Certainly you should create some small, manually crafted input files to test your simulator. You should also consider writing some programs that generate input files to mimic specific memory access patterns. For example (an example of a kind of memory access pattern), what happens (using each of the algorithms), if a program scans an array over and over many times?

Dave has written a generator (A perl program: generate.pl) that tries to generate the memory access pattern that might result from running a number of multiple processes, each of which accesses memory according to a probability density function. Roughly speaking, each simulated process tends to access memory locations that are close to the last location accessed according to a gaussian probability distribution. So if memory location 1000 is accessed by process x, the most likely memory locations to be accessed next are very close to 1000, but it is possible that something far away will be accessed. The next access will then depend on the new starting point (and so one). This happens for a bunch of simulated processes, with processes scheduled randomly. See the comments in the generator file for the details - there are many customizable parameters...