Re: Is Message passing good approach for multi-threaded applications?
- From: Gene <gene.ressler@xxxxxxxxx>
- Date: Wed, 23 Jul 2008 20:52:42 -0700 (PDT)
On Jul 21, 8:55 am, Behzad <Sedighza...@xxxxxxxxx> wrote:
hi all,
I am currently developing an embedded protocol converter.In this
application there are 16 serial ports and 2 Ethernet ports.There are
16 threads for each serial port and also there is a network server
which accepts connections from LAN. so there is a thread per each
connection.There are also some threads for other tasks like
application management, time synchronization etc. As a solution to the
problem of communication between these threads i choose message
passing.There are 2 queues.One for requests and one for responses. LAN
threads put messages into request queue and other threads put replies
into response queue. Because our system has a CPU with 500MHz speed
(ARM9) i was concern if this approach can satisfy our
requirement.Each request and subsequent response should take only 200
ms. Does this architecture ( message passing as a communication bus )
good or there are some other approaches? Any guide,URL, book,
experience would appreciated.
Thanks in advance
Behzad
Message passing is a fine abstraction. However using only 2 queues to
pass all messages among all 300 or so threads may well cause queue
synchonization to be the system bottleneck. Think about ways to
increase the number of queues, for example by using one input queue
per thread with a separate dispatcher to assign requests in a smart
way.
.
- References:
- Prev by Date: Re: machine figure
- Next by Date: Buy/sell/trade your used stuff and promote your small business to others in your area
- Previous by thread: Is Message passing good approach for multi-threaded applications?
- Next by thread: cheap air jordan 22 PayPal
- Index(es):
Relevant Pages
|