Design Article
Build a Super Simple Tasker
Miro Samek and Robert Ward
7/12/2006 11:26 AM EDT
Open-source real-time kernel! This detailed article spells out how to create your own preemptive kernel that's smaller and faster than most real-time operating systems. This elegant software might be all that many projects ever need.Click to view full content
Navigate to related information



oh, really?
11/18/2007 8:36 PM EST
(sorry, wasn't logged in)
Hi,
Perhaps I haven't understood the scheduler correctly, but the 256 byte table, log2Lkup[], seems like a waste of space. Yes, I know that it's const, but const doesn't work in AVR ATmegas, which have a Harvard architecture (separately addressed buses for code and data), where even consts are in data space. Yes, we can put it into program space: special AVR
functions can fetch bytes from code space: but it's not clear how efficient they are.
At the moment in my current application(1), which is essentially a KSAM database using external serial Flash & FRAM, I have about 500 bytes of program Flash left, and 200 bytes of RAM, and if we need to put SST in...
The problem I'm facing is that a database update takes about 6 ms, and the device needs to service Comms requests at a much smaller latency (about 1ms).
What does using the table solve, as a problem? Understanding this could enable us to solve this using a smaller footprint, e.g. a nibble table, or scrap the table for something like an insertion sort?
Regards,
Alf Lacis
http://au.geocities.com/lacis_alfredo
(1) current MCU, ATmega168 has 16 k Flash & 1/2 k RAM
Sign in to Reply
RomHuang
2/26/2008 2:02 AM EST
I am enjoyed reading this article. The process before ending IRET is great.
1.I thought one event can only post to one particular task, can not to multitask,if tasks can register the events what the task want, It's will more great.
2.The queque for each task will take memory space just like the private stack of traditional kernel(linux,uc/os II). how can we sure not overflowing of the queque?
P.S. sorry for my poor english.
Best Regards,
Rom Huang
Sign in to Reply
RomHuang
2/28/2008 1:12 AM EST
1. How about to design only ONE Queue for all Tasks, just like only one Stack for all Tasks in SST? The scheduler may be more difficult?
2.One Task (or Active Object) can handle many events, some events are important,and some are not. I think the priority should binding to the Events but not Task(or AO) as OS now in embedded system. is it right?
Best Regards,
Rom
Sign in to Reply
RomHuang
2/28/2008 1:56 AM EST
Yes, you recalled me the IOC. Assuredly there is IOC in SST, "if a task(an actor) Post a eventiapplicationjto kernel(Hollywood), then the kernel will CALL(phone) the task some time,the task will not poll the kernel".
Great! I like the idea.
Best Regards,
Rom
Sign in to Reply
Ari Okkonen
9/14/2009 8:41 AM EDT
For previous steps on this approach you may read the paper "ReaGOS - An Application Specific R/T-OS" presented 1993 in 5th Euromicro Workshop on Real-Time Systems.
See http://www.reagenix.com/eurom93k.pdf
Sign in to Reply