It's UWAweek 39 (2nd semester, week 9)

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.

click
Displaying selected article
Showing 1 of 641 articles.
Currently 8 other people reading this forum.


 UWA week 35 (2nd semester, week 6) ↓
SVG not supported

Login to reply

👍?
helpful
9:57am Sun 27th Aug, ANONYMOUS

By my understanding of the project sheet, the system call for a process should occur when it has accrued enough time on the CPU. If the command file is as follows and the time quantum is 5 usecs: first 3usec spawn second 8usec exit second 3usec exit The first process is spawned and a context change READY->RUNNING is performed taking up 5 seconds of total time (total time = 0 until total time = 5). On the 5th usec the first process is on the CPU accruing time such that at total time = 6, the first process has been on the CPU for 1usec. By my understanding, the spawn syscall would occur at total time = 8, after it has been on the CPU for 3usecs. The second process is moved from NEW->READY instantly, and the context change to move the first process from RUNNING->READY occurs at total time = 8 until total time = 18. Then the context change to move the second process from READY->RUNNING occurs from total time = 18 until total time = 23. In the sample solution screenshot below, there seems to be an extra usec of total time from 5-9 that the process is on the CPU and an extra usec of total time from 9-20 for the context change. The first context change READY->RUNNING seems to be fine.



This article has 1 attachment:

 

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