Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2100] Periodic tasks...

2004-02-17 by Igor Janjatovic

> what are the best ways for avoiding  the buffer overflow and intertask
> interference in coperative scheduler........

Generally speaking, any problem can be easily avoided if application is
designed more carefully.

Using intertask communication by calling Operating System functions is the
best way to avoid any problem with intertask interference. Also, if you have
shared resources (e.g. COM port) you should use some semaphore that tells
you if resource is already taken by some of tasks. Careful assignement of
priorities to tasks is also good way of avoiding problems. Having
cooperative scheduling yields even more carefull application design since
even tasks with higher priority will have to wait some low priority task to
release CPU. So, it's all about application design.

About your cooperative scheduler... is it some standard piece of software or
something that you wrote? I'm asking this because I'm working on my own
version of embedded ultra-low-footprint (approx. 1.5kB) cooperative OS for
LPC MCU's so we might share ideas on this? Thing is that I have this stupid
neural network that I'm supposed to run with many other things in parallel
and it takes up to 10MIPS for neuro code so I really need to use each
micro-second of CPU time. That's where OS fits as perfect solution.

Regards,
Igor

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.