Sunday, June 21, 2009

My take on SST

My search of some sort of OS suitable for N1's on-board computer based on LPC2103 lead me to an article "Build a Super Simple Tasker" (SST). The article describes a "run-to-completion (RTC) prioritized, fully preemptive, deterministic real-time kernel". Although I like the simplicity of the idea I think that tight coupling between an event and its target task in SST implementation (see Listing 3) reduces flexibility of the kernel. The Observer pattern is commonly utilized by event propagation frameworks including frameworks designed by Mother Nature. Additionally, an Observer pattern based design would allow to create and destroy tasks during an application run time. With these thoughts in mind, I decided to put together my own implementation of the idea. Since the coding has been completed I am using this implementation in two unrelated projects and should confirm that RTC tasks fit pretty nicely into FSM oriented designs and single event queue implementation of the Observer pattern provides nice to have extra flexibility with minimal impact on performance.