[En-Nut-Discussion] RFC: Nut/OS Tasks

Timothy M. De Baillie debaillie at ciholas.com
Tue Jul 14 15:37:49 CEST 2009


It seems like this conversation is trying to make a cooperative 
multitasking system act like a time-sliced system.

If time-slicing is required, maybe you should consider another OS or 
there should be a build option in the OS to make it time-sliced and not 
cooperative multitasking. Of course this would involve extensive work on 
the OS (heap allocation, thread/event/process management, interrupt 
management, etc.).

Just an idea. Personally the cooperative multitasking is nice to have 
sometimes. If a small delay isn't a problem, you could always setup the 
"task" as a higher priority (lower number) thread that sleeps infinitely 
on an event and make the Timer IRQ post the event. Of course this 
doesn't cause the thread to run immediately, but assuming you can accept 
a small delay (the longest running threads execution time), it would 
work for most scenarios.

The processors that the NutOS is developed for do not lend themselves 
well to large-scale time-slicing projects.

Tim


More information about the En-Nut-Discussion mailing list