public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* RE: [ECOS] FW: [ECOS] Mailboxes - priorities of messages
@ 2004-06-30  7:48 Retallack, Mark (Siemens)
  0 siblings, 0 replies; 6+ messages in thread
From: Retallack, Mark (Siemens) @ 2004-06-30  7:48 UTC (permalink / raw)
  To: 'Ecos-Discuss (E-Mail)


Just rushing in with this suggestion:

mq_open, mq_send. see
http://www.opengroup.org/onlinepubs/007908799/xsh/mq_send.html

Its in the ecos posix layer. I don't know if the priority works (it should
do), but its a start.


> -----Original Message-----
> From: Gorjup Matthias [mailto:Matthias.Gorjup@SIEMENS.AT]
> Sent: Tuesday 29 June 2004 11:48 AM
> To: ''Ecos-Discuss (E-Mail)'
> Subject: [ECOS] FW: [ECOS] Mailboxes - priorities of messages
> 
> 
> Hello Andrew,
> 
> Here are some details of our mBox problem;
> 
> When more than one thread (task) is using the same mBox to 
> communicate with
> one another thread, the send/received mails(messages) has to 
> be kept in a
> message qeue. ( or they arrive to mBox and kept in an order qeue). 
> 
> In this message qeue, we need to put the process of the 
> messages (mails) in
> a prioritisation. For example , a critical mail send by a 
> timeout function
> has to be processed before a user request mail which is send 
> through the
> same mBox to the same thread.
> 
> I hope this gives you enough info.
> 
> Regards.
> Tolga
> 
>    
> 
> -----Original Message-----
> From: Gorjup Matthias
> To: 'Tolga SIMSEK' (E-Mail)
> Sent: 29.06.2004 12:34
> Subject: WG: [ECOS] Mailboxes - priorities of messages
> 
> 
> 
> -----Ursprungliche Nachricht----- 
> Von: Andrew Lunn [ mailto:andrew@lunn.ch <mailto:andrew@lunn.ch> ] 
> Gesendet: Dienstag, 29. Juni 2004 11:29 
> An: Gorjup Matthias 
> Cc: 'ecos-discuss@ecos.sourceware.org' 
> Betreff: Re: [ECOS] Mailboxes - priorities of messages 
> 
> 
> On Tue, Jun 29, 2004 at 10:02:32AM +0200, Gorjup Matthias wrote: 
> > Hello, 
> > 
> > we are porting a special ethernet driver to eCos and we 
> would need to 
> > implement prioritozed mailbox messages for communication between
> threads. Is 
> > it possible to use priorities for mbox messages? If not, is 
> there some
> 
> > workaround or another solution that we could use? 
> 
> Prioritized could mean many different things. Please could 
> you be more 
> specific. Are you talking about the threads blocking for 
> access to the 
> mbox, the messages withing the mbox, or some other priority feature. 
> 
>         Andrew 
> 
> -- 
> Before posting, please read the FAQ: 
> http://ecos.sourceware.org/fom/ecos
> and search the list archive: 
> http://ecos.sourceware.org/ml/ecos-discuss
> 


Siemens Traffic Controls is a division of Siemens plc. Registered No.
727817, England. 
Registered office: Siemens House, Oldbury, Bracknell, Berkshire, RG12 8FZ. 

This communication contains information which is confidential and 
may also be privileged. It is for the exclusive use of the addressee. 
If you are not the addressee please note that any distribution, 
reproduction, copying, publication or use of this communication 
or the information in it is prohibited.  If you have received this 
communication in error, please contact us immediately and also 
delete the communication from your computer. 



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

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

* RE: [ECOS] FW: [ECOS] Mailboxes - priorities of messages
       [not found] <20040629120509.CEA6A100004@hermes.chez-thomas.org>
@ 2004-06-29 12:14 ` Gary Thomas
  0 siblings, 0 replies; 6+ messages in thread
From: Gary Thomas @ 2004-06-29 12:14 UTC (permalink / raw)
  To: Han Hoekstra
  Cc: 'Gorjup Matthias', ''Ecos-Discuss (E-Mail)'

On Tue, 2004-06-29 at 06:05, Han Hoekstra wrote:
>  Hey,
> 
> I have had the same problem in one of my projects and what I did is trigger
> the receive process using a semaphore and have it check multiple mailboxes,
> the one with the highest priority first and the one with the lowest priority
> last. Also I made my own mailbox implementation which uses the eCos Mailbox
> API to implement the actual message queue, the only thing my mailbox does
> extra is trigger the semaphore every time a message is placed in the queue,
> so that the receive process will start. The sending process only has to
> place the message in the correct mailbox, which corresponds to the priority
> of the message.....

You could also do a similar thing, except instead of a semaphore, use a 
flag.  This is an array of bits and your threads can set/clear them 
individually, and more importantly wait for them to change state.

Use one bit per "priority" of mailbox.  Then when one is set, your 
thread can awaken (ala a semaphore wait/post).  This is a lighter
solution (a single flag variable vs multiple semaphores), plus when
the receiving thread is awakened, it can determine immediately (without
any other kernel interaction) which mailbox(es) have data.

> 
> Greetings,
>    Han
> -----Original Message-----
> From: ecos-discuss-owner@ecos.sourceware.org
> [mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Gorjup Matthias
> Sent: dinsdag 29 juni 2004 12:48
> To: ''Ecos-Discuss (E-Mail)'
> Subject: [ECOS] FW: [ECOS] Mailboxes - priorities of messages
> 
> Hello Andrew,
> 
> Here are some details of our mBox problem;
> 
> When more than one thread (task) is using the same mBox to communicate with
> one another thread, the send/received mails(messages) has to be kept in a
> message qeue. ( or they arrive to mBox and kept in an order qeue). 
> 
> In this message qeue, we need to put the process of the messages (mails) in
> a prioritisation. For example , a critical mail send by a timeout function
> has to be processed before a user request mail which is send through the
> same mBox to the same thread.
> 
> I hope this gives you enough info.
> 
> Regards.
> Tolga
> 
>    
> 
> -----Original Message-----
> From: Gorjup Matthias
> To: 'Tolga SIMSEK' (E-Mail)
> Sent: 29.06.2004 12:34
> Subject: WG: [ECOS] Mailboxes - priorities of messages
> 
> 
> 
> -----Ursprungliche Nachricht-----
> Von: Andrew Lunn [ mailto:andrew@lunn.ch <mailto:andrew@lunn.ch> ]
> Gesendet: Dienstag, 29. Juni 2004 11:29
> An: Gorjup Matthias
> Cc: 'ecos-discuss@ecos.sourceware.org' 
> Betreff: Re: [ECOS] Mailboxes - priorities of messages 
> 
> 
> On Tue, Jun 29, 2004 at 10:02:32AM +0200, Gorjup Matthias wrote: 
> > Hello,
> > 
> > we are porting a special ethernet driver to eCos and we would need to 
> > implement prioritozed mailbox messages for communication between
> threads. Is 
> > it possible to use priorities for mbox messages? If not, is there some
> 
> > workaround or another solution that we could use? 
> 
> Prioritized could mean many different things. Please could you be more
> specific. Are you talking about the threads blocking for access to the mbox,
> the messages withing the mbox, or some other priority feature. 
> 
>         Andrew 
> 
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


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

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

* Re: [ECOS] FW: [ECOS] Mailboxes - priorities of messages
       [not found] <200406291221.i5TCLOoF026011@marvin.codito.net>
@ 2004-06-29 12:12 ` sandeep
  0 siblings, 0 replies; 6+ messages in thread
From: sandeep @ 2004-06-29 12:12 UTC (permalink / raw)
  To: Han Hoekstra
  Cc: 'Gorjup Matthias', ''Ecos-Discuss (E-Mail)'

Just my two cents. what about --
* putting your mailboxex as an array of mailbox and assign and manage priorities 
in similar ways as in case of process scheduling
* or keep single mailbox, and add priority to message, while inseting the 
message, make sure that things remain sorted based on priority of messages.

> 
> I have had the same problem in one of my projects and what I did is trigger
> the receive process using a semaphore and have it check multiple mailboxes,
> the one with the highest priority first and the one with the lowest priority
> last. Also I made my own mailbox implementation which uses the eCos Mailbox
> API to implement the actual message queue, the only thing my mailbox does
> extra is trigger the semaphore every time a message is placed in the queue,
> so that the receive process will start. The sending process only has to
> place the message in the correct mailbox, which corresponds to the priority
> of the message.....
> 
> Greetings,
>    Han
> -----Original Message-----
> From: ecos-discuss-owner@ecos.sourceware.org
> [mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Gorjup Matthias
> Sent: dinsdag 29 juni 2004 12:48
> To: ''Ecos-Discuss (E-Mail)'
> Subject: [ECOS] FW: [ECOS] Mailboxes - priorities of messages
> 
> Hello Andrew,
> 
> Here are some details of our mBox problem;
> 
> When more than one thread (task) is using the same mBox to communicate with
> one another thread, the send/received mails(messages) has to be kept in a
> message qeue. ( or they arrive to mBox and kept in an order qeue). 
> 
> In this message qeue, we need to put the process of the messages (mails) in
> a prioritisation. For example , a critical mail send by a timeout function
> has to be processed before a user request mail which is send through the
> same mBox to the same thread.
> 
> I hope this gives you enough info.
> 
> Regards.
> Tolga
> 
>    
> 
> -----Original Message-----
> From: Gorjup Matthias
> To: 'Tolga SIMSEK' (E-Mail)
> Sent: 29.06.2004 12:34
> Subject: WG: [ECOS] Mailboxes - priorities of messages
> 
> 
> 
> -----Ursprungliche Nachricht-----
> Von: Andrew Lunn [ mailto:andrew@lunn.ch <mailto:andrew@lunn.ch> ]
> Gesendet: Dienstag, 29. Juni 2004 11:29
> An: Gorjup Matthias
> Cc: 'ecos-discuss@ecos.sourceware.org' 
> Betreff: Re: [ECOS] Mailboxes - priorities of messages 
> 
> 
> On Tue, Jun 29, 2004 at 10:02:32AM +0200, Gorjup Matthias wrote: 
> 
>>Hello,
>>
>>we are porting a special ethernet driver to eCos and we would need to 
>>implement prioritozed mailbox messages for communication between
> 
> threads. Is 
> 
>>it possible to use priorities for mbox messages? If not, is there some
> 
> 
>>workaround or another solution that we could use? 
> 
> 
> Prioritized could mean many different things. Please could you be more
> specific. Are you talking about the threads blocking for access to the mbox,
> the messages withing the mbox, or some other priority feature. 
> 
>         Andrew 
> 
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
> 
> 
> 

-- 
regards
sandeep
--------------------------------------------------------------------------
Gnagloot, n.:
	A person who leaves all his ski passes on his jacket just to
impress people.
		-- Rich Hall, "Sniglets"
--------------------------------------------------------------------------


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

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

* RE: [ECOS] FW: [ECOS] Mailboxes - priorities of messages
  2004-06-29 10:48 Gorjup Matthias
  2004-06-29 11:15 ` Andrew Lunn
@ 2004-06-29 12:04 ` Han Hoekstra
  1 sibling, 0 replies; 6+ messages in thread
From: Han Hoekstra @ 2004-06-29 12:04 UTC (permalink / raw)
  To: 'Gorjup Matthias', ''Ecos-Discuss (E-Mail)'

 
Hey,

I have had the same problem in one of my projects and what I did is trigger
the receive process using a semaphore and have it check multiple mailboxes,
the one with the highest priority first and the one with the lowest priority
last. Also I made my own mailbox implementation which uses the eCos Mailbox
API to implement the actual message queue, the only thing my mailbox does
extra is trigger the semaphore every time a message is placed in the queue,
so that the receive process will start. The sending process only has to
place the message in the correct mailbox, which corresponds to the priority
of the message.....

Greetings,
   Han
-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Gorjup Matthias
Sent: dinsdag 29 juni 2004 12:48
To: ''Ecos-Discuss (E-Mail)'
Subject: [ECOS] FW: [ECOS] Mailboxes - priorities of messages

Hello Andrew,

Here are some details of our mBox problem;

When more than one thread (task) is using the same mBox to communicate with
one another thread, the send/received mails(messages) has to be kept in a
message qeue. ( or they arrive to mBox and kept in an order qeue). 

In this message qeue, we need to put the process of the messages (mails) in
a prioritisation. For example , a critical mail send by a timeout function
has to be processed before a user request mail which is send through the
same mBox to the same thread.

I hope this gives you enough info.

Regards.
Tolga

   

-----Original Message-----
From: Gorjup Matthias
To: 'Tolga SIMSEK' (E-Mail)
Sent: 29.06.2004 12:34
Subject: WG: [ECOS] Mailboxes - priorities of messages



-----Ursprungliche Nachricht-----
Von: Andrew Lunn [ mailto:andrew@lunn.ch <mailto:andrew@lunn.ch> ]
Gesendet: Dienstag, 29. Juni 2004 11:29
An: Gorjup Matthias
Cc: 'ecos-discuss@ecos.sourceware.org' 
Betreff: Re: [ECOS] Mailboxes - priorities of messages 


On Tue, Jun 29, 2004 at 10:02:32AM +0200, Gorjup Matthias wrote: 
> Hello,
> 
> we are porting a special ethernet driver to eCos and we would need to 
> implement prioritozed mailbox messages for communication between
threads. Is 
> it possible to use priorities for mbox messages? If not, is there some

> workaround or another solution that we could use? 

Prioritized could mean many different things. Please could you be more
specific. Are you talking about the threads blocking for access to the mbox,
the messages withing the mbox, or some other priority feature. 

        Andrew 

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



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

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

* Re: [ECOS] FW: [ECOS] Mailboxes - priorities of messages
  2004-06-29 10:48 Gorjup Matthias
@ 2004-06-29 11:15 ` Andrew Lunn
  2004-06-29 12:04 ` Han Hoekstra
  1 sibling, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2004-06-29 11:15 UTC (permalink / raw)
  To: Gorjup Matthias; +Cc: ''Ecos-Discuss (E-Mail)'

On Tue, Jun 29, 2004 at 12:48:19PM +0200, Gorjup Matthias wrote:
> Hello Andrew,
> 
> Here are some details of our mBox problem;
> 
> When more than one thread (task) is using the same mBox to communicate with
> one another thread, the send/received mails(messages) has to be kept in a
> message qeue. ( or they arrive to mBox and kept in an order qeue). 
> 
> In this message qeue, we need to put the process of the messages (mails) in
> a prioritisation. For example , a critical mail send by a timeout function
> has to be processed before a user request mail which is send through the
> same mBox to the same thread.

eCos has nothing like this. You will have to implement your own
mailbox functions on top of the eCos kernel API.

        Andrew

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

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

* [ECOS] FW: [ECOS] Mailboxes - priorities of messages
@ 2004-06-29 10:48 Gorjup Matthias
  2004-06-29 11:15 ` Andrew Lunn
  2004-06-29 12:04 ` Han Hoekstra
  0 siblings, 2 replies; 6+ messages in thread
From: Gorjup Matthias @ 2004-06-29 10:48 UTC (permalink / raw)
  To: ''Ecos-Discuss (E-Mail)'

Hello Andrew,

Here are some details of our mBox problem;

When more than one thread (task) is using the same mBox to communicate with
one another thread, the send/received mails(messages) has to be kept in a
message qeue. ( or they arrive to mBox and kept in an order qeue). 

In this message qeue, we need to put the process of the messages (mails) in
a prioritisation. For example , a critical mail send by a timeout function
has to be processed before a user request mail which is send through the
same mBox to the same thread.

I hope this gives you enough info.

Regards.
Tolga

   

-----Original Message-----
From: Gorjup Matthias
To: 'Tolga SIMSEK' (E-Mail)
Sent: 29.06.2004 12:34
Subject: WG: [ECOS] Mailboxes - priorities of messages



-----Ursprungliche Nachricht----- 
Von: Andrew Lunn [ mailto:andrew@lunn.ch <mailto:andrew@lunn.ch> ] 
Gesendet: Dienstag, 29. Juni 2004 11:29 
An: Gorjup Matthias 
Cc: 'ecos-discuss@ecos.sourceware.org' 
Betreff: Re: [ECOS] Mailboxes - priorities of messages 


On Tue, Jun 29, 2004 at 10:02:32AM +0200, Gorjup Matthias wrote: 
> Hello, 
> 
> we are porting a special ethernet driver to eCos and we would need to 
> implement prioritozed mailbox messages for communication between
threads. Is 
> it possible to use priorities for mbox messages? If not, is there some

> workaround or another solution that we could use? 

Prioritized could mean many different things. Please could you be more 
specific. Are you talking about the threads blocking for access to the 
mbox, the messages withing the mbox, or some other priority feature. 

        Andrew 

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

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

end of thread, other threads:[~2004-06-30  7:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-30  7:48 [ECOS] FW: [ECOS] Mailboxes - priorities of messages Retallack, Mark (Siemens)
     [not found] <20040629120509.CEA6A100004@hermes.chez-thomas.org>
2004-06-29 12:14 ` Gary Thomas
     [not found] <200406291221.i5TCLOoF026011@marvin.codito.net>
2004-06-29 12:12 ` sandeep
  -- strict thread matches above, loose matches on Subject: below --
2004-06-29 10:48 Gorjup Matthias
2004-06-29 11:15 ` Andrew Lunn
2004-06-29 12:04 ` Han Hoekstra

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).