You are provided with memory traces to use with your simulator. Each trace is a real recording
of a running program, taken from the SPEC benchmarks. Real traces are enormously big: billions
and billions of memory accesses. However, a relatively small trace will be more than enough to
Operating Systems COP4600, Spring 2021 Programming Assignment 2
keep you busy. Each trace only consists of one million memory accesses taken from the
beginning of each program. The traces are the following (linked from the Canvas project):
1. bzip.trace
2. sixpack.trace
Each trace is a series of lines, each listing a hexadecimal memory address followed by R or W to
indicate a read or a write. For example:
0041f7a0 R
13f5e2c0 R
05e78900 R
004758a0 R
31348900 W
Note, to scan in one memory access in this format, you can use fscanf() as in the following:
unsigned addr;
char rw;
…
fscanf(file,”%x %c”,&addr,&rw);


0 comments