New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sending events to RCV end-point and not immediately switching to RCV thread #198
Comments
phanikishoreg
added a commit
to phanikishoreg/composite
that referenced
this issue
Sep 24, 2016
* This is required as current state of thread is not changed when a Sender sends notification to a receiving end-point it has attached to. More info in issue gwsystems#198
9 tasks
phanikishoreg
added a commit
to phanikishoreg/composite
that referenced
this issue
Sep 24, 2016
* Current state of the thread is not modified when there is a asnd event to it, thread state is only modified when a thread is switched to or from. So cos_sched_rcv will be notified if the thread is BLOCKED(RCVING and has no events pending) or not as opposed to whether the thread state is RCVING, so a scheduler can switch to it if it sees eligible. This may not be a permanent solution, see Issue gwsystems#198.
9 tasks
Closed by #200 (@phanikishoreg can you confirm?) |
At the kernel level, the thread states are only tracking for return to user-level semantics for preemption/non-preemption register restore and return convention for a thread suspended on cos_rcv. Having thread states for blocked/unblocked are a user-level scheduling responsibility and not the kernel. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With Tcaps, there is a possibility that a ASnd to a RCV end-point may not always switch to it, which depends whether Sender wants to YIELD to it or If the Recving tcap has higher priority over the sender to be able to switch to it.
This possibility of not switching to the rcving thread has other side-effects, especially if the last state of the rcving thread is THD_STATE_RCVING. If this is the case, then the scheduler thread of the rcving thread would always be notified of the current thread state(i.e, RCVING) with no indication of whether there were Sends to it (whether there are events pending in rcving thread's queue).
The proper design level solution would be to introduce additional thread states, that indicates if the thread is blocked and has no events pending, etc. Basically thread states need to be more elaborate. And changing the thread state to reflect pending events whenever there is a ASND to it.
At this point though, I'm aiming at a low-impact quick-change solution and not expose kernel level to bugs because of the deadline constraints. And that would be, to return a boolean with a sched event to the scheduler which indicates whether the thread has "pending" events, so that a scheduler thread can decide to schedule its rcving thread for it to process it's pending events.
The text was updated successfully, but these errors were encountered: