Reprinted from: http://blog.sina.com.cn/s/blog_6464a7210100ghsy.html
Disksim is Alow-level storage simulation tool, which can generatetiming-accurate simulation result. It is developed
Greg Ganger. Current version is 4.0 and it is out in june2008.
Ssdextension for disksim is an extended module of disksim whichimplments ssd I/O models. It is implemented by microsoftresearch.
Compiling disksim and SSD extension is very simple, but when itried, there was some problem.
This article addresses those problems.
Disksim does not compile in 64bit environment. nevertry it. Even if you succeded compilation, it will not run -- justproduces segmentation fault.
Disksim requires bison and flex, which are parser generators forparameter File Parsing codes.
Step 0. Install bison and flex, if you have not installedalready.
$ Sudo apt-Get install bison flex
Step 1. Download and unzip.
Sources can be downloadedfrom the links above. I downloaded disksim 4.0 with dixtrac.
$ Tar xfz disksim-4.0-with-dixtrac.tar.gz
$ Disksim-4.0 CD
$ Unzip ../ssd-add-on.zip
Step 2. Apply SSD add on patch.
$ Patch-P1 <ssdmodel/SSD-patch
Step 3. append SSD model library path to dixtrac.
Add these lines to dixtrac/. Paths
# Path tossdmodel
Exportssdmodel_prefix = ../ssdmodel
Exportssdmodel_incl = $ (ssdmodel_prefix)/include
Exportssdmodel_cflags =-I $ (ssdmodel_incl)
Exportssdmodel_ldpath = $ (ssdmodel_prefix)/lib
Exportssdmodel_ldflags =-L $ (ssdmodel_ldpath)-lssdmodel
Modify dixtrac/makefile like this:
$ (Libdisksim_ldflags )\
$ (Memsmodel_ldflags )\
$ (Diskmodel_ldflags )\
$ (Ssdmodel_ldflags )\
$ (Libparam_ldflags )\
$ (Libddbg_ldflags )\
$ (St_ldflags)
Cflags =-wall-g-MD-I. $ (defines)-I $ (sthreads) $ (dmincludes )\
$ (Libdisksim_cflags )\
$ (Diskmodel_cflags) $ (libparam_cflags) $ (libddbg_cflags )\
$ (Ssdmodel_cflags)
Step 4. Compile ~~~!
$ Make
Step 5. Check if it works well.
$ CD valid;./runvalid
$ Chmod A + x ../ssdmodel/valid/runvalid
$ CD ../ssdmodel/valid;./runvalid
OK. It is all.