This content has been marked as final. Show 2 replies
The Real-Time Specification for Java defines precisely when ReleaseParameters changes take effect in the "Scheduling" section:
The answer to your question depends on the class of the old and the new ReleaseParameters of the RealtimeThread. For instance, changing
the release parameters of a RealtimeThread from PeriodicParameters to AperiodicParameters takes effect immediately unless the thread is blocked-for-release-event, in which case the change takes place after the next release event. However, if the release parameters are changed from PeriodicParameters to another PeriodicParameters, then the change takes effect on the first invocation of waitForNextPeriod() where the RealtimeThread is not in a deadline miss condition.
If you have issues in finding out the right semantic for the kind of changes you want to perform, you can describe them more precisely and I'll provide you with the semantic that applies in this case.
Regarding your Producers/Consumer scenario, the Consumer should not miss deadlines because it won't block on the read(). With a WaitFreeReadQueues, the read() method never blocks. However, if the queue is full, the Producers will block on the write() (remember, the WaitFreeQueues are fixed size data structures). The Producers remain blocked until the Consumer reads a values. Once the Consumer's read is performed, there's one free slot in the queue, so the blocked writers are unblocked, and one of them will complete its write().