Quote:
Originally Posted by wireties
That is really close. VxWorks has the following task states: executing, ready, blocked, delayed or any of these things in combination with suspended or stopped. I suspect the delay method simply puts the task into a delayed state. The "busy waiting" thing is not done by the OS. I think ether is referring to something commonly called a spinlock - that could be the case with this delay method but it is nothing to do with the OS.
|
I guess I could have been clearer. None of my comments were referring to the OS. Here's an expanded clumsy-reading version of my post, with nothing left to the reader's imagination:
If the delay is implemented as blocked waiting
(used generically here to include blocked waiting for a timer) (rather than busy waiting
aka "spinning", either by the programmer or by a call to an intrinsic function of the language that the programmer is using or by a library routine that the programmer calls either directly or indirectly) it halts only the thread in which it is located. Other threads continue to execute. Even if the delay is implemented
(see previous exansion of "implemented") as busy waiting
(aka "spinning"), other threads will execute IF they are of greater priority, or if they are of equal priority AND time-slicing is enabled.