Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Re: WinAvr or CodeVision, which one is more public?

2008-01-22 by subscriptions@aeolusdevelopment.com

David VanHorn Wrote
>> U talked of RTOS. Never heared of it before, but my MCU needed to
>> control RH, light level and temperature real time and show them on
>> LCD, so I thought and then I made for myself a sort of virtual multi-
>> tasking procedure, for example:
>>
>> Do
>>  Gosub v
>>  Gosub w
>>  Gosub x
>>  Gosub y
>>  Gosub z
>> Loop
>> End
>>
>
>This is the guts of a cooperative multitasker.

A simple co-operative multitasker.  This particular kind is often referred
to as a super loop and is simple enough that some object to it being
referred to as a multitasker.  They prefer to think of it as a single task
state machine.  There is a grey area here.

Time for a little RTOS taxonomy I think

RTOS's can be classified as

   pre-emptive or co-operative
   single stack (run to completion) or multiple stack
   round-robin or priority

There are other characteristics but I think these are the most important
and these characteristics are independent.  Independence does not mean you
can change just one item in any particular implementation just that you can
implement any combination.

The above is a co-operative, round-robin, single stack multitasker.

pre-emptive systems bring in the ability to interrupt the current task at
any time but also need to be able to protect critical sections from being
interrupted by other tasks.  Co-operative systems generally remove the need
to implement as many safeguards but their responsiveness and the
granularity of tasks falls completely on the programmers shoulder showing
up in the task breakdown itself.

Single stack systems use only a single stack (obviously) and thus have
simpler memory management and task switching.  Multiple stacks allow tasks
to block waiting for resources or data.

Round-robin provides simple fairness.  Priority based allows more frequent
and/or more important tasks first access improving responsiveness if done
correctly.

Other characteristics include types of IPC, memory allocation, device
driver model (if any), task creation ....

Robert

--------------------------------------------------------------------
myhosting.com - Premium Microsoft® Windows® and Linux web and application
hosting - http://link.myhosting.com/myhosting

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.