Practical
Embedded Java

Periodic Threads


A practical engineering approach to using embedded Java in real-world applications.


...



JStamp, JStik, and SaJe support a proprietary PeriodicThread class. PeriodicThread extends the generic Java Thread class. Periodic threads must be scheduled by the aJile PianoRoll class.

We intend to implement a Systronix wrapper around these lower-level aJile constructs, hopefully by the end of 2003. We're currently working on this.


Periodic Threads
JStamp Periodic Threads Presentation
(updated 2003 Nov 07) (200 KB)
Describes using periodic threads on JStamp (also applies to JStik and SaJe).
Updated 2003 Nov 07 with major corrections to how periodic threads of the same priority and period can be round-robinned.
RoundRobinPeriodicThread.jar (100 KB)
2003 Nov 18
Example which can demonstrate round-robinned or sequential/offset periodic threads. Be sure to read the javadoc comments and look over the source code to understand how it works.

General Comments and Tips
getPriority() not meaningful in PT constructor The constructor of a Periodic Thread executes in whatever thread invoked the constructor, so you can't use the 'this' keyword to query the PeriodicThread fields, since you will only be querying the thread which invoked the constructor. For example if you invoke this.getPriority() in a PeriodicThread constructor it will not return the priority of the PeriodicThread, but the priority of the invoking thread.
   

 
Systronix® 939 Edison St, Salt Lake City, Utah, USA 84111
Tel +1-801-534-1017, Fax +1-801-534-1019
contact us     Time Zone: MDT (UTC-6)
 

Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
Systronix is independent of Sun Microsystems, Inc.
TStik, JStik, JCX, JStamp, JSimm, JDroid, and JRealTime are trademarks of Systronix, Inc.
1-Wire, iButton and TINI are trademarks of Dallas Semiconductor
Simmstick is a trademark of Dontronics
LEGO® is a trademark of Lego A/S, Denmark