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


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

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

Login to reply

5:26am Tue 22nd Aug, Christopher M.

> Hello, I have some questions about the project. Some of them might be kinda obvious, but I want to make sure I understand.
No problems, that's the idea!
> 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.
> 2) Are the definitions in the system config and commands file always on one line, or can they be multi-line? The brief implies that they will always be on the same line, but doesn't explicitly say.
Exactly one line for each sysconfig entry and each command.
> 3) Are all the commands run from top to bottom? The brief implies so, but only actually says "the system 'automatically' commences by executing the first command in the command file."
The commands in the command file *are not* run top-to-bottom. Only the very first command in the file is significant as that's the (only) one that is executed when the system starts. If that very first command does not call 'spawn' then that command will be the only one ever executed.
> 4) This is kinda related to 3). Are all the commands run at once? ie. Are all the commands run, then all the corresponding processes are created, then they're put onto the ready queue, and then the CPU starts executing? Or is it one by one, like get next command -> make process -> run to completion -> repeat?
No, see previous answer.
> 5) The brief says "It takes 20 microseconds for any process to first acquire the data-bus." What does it mean by "first acquire"? Does it mean the process doesn't need to take time to reacquire the data-bus if it already has it and it's going from ready to running?
*Every time* any process wishes to use the data-bus it, takes 20usecs before that process can start reading/writing from/to a device.
> 6) Does our code need to be expandable? As in, do we need easy support for extra commands, system calls, system config variables, etc. Will I be marked down because of a question like "What if a device gets plugged-in/unplugged?"
Your code does not need to support expansion - just meet the project's requirements. However, if there's a need to interview you about your project, you may be asked "How would you support a new system-call?"
> 7) Will we get tests to test our schedulers (pretty please)?
No tests (no test files), but there will shortly be a sample solution that will enable you to test your project's output against the sample's output. Hope that helps,

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