remzi-arpacidusseau / ostep-homework

2.11k stars 1k forks source link

disk.py, parameter S doesn't work correctly #14

Closed laushkeen closed 4 years ago

laushkeen commented 4 years ago

I execute the program with the following parameters:

disk.py -a 30 -S 10 -c

Here is the answer that the program returns: Block: 30 Seek: 8 Rotate:337 Transfer: 30 Total: 375 TOTALS Seek: 8 Rotate:337 Transfer: 30 Total: 375

Obviously, the seek time should be 20 as the head goes from the outer to the inner track.

Try different options they return wrong seek times as well.

remzi-arpacidusseau commented 4 years ago

You are interpreting the seekspeed parameter (-S) incorrectly. Use the graphical form of the tool to see how it works.