It's UWAweek 9 (1st 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 34 (2nd semester, week 5) ↓
SVG not supported

Login to reply

👍?
helpful
3:55am Sat 26th Aug, Christopher M.

ANONYMOUS wrote:
> 1. In the very first project clarification on this forum, this was the response: > >> 1) Lets say the time-quantum is 100usecs, and a process in the running state has accumulated 90usecs of CPU time so far. If the next system call happens in 20usecs, what should happen? In other words, are the times between system calls the actual time to run the system call, or are they just fixed times between system calls, and we have to imagine code being run in between? > > >That process will stay on the CPU over 91, 92, ... usecs. After the process has been on the CPU for 100usecs (exhausted its time-quantum), it will be moved to the Ready queue. When it is next on the CPU, it gets a new 100usec quantum. After another 20usecs it will make its system-call, and the process will be forced off the CPU. The time taken for the system-call to be executed does not add to the process's accumulated on-CPU time, because the system-call is executed by the operating-system, not the process.
> My interpretation is that during usecs 90-100, the process is on the CPU accumulating time, The next time the process is on the CPU, the process still takes 20usecs to make the system call, instead of 10 usecs. This doesn't make sense, for example, if we had a command that had a single syscall exit at 6usecs and the time quantum was 5usecs, the exit syscall would never be able to exit as every time the process is put back into its running state, the timer to run the next syscall is reset.
The time that a process is on the CPU is accumulated, a statistic of that process. The time taken to make a system-call, or to make a state transition is not performed by the process - it is performed by the OS on behalf of the process.
> 2. Command file format and edge cases: just wanted to confirm if we need to check for any formatting issues and/or wrong data in the commands file as it was not stated explicitly in the project sheet. Can't think of any edge cases at the moment but some hints would be nice :)
We may assume that the format of the commands file will always be correct, and its data values consistent, so we do not need to check for errors. I'm unsure what edge cases there could be??

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