Go to Post Want the TL;DR of it? Keep it simple, effective, and easy to use. - Andrew Schreiber [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 09-08-2012, 22:34
Todd's Avatar
Todd Todd is offline
Software Engineer
FRC #1071 (Team Max)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2004
Location: Connecticut, Wolcott
Posts: 51
Todd is just really niceTodd is just really niceTodd is just really niceTodd is just really niceTodd is just really nice
Re: runtime thread execution monitoring (identify cause of hung code)

The method that a lot of embedded systems watchdogs I've come across is the following:

High priority task maintains a collection of bits for other periodic tasks.

High priority task (at the rate that other tasks are expected to run) sets bits false.

Other tasks set the bits true when they run.

If the High priority task, when it goes to set the bits notices that they haven't been flipped back, then it knows that the low priority task has not run in that timeframe.

Once it realizes that a certain number of frames have passed without the other task 'reporting in', it knows something is wrong. You don't really need mutual exclusivity or interrupts to maintain this, so long as you can ensure that the 'task monitor' thread is of elevated priority.

There's no metrics available on 'how much' of the other tasks available cycle was consumed before it was completed, but that could be added fairly trivially.

I work with several systems like this, if the 'tried and true' notion is of any value.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 20:13.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi