DiskSim is a low-level storage simulation tool, which can generate timing-accurate simulation result. It is developed by Greg Ganger. Current version is 4.0 and it is out in June 2008.
SSD extension for DiskSim is an extensional module of DiskSim which implments SSD I/O Models. It is implemented by Microsoft Research.

Compiling DiskSim and SSD extension is very simple, but when I tried, there was some problem.
This article addresses those problems.
DiskSim does not compile in 64bit environment. Never try it. Even if you succeded compilation, it will not run -- just produces segmentation fault.


DiskSim requires bison and flex, which are parser generators for parameter file parsing codes.

먼저 위의 링크에서 disksim-4.0-with-dixtrac.tar 파일과 ssd-add-on.zip 파일을 받아야 한다.

sad-add-on.zip파일은 disksim-4.0-with-dixtrac.tar파일을 풀어 생긴 디렉토리(disksim-4.0)에 압축을 풀어야 한다.

그리고 patch는 disksim-4.0디렉토리에서 수행해야 한다.
Step 0. Install bison and flex, if you have not installed already.
$ sudo apt-get install bison flex

Step 1. Download and unzip.
Sources can be downloaded from the links above. I downloaded DiskSim 4.0 with dixtrac.
$ tar xfz disksim-4.0-with-dixtrac.tar.gz
$ cd disksim-4.0
$ 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 to ssdmodel
export SSDMODEL_PREFIX=../ssdmodel
export SSDMODEL_INCL=$(SSDMODEL_PREFIX)/include
export SSDMODEL_CFLAGS=-I$(SSDMODEL_INCL)
export SSDMODEL_LDPATH=$(SSDMODEL_PREFIX)/lib
export SSDMODEL_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.


출처 

http://scobyseo.blogspot.kr/2009/12/how-to-compile-disksim-40-ssdsimms-in.html


Posted by cyj4369
,