It's UWAweek 30 (2nd semester, week 1)

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 selected article
Showing 1 of 1168 articles.
Currently 9 other people reading this forum.


 UWA week 35 (2nd semester, week 6) ↓
SVG not supported

Login to reply

👍?
helpful
11:32am Mon 28th Aug, Christopher M.

"Jacob Read" <23*7*9*6@s*u*e*t*u*a*e*u*a*> wrote:
> ... if it's trying to sleep for less than the time it takes to switch states, at which point I assume it would immediately wake up upon moving to sleeping.
Yes, and it's realistic, too. From man 3 sleep - "System activity may lengthen the sleep by an indeterminate amount."
> For the integer thing, it's more the problem that when waiting for IO, due to the speeds and amounts of data, it becomes a double upon dividing, if divided correctly. But it the system time has to be an integer, then I'd have to consistently round up. Which means I wouldn't have to use doubles. My approach doesn't move through time by one microsecond at each point, and instead just skips to the next time. This is why this is more of a problem.
You can perform arithmetic in 'doubles' without requiring double variables or managing time with doubles. In the case of finding the next highest integer, you can use the standard ceil() function.

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  7:24AM Jul 25 2024
Privacy policy