It's UWAweek 19

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


SVG not supported

Login to reply

👍?
helpful
9:31am Mon 28th Aug, ANONYMOUS

I was wondering why there is an extra usec of total time for the system call to happen. At t=10, the process has been on the CPU for 5usecs, so the spawn syscall should happen at t=10. In the sample solution, spawn is called at t=11, where there is a usec that seems to have come out of nowhere. Same thing happens with the context change. This is the output I was expecting: @00*0*0*0 REBOOTING @00*0*0*0 spawn 'simples', pid0.NEW->READY @00*0*0*0 pid0.READY->RUNNING simples(onCPU=0) @00*0*0*0 clock +5 (1..5) @00*0*0*1 + @00*0*0*2 + @00*0*0*3 + @00*0*0*4 + @00*0*0*5 + @00*0*0*6 c simples(onCPU=1) @00*0*0*7 c simples(onCPU=2) @00*0*0*8 c simples(onCPU=3) @00*0*0*9 c simples(onCPU=4) @00*0*0*0 c simples(onCPU=5) @00*0*0*0 spawn 'command2', pid1.NEW->READY, pid0.RUNNING->READY simples(onCPU=5) @00*0*0*0 clock +10 (11..20) @00*0*0*1 + @00*0*0*2 + @00*0*0*3 + @00*0*0*4 + @00*0*0*5 + @00*0*0*6 + @00*0*0*7 + @00*0*0*8 + @00*0*0*9 + @00*0*0*0 + @00*0*0*0 pid1.READY->RUNNING And the screenshot below is what the sample solution got



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  8:08AM Aug 25 2024
Privacy policy