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


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

Login to reply

👍?
helpful
7:21am Wed 23rd Aug, Christopher M.

ANONYMOUS wrote:
> Hi, I am a bit new to understanding the in depth functions of an O.S and so I am confused about how we are meant to carry out the project.
Hi. Nearly everyone in the unit is new to how the internals of an OS work, so you're not alone. However, you do appear to have some serious misunderstandings about the project (as do many others), so I strongly recommend that you find a project partner, have some discussions with them about what you both understand, and get along to a lab session to discuss your ideas with the helpful people there. We are writing a simulation, an emulation, of the process scheduling on a simple computer system consisting of a CPU and input/output devices, all connected by a data-bus. We are simulating the creation, execution, and eventual termination of multiple processes, each being instances by a limited set of commands, with the system-calls executed by each process clearly stated/known and fixed. While running the simulation we need to manage the actions of each process as it changes state, and manage the advancement of time. We are not executing real processes, on real hardware, such as on your laptop.
> 1) Firstly, I don't know how the information in the sysconfig file is used, are they environment variables? > In the brief, it says that the sysconfig file, defines characteristics of our hardware and the time-quantum for scheduling. > > Depending on the command we use, will we be using a different hardware device? As in, when we run a certain command, will it require resources from a certain hardware device?
The processes (invocations of the limited set of commands) perform a well-defined sequence of system-calls. Calls to read or write indicate which device their I/O is being performed on and, with reference to that device's read or write speed, we can determine how long that I/O will take to complete (once the process requesting the I/O has waited for and acquired the data-bus).
> 2) In the brief it says when we invoke a command, a process is created that then carries out the system calls. How do we know where the process IS? Weather its waiting or running? When we run the command does it return a tangible variable? How do we access process information from commands?
When processes are first invoked, they enter the Ready state, advance to the Running state, and then advance other states depending on which system-calls they make. Your simulation of the processes will need to keep track of 'where' the process is - if it's in a queue, on the CPU, or has terminated.
> Can we access the kernal's Job Que or something?
We are simulating all of this, not interrogating what is happening on your physical laptop. We are not involving your (real) OS's internal data structures.
> Is there a function that lets us see how long a process is run for?
You will need to keep track of the whole system's time, and the time of/spent by each process. Hope this 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