[Disksim-users] Disksim as Slave - Some Questions

Ricardo Rey ricardoreyyy at gmail.com
Thu Jan 5 15:48:24 EST 2012


Hi, all!

Thanks to Peter Macko's answer from my previous question I know where to
start to use Disksim as a slave from another code, and I have already
gone through syssim_driver.c many times, so I think I already have somewhat
of a picture of how it works.

However, I still have some questions about some situations which are not
considered in syssim_driver.c, or which I at least have not yet understood:

1) I don't fully understand the disksim_request structure, so some of its
fields raise some questions:

    a) Device number (devno). Is this used as a reference of which disk
receives the request, in case there is more than one disk? If so... which
device number
        makes reference to which disk?  In the .parv files in ./valid, the
only one that I've found that has more than one disk instantiated is
ascii.parv (18 disks), and the
        mapping is done using disksim_iomap {}... but I cannot match the
tracedev and simdev parameters to the device number.
    b) Block number: I have no idea what this is. In the example they use
the third input parameter (argv[3]) and a random number to generate
"r.blkno"... but I don't know what
        it is used for
    c) Request size (bytecount): this is pretty self expanatory. My issue
is this: what is the "unit" of this parameter? Is it in bytes? In sectors?
According to what I've read it must be
        in bytes, because there is a line where this value is divided by
512 (which is the sector size), thus resulting in a one-sector size... if
this value is less than 512, there is an assert
        that fails (bcount > 0  turns out to be false). Can someone tell
me, then, what is the unit of this field?

2) Part of this project requires the simulation of errors (say, a disk
failure, a bus failure, etc)... does Disksim provide this kind of
simulation? (The probability of failure of a disk given
    some information about it, like how old it is, the type and brand, etc).

3) My question about the device number brings me to another issue: if it is
possible to send requests to different disks, is it possible to process
each request at the same time?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/disksim-users/attachments/20120105/c29092a7/attachment.html>


More information about the Disksim-users mailing list