It's UWAweek 10 (1st semester, week 2)

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


 UWA week 37 (2nd semester, week 7) ↓
SVG not supported

Login to reply

👍x1
helpful
5:23am Thu 14th Sep, Christopher M.

ANONYMOUS wrote:
> As this example should be idle from 247(including)... 566(including) which is exactly 320usecs and then at 567 it should declare it has finished. However the sample solution includes from (246...565) as idle then uses 566 to declare it has finished as shown in the second picture
I'm pretty sure that this has been discussed previously, but I can't find it. The 'belief' is that '246 idle' should not be reported, but it happens because the final reporting/debugging code at the end of each microsecond just prints 'idle' if the CPU is now not occupied. Thus, it reports that multiple things are happening at 246. The 'idle period' genuinely commences at 247.
> Additionally is there any leniency for marking when your time is off by 1 second?
Certainly; given that we're seeing multiple interpretations of when the clock should be incremented and that reported, there's different solutions that meet the 'overall requirement' of executing all processes and I/O in the correct order. The final time in the measurements line is more a reflection of whether code is queuing and selecting processes in the defined order, and will tend to be off by a lot (a lot more than 1usec) if the ordering is wrong. In effect, your final time should be within a range of the sample solution's time T. (don't quote me, but) if a whole sequence of commands involves a total of S system-calls, and each is coded to take an extra 1usec (worst case??), then we'll be looking for a total time of T +/- S usecs. The automatic marking script looks for final times within such a range.

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