It's UWAweek 8


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 2 other people reading this forum.

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

Login to reply

5:07am Mon 28th Aug, Christopher M.

"Jacob Read" <23*7*9*6@s*u*e*t*u*a*e*u*a*> wrote:
> I have some questions about the sample solution for myscheduler. When sleeping a specific process, it doesn't seem to take into account the 10 microseconds required to move the process from running into blocked, before sleeping. Should we also not account for this?
A process asking to sleep for some time, is asking for that time on 'the clock on the wall'. If it makes the request to sleep for 10 seconds at time=3 seconds, it expects to be awoken at 13 seconds (but can't expect to run at exactly 13 seconds). The processes doesn't care what else is happening while it is sleeping, such as being moved between states.
> Also, I don't understand where the project is gaining the extra 2 microseconds from (this is using the standard example sysconfig and commands list). Like it can go from 1 to 5 to first go into the running state, and then takes 10 microseconds to execute the sleeping syscall, which would be 16-25, right? For example, my version of the project would give measurements of 1000080 0. Because it would add 10 microseconds because of moving the running process into blocked, but it wouldn't have the additional 2 microseconds.
I'm unsure what you're comparing these values with/from, but please lease use the web-based sample solution, rather than the Workshop 5 recording, for comparison purposes.

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