It's UWAweek 49

help2002

This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.
Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.
Displaying the 3 articles in this topic
Showing 3 of 1168 articles.
Currently 2 other people reading this forum.


 UWA week 36 (2nd semester, mid-semester break) ↓
SVG not supported

Login to reply

👍?
helpful
11:35am Mon 4th Sep, ANONYMOUS

Ok so if I try using the new sample solution with a command file containing only the default "cal" command, and syscall file directly copied from project page. The verbose output shows the write being completed instantly with negative time? Not sure if I wrote something wrong, apologies if it was my mistake. Supposedly the write time would be 2000/3 usecs (about 666.67usecs)



This article has 1 attachment:

 

SVG not supported

Login to reply

👍?
helpful
2:43pm Mon 4th Sep, Christopher M.

ANONYMOUS wrote:
> Ok so if I try using the new sample solution with a command file containing only the default "cal" command, and syscall file directly copied from project page. The verbose output shows the write being completed instantly with negative time?
Thanks! Yes, very likely a bug through only testing with too-small values. A negative time quickly suggests a problem with overflow in the calculation of time required. Will look into it.


SVG not supported

Login to reply

👍?
helpful
3:57am Wed 6th Sep, Christopher M.

I believe the problem reporting negative I/O times has been corrected. Please report any problems. The arithmetic was being performed using a standard int (4 bytes), which overflowed with larger (faster) I/O speeds. If you're having similar problems, you can perform the arithmetic using int64_t or double. You may like to read about the ceil() function, too.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  5:07AM Sep 06 2023
Privacy policy