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


SVG not supported

Login to reply

👍?
helpful
1:18am Thu 7th Sep, ANONYMOUS

Hi, I was wondering if someone can explain the extra second for transitioning between status changes. Is it supposed to be there, is it not, why is it there sometimes and sometimes not. In the below attachment I used a shortsleep command that is the following. # shortsleep 10usecs sleep 20usecs 50usecs exit # So sleeps for basically only 20usecs u So ignoring the 0th usecond for the sake of 0 being 0, the 0th usecond is actually dedicated to being a usecond of status change from ready to running. Anyways from (1 to 5) is 5usecs for status change from ready thats completely fine. Then the command executing on CPU takes 10 usecs which are from 6 to 15 as shown in the picture. Then this is the confusing part for me is the 16th usecond an extra usecond for status change or is it included in the status change transition time. If it is the later then why does it specific starting from 17 and not 16th. If former why does only it take an extra usecond for status change only on this occasion and not any other time? Moving on if we assume that it takes an extra usecond to do the status change, my program is supposed to sleep for 20uses (10 from status change and 10 idiling) however as you can see it only takes 19usecs sleeping, unless we include the 36th usecond as the 20th usecond it sleeps for, something is wrong. But then if we assume that the 36th usec is part of the sleeping time what is the role of the 16th usecond. Then again you can see when it goes back from sleeping to ready it takes 10usecs which is from 37 to 46. But then the 46th is not used for an extra usec status change like 16th is used. Honestly all code would make sense if the 16th usecond was part of either the execution time or the sleep time. Can anyone shed some light on this? Can someone clarify



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