Hello,
in order to obtain an exact model of my software, I need to know which
thread will be set to RUNNING in the following configuration:
first possibility of operation:
-
original situation
“ThreadA”, P34f, RUNNING → send a message to “ThreadB”
“ThreadB”, P10o, RECEIVE
“ThreadC”, P34f, READY -
ThreadB is scheduled, gets the message and processes it
“ThreadA”, P34f, REPLY
“ThreadB”, P34o, RUNNING
“ThreadC”, P34f, READY -
ThreadB does a reply, then receive and ThreadA is scheduled
“ThreadA”, P34f, RUNNING
“ThreadB”, P34o, RECEIVE
“ThreadC”, P34f, READY
second possibility of operation: -
original situation
“ThreadA”, P34f, RUNNING → send a message to “ThreadB”
“ThreadB”, P10o, RECEIVE
“ThreadC”, P34f, READY -
ThreadC is scheduled
“ThreadA”, P34f, SEND
“ThreadB”, P10o, RECEIVE
“ThreadC”, P34f, RUNNING -
ThreadC is finished and gets ready again, the message from ThreadA is
forwarded to ThreadB
“ThreadA”, P34f, REPLY
“ThreadB”, P34o, RUNNING
“ThreadC”, P34f, READY -
ThreadB does a reply, then receive and ThreadA is scheduled
“ThreadA”, P34f, RUNNING
“ThreadB”, P34o, RECEIVE
“ThreadC”, P34f, READY
third possibility of operation:
… after ThreadB is done with the message, ThreadC is scheduled again so
that ThreadA receives the reply even later…
Is there a definite order of operation when threads at the same priority
level try to become scheduled, when a message passing is involved in the
described way?
Regards.
Nnamdi