public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* RE: [ECOS] cyg_semaphore_post
@ 2002-02-11  9:08 Woller, Thomas
  0 siblings, 0 replies; 17+ messages in thread
From: Woller, Thomas @ 2002-02-11  9:08 UTC (permalink / raw)
  To: 'Andrew Lunn', Woller, Thomas; +Cc: eCos users

The question about a specific example made me go back and ask the
core s/w team what specific implementation they were looking for
with this priority based wakeup scheme.  we are rewriting some of
the code as well as porting.  
basically, the current s/w does not use multiple priorities, but
their plan is to have "task rendezvous" events in which a
particular event needs to occur before a series of threads must
run each with their associated functionality. the threads don't
depend on each other (just that an event occurred) but have
definite priorities among themselves.  an example might be when a
STOP or REVERSE command occurs with a DVD player.  a series of
internal threads must cleanup now that PLAY is no longer the
state, and the Video is the highest priority, with audio coming
next and then so on.
that's all i can give as an example right now, but perhaps we
don't need this functionality when we get further down the design
and implementation phases.  and perhaps the mutex as robin
indicated might be sufficient. thanks for all the information,
and i'll give more specific info when i have the example.
Tom



>You might try a mutex, a condition variable and an appropriate
priority
>inversion protection protocol instead of a counting semaphore.

[snip]

Robin


On Mon, Feb 11, 2002 at 09:10:16AM -0600, Woller, Thomas wrote:
> When there are a series of
> threads waiting on the same semaphore, we basically want the
> highest priority thread to run, NOT the first one that happened
> to wait on the semaphore.

OK. You use this sort of Semaphore. You should be able to answer
my
question... to me it still does not make sense. Why do you want
prioritization on what gets woken up? Please can you give an
example...

        Andrew

Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 17+ messages in thread
* RE: [ECOS] cyg_semaphore_post
@ 2002-02-11  7:10 Woller, Thomas
  2002-02-11  7:19 ` Andrew Lunn
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Woller, Thomas @ 2002-02-11  7:10 UTC (permalink / raw)
  To: 'Robin Farine', Stijn Symons; +Cc: eCos users

we are also wondering how to handle the non-priority based (ie.
FIFO based) waiting under eCos. when there are a series of
threads waiting on the same semaphore, we basically want the
highest priority thread to run, NOT the first one that happened
to wait on the semaphore.  some of our current s/w on another
RTOS that we are porting over currently supports both FIFO and
priority based semaphores/mutexes. so we think that core
modifications are the only option we have. we could just allow
the lower priority threads, that are first on the FIFO, to cycle
out with context switches at the most every system tick. not sure
if this is going to be too much latency for the higher priority
thread though, we'll have to test and see.
tom


[snip]

> I'm mapping an API to eCos, the API states that  "When any
threads are
> waiting on the semaphore count to become higher than zero, the
thread with
> the highest priority will be woken up to acquire the
semaphore".

... which in cases of heavy load of the semaphore will lead to
starvation of low priority threads :-\

> 
> Stijn

Robin



Before posting, please read the FAQ:
http://sources.redhat.com/fom/ecos
and search the list archive:
http://sources.redhat.com/ml/ecos-discuss

Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 17+ messages in thread
* [ECOS] cyg_semaphore_post
@ 2002-02-11  3:56 Stijn Symons
  2002-02-11  4:10 ` Andrew Lunn
  0 siblings, 1 reply; 17+ messages in thread
From: Stijn Symons @ 2002-02-11  3:56 UTC (permalink / raw)


Will the cyg_semaphore_post function still increment the count if there
are threads waiting on it, or does it only wake up a thread?
And witch thread does it wake up, the one with the highest priority or
just random?

thanks,

Stijn Symons


Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 17+ messages in thread
* Re: [ECOS] cyg_semaphore_post
@ 2001-06-13  8:42 harri.siirtola
  0 siblings, 0 replies; 17+ messages in thread
From: harri.siirtola @ 2001-06-13  8:42 UTC (permalink / raw)
  To: Joerg Rapka, ecos-discuss

At 16:44 13.6.2001 +0200, Joerg Rapka wrote:
>Hi
>
>Is it allowed to call cyg_semaphore_post from within an ISR?

Calling from a DSR is better and it works. I'm using it all the time.

>
>Thanks,
>Joerg

Good luck,
	Harri

^ permalink raw reply	[flat|nested] 17+ messages in thread
* Re: [ECOS] GDB and eCos
@ 2001-06-13  4:46 andre33
  2001-06-13  7:44 ` [ECOS] cyg_semaphore_post Joerg Rapka
  0 siblings, 1 reply; 17+ messages in thread
From: andre33 @ 2001-06-13  4:46 UTC (permalink / raw)
  To: egcs; +Cc: ecos-discuss

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2098 bytes --]

Hello,

Thanx for you answer !! so maybe i must start directly with the target
but i'm afraid to be losing with the bootstrap (boot, register init, etc ..)
for beginning :-(
So i will see !!

Thanx again and i will see links you say !!!

best regards,
Sébastien.



Bart Veer wrote:

> >>>>> "Sebastien" == andre33  <sebastien.andre@sxb.bsf.alcatel.fr> writes:
>
>     Sebastien>     Hello,
>     Sebastien>     So i'm a newbie
>
>     Sebastien>     It seem that GDB can emulate the target !! i'm
>     Sebastien>     wrong ?
>
> Partly correct.
>
> Typically when gcc is ported to a new architecture, one of the first
> steps is to write an instruction set simulator for that architecture.
> This allows the compiler folks to do their development and testing
> before any hardware exists. It is also very useful for subsequent
> maintenance. However, this is just an instruction set simulator. It
> will do enough to support compiler testing. It will provide only
> minimal I/O facilities which bear no resemblance to how I/O happens on
> real hardware. Hence typically it cannot be used for eCos development.
> The simulator gets built into gdb when you configure for the
> appropriate target.
>
> During the early days of eCos development, the simulators for two of
> the initial targets (AM31 and TX39) were enhanced to support
> architectural simulation of specific boards, the stdeval1 board and
> the JMR-TX3904 board. This architectural simulation included support
> for a system clock, serial I/O, and interrupt handling, but not for
> anything more advanced like ethernet or PCI. In addition eCos was
> ported to the PowerPC psim simulator. More details of these can be
> found at http://sources.redhat.com/ecos/hardware.html and in the
> Getting Started guides for those targets.
>
> More recent work on architectural simulators within Red Hat has
> happened in the context of the SID project, http://sources.redhat.com/sid/
> Unfortunately I do not really have time to track that project closely
> but I suggest you take a look through their web pages and
> documentation.
>
> Bart

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2002-02-15 16:18 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-11  9:08 [ECOS] cyg_semaphore_post Woller, Thomas
  -- strict thread matches above, loose matches on Subject: below --
2002-02-11  7:10 Woller, Thomas
2002-02-11  7:19 ` Andrew Lunn
2002-02-11  8:39 ` Robin Farine
2002-02-13  5:49 ` Jonathan Larmour
2002-02-11  3:56 Stijn Symons
2002-02-11  4:10 ` Andrew Lunn
2002-02-11  4:37   ` Stijn Symons
2002-02-11  5:22     ` Robin Farine
2002-02-11  7:56       ` Chris Gray
2002-02-14 20:45       ` Nick Garnett
2002-02-15  2:07         ` Robin Farine
2002-02-15  3:39           ` Nick Garnett
2002-02-15  8:18             ` Robin Farine
2001-06-13  8:42 harri.siirtola
2001-06-13  4:46 [ECOS] GDB and eCos andre33
2001-06-13  7:44 ` [ECOS] cyg_semaphore_post Joerg Rapka
2001-06-13  8:27   ` Bart Veer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).