Re: uCOS-II
- From: Chris Quayle <devnull@xxxxxxxxxx>
- Date: Thu, 13 Jul 2006 22:06:01 GMT
Dave wrote:
On Thu, 13 Jul 2006 13:13:56 +0000, Chris Quayle wrote:
Each function or task is
called every n clock ticks to set priority and always runs to
completion. Message based comms with handshake using a single castable
U32 are used to move data between tasks.
Since tasks run to completion, why a single castable U32? Why not a
structure since there should be no coherency issues?
~Dave~
Not quite sure what you mean - Each task has a structure declared within
the task module that contains control info, entries for Tx and Tx
message information and current state. It includes a U32 entry for each
of the send and receive messages - a simple way to get data of any type
between tasks and has been used to my knowledge on more than one
commercial real time os - AMX I think was one. A system clock timer,
typically 10 or 20mS, looks at all the task tick counters and priority
is established by running a given task once every n clock ticks. The
tick counter runs at interrupt level, while the mainline code just calls
task functions based on the state set at interrupt level. Control
functions include create, suspend resume, delete etc and priority can be
set dynamically while a task is running. Typically, a messaging task is
written as a simple state machine, doing nothing while waiting, then
splitting the remainder of the work into one or more states, depending
on the complexity of the task. For example, a task that rotates a dial
pointer on a graphics screen to a new value updates one count per task
iteration, then exits to allow other tasks access, rather than do the
whole update at once.
Compared to a fully blown rtos, it's very primitive, but similar
techniques would be applicable to many non time critical projects. Even
for small systems, the need to think of system design in a task oriented
way imposes quite a bit of order on the design process, which is no bad
thing...
Chris
--
Greenfield Designs Ltd
-----------------------------------------------------------
Embedded Systems & Electronics: Research Design Development
Oxford. England. (44) 1865 750 681
.
- Follow-Ups:
- Re: uCOS-II
- From: Dave
- Re: uCOS-II
- References:
- uCOS-II
- From: ziggy
- Re: uCOS-II
- From: dick
- Re: uCOS-II
- From: Darin Johnson
- Re: uCOS-II
- From: dick
- Re: uCOS-II
- From: Chris Quayle
- Re: uCOS-II
- From: Dave
- uCOS-II
- Prev by Date: Re: Embedded Systems Design (the magazine--vent!)
- Next by Date: Embedded Systems Design (the magazine--vent!)
- Previous by thread: Re: uCOS-II
- Next by thread: Re: uCOS-II
- Index(es):