Single vs Multi threaded resource manager.

Hello:

I would like to know what exactly is the difference between single and multi threaded resource managers in QNX 6.1. And also how would it affect the system performance.

What happens when multiple clients are being served by a resource manager wrt single and multi threaded resource manager.

Thanks,
Vish.

Vishwanath Kulkarni <vishwa2000@operamail.com> wrote:

Hello:

I would like to know what exactly is the difference between single
and multi threaded resource managers in QNX 6.1. And also how would
it affect the system performance.

The exact difference? A single-threaded resource manager has one
thread handling all requests, a multi-threaded has several.

What happens when multiple clients are being served by a resource
manager wrt single and multi threaded resource manager.

In a multi-threaded resource manager, a new request may be started
before a previous request is completed.

To prevent the two threads from stomping on each other’s actions,
locking is done at the attribute structure level (that is, equivalent
to file/device level). This means that if your resource manager has
only one file/device there is little to no point in creating a thread
pool to handle multiple client requests. (Though, it can still make
sense to create one or more hardware handling threads.)

Having multiple threads can gain you better latency in handling a new
request before a longer low-priority request has completed. It can
also gain total throughput enhancements if multiple requests can, to
some extent, be done in parallel – for instance if they are CPU
bound, and you have an SMP situation, or if they require a mixture of
CPU and I/O and you can be doing the CPU work for one request while
the I/O work for the other request is happening.

If there is little to no parallelisation possible, you will not gain
performance/throughput from going multi-threaded, and may in fact
lose performance due to pre-emption, resource-contention, etc. It
may still be worth it if the reduced latency for a new (higher
priority) request is worth it.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.