It's UWAweek 24 (1st semester, 2nd exam week)


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 1 other person reading this forum.

 UWA week 34 (2nd semester, week 5) ↓
SVG not supported

Login to reply

3:39am Sat 26th Aug, Christopher M.

> My question is, can I please have an example of how we can use these two commands. I thought having a loop that loops through each command and picking apart the times while comparing the name of the command (e.g. sleep and spawn) might do different things and we can add the times on CPU that way might be easier. Unless I am understanding the problem statement wrong. Thank you for your time.
That approach may work, but the 'picking apart the times' part is difficult because you must account for the interactions and competition between multiple processes. As discussed in Friday's Workshop #5, another (I believe much easier) approach is to loop while there are any processes remaining, having a global clock that advances one usec at a time, and at each instant determining "what is happening now?"

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