Tag Archives: RTOS

RXF Timer possible problem

The current version of the RXF has a potential timer problem.

On systems that are running on a high load it can occur that longer timeouts are processed too late.

Cause:
The timerouts are stored in a sorted list, first expiring timeout is the first list element. When a timer tick arrives only the first elements timeout value will be decreased.
On full load systems, the timeouts are not always processed immediately, so the system tick count could be larger then 1. When that happens, and the next expiring timeout has a tick value less then the system tick value, ticks would get lost.
This effect is hardly noticeable on systems with only short timeouts especially since the system is under full load anyway.
However when longer timeouts are used they will expire much later due to the stacking of this effect.. (50% longer)
The new version of the framework has corrected this error.

Fixed Case 4525: Possible enterCriticalRegion without exitCriticalRegion if a WST_MEM_Pool runs empty.

Affects:
All C-language RXF releases using an RTOS.

Problem description:
If a MEM_Pool is out of memory we enter a critical region without exiting it. With an RTOS this causes taking a mutex which will not be freed again.

In the non-preemptive OO-RTX there is unusally no need to protect that region of WST_MEM_Pool_getMemory(). Future releases have support for a define WST_MEM_POOL_CRITICAL_REGIONS and will already contain corrected code for this issue.

Continue reading