<div class="gmail_quote">Peter & Anjo,</div><div class="gmail_quote"><br></div><div class="gmail_quote">Thanks for the reply guys. This is exactly what i am doing (suing syssim_driver.c). The example gives a way of creating some random requests, instead of that I have created the request from a trace file (the same trace file which i used on the "storage level disksim simulation"). I am using the same parameters for both the simulations, but getting different results.</div>

<div class="gmail_quote"><br></div><div class="gmail_quote">I didn't understand the complete post by Anjo. However, his clue on the way system level simulation is going on makes me think that the example in the syssim_driver.c is modeled more or less like a closed system (a request is added using the  disksim_interface_request_arrive() and then is allowed to process completely using  disksim_interface_internal_event() without adding any new requests to the queue).</div>

<div class="gmail_quote"><br></div><div class="gmail_quote">And I think this is what is explained here <a href="https://sos.ece.cmu.edu/pipermail/disksim-users/2007-September/000214.html">https://sos.ece.cmu.edu/pipermail/disksim-users/2007-September/000214.html</a></div>

<div class="gmail_quote"><br></div><div class="gmail_quote">Please let me know if this makes any sense and in the mean time i will try to change the syssim_driver and see if i can make any progress. I once again thank you guys for your time. </div>

<div class="gmail_quote">
<br>
Message: 2<br>
Date: Sat, 10 Dec 2011 01:17:54 -0500<br>
From: Peter Macko <<a href="mailto:pmacko@eecs.harvard.edu">pmacko@eecs.harvard.edu</a>><br>
Subject: Re: [Disksim-users] Using Disksim<br>
To: Ricardo Rey <<a href="mailto:ricardoreyyy@gmail.com">ricardoreyyy@gmail.com</a>><br>
Cc: <a href="mailto:disksim-users@ece.cmu.edu">disksim-users@ece.cmu.edu</a><br>
Message-ID: <<a href="mailto:AA2BEA77-1A51-40DD-8F2F-78F73BE88880@eecs.harvard.edu">AA2BEA77-1A51-40DD-8F2F-78F73BE88880@eecs.harvard.edu</a>><br>
Content-Type: text/plain; charset=iso-8859-1<br>
<br>
Hi,<br>
<br>
There is a very simple, yet complete, example that is directly distributed as a part of the DiskSim source code - it's src/syssim_driver.c. It shows you how you can run DiskSim from your C code and pass to it your own requests one I/O request at the time.<br>


<br>
In short, you need to specify a .parv file (such as any one of those in the valid/ directory) and an output file when you initialize DiskSim using disksim_interface_initialize(), and then you can submit your own I/O requests using disksim_interface_request_arrive() as shown in the example. The only catch is that you would need to make additional calls to disksim_interface_internal_event(), but that's all shown in the example.<br>


<br>
To run the example, just compile DiskSim as usual, and then you can run something like "src/syssim valid/hp_c2490a.parv output.txt 10000" from the disksim/ directory.<br>
<br>
I hope this helps.<br>
<br>
Best,<br>
<br>
-Peter<br>
<br>
<br><br>
<br>
Message: 3<br>
Date: Sat, 10 Dec 2011 13:05:44 +0100<br>
From: <a href="mailto:vahldiek@mpi-sws.org">vahldiek@mpi-sws.org</a><br>
Subject: Re: [Disksim-users] System Level Simulation<br>
To: "kolla purushotham" <<a href="mailto:kollapurushotham@gmail.com">kollapurushotham@gmail.com</a>><br>
Cc: <a href="mailto:freesuraj@gmail.com">freesuraj@gmail.com</a>, <a href="mailto:disksim-users@ece.cmu.edu">disksim-users@ece.cmu.edu</a><br>
Message-ID:<br>
        <<a href="mailto:5ce977e4a056681b9ce9b215761c59ac.squirrel@mail.mpi-sws.org">5ce977e4a056681b9ce9b215761c59ac.squirrel@mail.mpi-sws.org</a>><br>
Content-Type: text/plain;charset=iso-8859-15<br>
<br>
Hi,<br>
<br>
I have seen the behavior before and studied the execution of the syssim.<br>
you will see differences at the level of the disksim_diskctlr. These<br>
differences come from an issue within the current syssim implementation in<br>
which the following happens:<br>
1) a request is inserted into disksim<br>
2) the request is handled<br>
3) the method to report completion is called<br>
<br>
Until now everything seems fine, if the next request would immediately<br>
start after the request completion method is called. Unfortunately this is<br>
not the case, the syssim stays within the loop processing disksim events.<br>
/* Process events until this I/O is completed */<br>
while(next_event >= 0) {<br>
 now = next_event;<br>
 next_event = -1;<br>
 disksim_interface_internal_event(disksim, now, 0);<br>
}<br>
<br>
Why is this the case? The request is fully processed so there shouldn't be<br>
any events within the system, right?<br>
Disksim adds an event automatically after every request to continue<br>
reading after the request is over. This is done at the disksim_diskctlr<br>
level and continues until the segment storing the request is full.<br>
<br>
For me this meant a difference in completion time and next starting time<br>
of around 0.5ms.<br>
<br>
To address the issue I think I added && completion == 0 to the while loop.<br>
This should stop the loop when the request is completed. All other events<br>
will not be taken into account then. You may run into trouble, if you<br>
insert multiple requests starting nearly at the same time.<br>
<br>
I hope this helps...<br>
<br>
Regards,<br>
Anjo<br>
<br>
> Hi,<br>
><br>
> I am doing a simulation using disksim as a blackbox (using Disksim in<br>
> system level simulation as suggested in page 44 of the manual). Here is<br>
> the<br>
> situation:<br>
><br>
> I am using the same trace and .parv files to do an interface simulation<br>
> and<br>
> an internal simulation. Both of them are giving different results. When I<br>
> observed the output event files I found that the event sequence is a lot<br>
> different in both the scenarios and I have no idea why it is happening so.<br>
> My doubt is can this happen, given that I am using the same input?<br>
><br>
> Any help will be greatly appreciated.<br>
><br>
> --<br>
> Regards,<br>
> Purushotham<br>
> _______________________________________________<br>
> Disksim-users mailing list<br>
> <a href="mailto:Disksim-users@ece.cmu.edu">Disksim-users@ece.cmu.edu</a><br>
> <a href="https://sos.ece.cmu.edu/mailman/listinfo/disksim-users" target="_blank">https://sos.ece.cmu.edu/mailman/listinfo/disksim-users</a><br>
><br>
<br>
<br>
<br>-- </div>Regards,<br>Purushotham<br>