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


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

Login to reply

👍?
helpful
5:07pm Mon 4th Sep, Christopher M.

"Lewei Xu" <23*0*0*8@s*u*e*t*u*a*e*u*a*> wrote:
> 1. When time quantum = time of system call. At this point I am assuming it is intentional, that is, to move the process off running and run the system call at 0usecs the next time it is on the CPU. Logically (and intuitively), I believe the system call should occur first, but if this is how you want us to do it, I don't really mind. Just need some clarification on if this is actually how you want us to implement the time quantum.
Sorry, but I cannot understand your description or reasoning here. I'm wondering if there's confusion because multiple 'things' are sometimes reported at happening at the same (integral) time? For example, if a process has spent a 5 full usecs computing, and its TQ expires at the the end of that 5th usec, it cannot 'squeeze' a system-call into that same 5th usec. Can you provide (the smallest) example - just state the TQ and give the command-file - that demonstrates your concern?
> 2. Timing is still off slightly. There is still an extra usec after a system call occurs. In the screenshot below, I believe 'spawn' should occur at t = 25. If this was intentional, could I please get confirmation so that I can also implement this in my own solution?
Unsure if this is the same possible misunderstanding. The transition from READY->RUNNING takes the full 5 usecs (21..25), at the end of that 25th usec the process is back on the CPU, and at the beginning of the 26th usec it gets to execute its spawn system-call. It cannot execute the system-call during the 25th usec, as the OS still owns the CPU until the end of that 25th usec. At the beginning of the 26th usec, the process now own the CPU and can continue its execution.

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