Fix for thread creation and termination issues

Releases, updates and announcements from the Ultibo team.
User avatar
Ultibo
Site Admin
Posts: 1476
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Fix for thread creation and termination issues

Postby Ultibo » Thu Jun 29, 2017 2:11 am

Some intensive testing of HTTP transactions being undertaken by Ultibo users has highlighted a number of failures related to thread creation and termination under repeated and continous operation.

An update has now been committed which resolves most of the currently reported issues and significantly improves the ability of Ultibo applications to handle sustained transactions via HTTP or other protocols.

This update contains the following fixes:

  • Change the thread termination process to use a timer instead of being called from SchedulerReschedule() in order to prevent a deadlock scenario with the heap manager.
  • Make the termination of threads release the stack almost immediately (100ms by default) in order to improve memory utilization and allow greater transaction volumes without running out of memory, the timeout can be adjusted by the SCHEDULER_TERMINATION_INITIAL variable in GlobalConfig.
  • Increase the default starting value of the PAGE_TABLES_FREE variable which is used to determine the number of second level page tables to be allocated during startup, the new default of 1024 allows the entire physical memory to be mapped into second level pages.
  • Fix the QueueDequeue() function in the Threads unit which was failing to update the delta value of the following key, this could result in incorrect delays being calculated when dequeing multiple threads.
  • Add error logging to indicate if the ThreadAllocateStack() function failed to allocate a stack which would in turn cause a failure to create a new thread.

For details of how to apply the latest source to your Ultibo core installation and rebuild your run time library see the wiki page Building from Source or watch the Building the RTL video on YouTube.
Ultibo.org | Make something amazing
https://ultibo.org
mark
Posts: 786
Joined: Mon Oct 03, 2016 2:12 am
Location: Indianapolis, US

Re: Fix for thread creation and termination issues

Postby mark » Sun Jul 02, 2017 2:41 am

Ultibo wrote:An update has now been committed which resolves most of the currently reported issues and significantly improves the ability of Ultibo applications to handle sustained transactions via HTTP or other protocols.
Great support. I know that took more than a few hours and some aspirin. I put $99 in my monthly forum support sponsorship for July 2017. Mark.
Jyv
Posts: 132
Joined: Mon Feb 08, 2016 1:30 pm

Re: Fix for thread creation and termination issues

Postby Jyv » Sun Jul 02, 2017 12:40 pm

at this level of support, it tends to me more a "monasterial priesthood" provided by @Ultibo
Everyone is very thankful to the level of dedication you are showing.

Return to “Ultibo”

Who is online

Users browsing this forum: No registered users and 1 guest