[Disksim-users] System Level Simulation

kolla purushotham kollapurushotham at gmail.com
Thu Dec 22 16:05:12 EST 2011


Guys,

Now I am facing another problem. In the file disksim_interface.c it is
written that the function disksim_interface_io_done_notify () can be used
as a call back for request completion.

/* This is the disksim callback for reporting completion of a disk
 * request to the system-level simulation -- the system-level *
 * simulation should incorporate this completion as appropriate *
 * (probably by inserting a simulated "disk completion interrupt" at *
 * the specified simulated time).  Based on the requestdesc pointed to
 * * by "curr->buf" (below), the system-level simulation should be
 * able * to determine which request completed.  (A ptr to the
 * system-level * simulator's request structure is a reasonable use of
 * "curr->buf".)

According to this paragraph it says that curr->buf can be used at the
system level driver for calculating statistics. However, buff->start is not
indicating the start time of the request that got completed and is
indicating the start time of the recent request scheduled (It perfectly
works for synchronous requests as the example shows, but for asynchronous
requests its giving out -ve response times). Am I missing something here,
any advice on the situation is highly appreciated.



On 18 December 2011 03:20, kolla purushotham <kollapurushotham at gmail.com>wrote:

> Guys,
>
> First of all let me thank Peter :). This is what I ended up with to make
> the system level simulation work in an asynchronous way (so that some one
> can use it as a reference).
>
>  while(fgets(line, 200, tracefile))
> {
>
>     sscanf(line, "%lf %d %d %d %d \n", &r.start, &r.devno, &r.blkno,
> &r.bytecount, &r.flags);
>     printf("%lf %d %d %d \n", r.start, r.devno, r.blkno, r.bytecount/512);
>     fflush(stdout);
>     nextiotime = r.start;
>
>     while((nextiotime >= next_event) & (start == 1))    // used start as a
> flag to mark it as a first time entry to the loop.
>     {
>         currtime = next_event;
>         disksim_interface_internal_event(disksimIntr, currtime, 0);
>     }
>     {
>         start = 1;
>         currtime = nextiotime;
>         disksim_interface_request_arrive(disksimIntr, currtime, &r);
>     }
> }
>
> --
> Regards,
> Purushotham
>



-- 
Regards,
Purushotham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/disksim-users/attachments/20111222/eaae2270/attachment.html>


More information about the Disksim-users mailing list