Layers in resource manager

Hello,

I have no general knowledge on layers of resource manager. There are
four layers, but do I need to use all of them? Is there any difference
between what level will be created first and so on. What is the
different between resmgr and dispatch layers and why multithreaded
resource managers can use one of them?
Think this question isn’t clear, but maybe you can give me some advices
except of buying books.

Darius

alpha <alpha1@takas.lt> wrote:

Hello,

I have no general knowledge on layers of resource manager. There are
four layers, but do I need to use all of them? Is there any difference
between what level will be created first and so on. What is the
different between resmgr and dispatch layers and why multithreaded
resource managers can use one of them?
Think this question isn’t clear, but maybe you can give me some advices
except of buying books.

Well, I guess I can’t suggest buying and reading Rob Krten’s (very good)
books on programming for QNX Neutrino.

So, first, have you read the chapter in the Programmer’s Guide of the QNX
documentation on writing a resource manager?

It does talk about the four layers – but I think it has its layers
upside down. I’d describe them, top to bottom, as:

thread_pool layer - optional, only needed for multi-threaded resmgrs,
gives a dynamic thread pool
dispatch layer - optional, but usual. Extends resoure manager from
handling just IO messages to handling pulses, non-IO messages, and
select on some other server
resmgr layer – the main attach, block, and handling functions – the
core structure of the resource manager framework
io funcs layer – default handlers for all IO messages, and the helper
functions they use, and that you can and should use, for handling most
messages in a POSIX way.

In general, you will replace some of the iofuncs layer (e.g. read and
write handling) with your functions, and use pieces of the iofunc layer
to help you implement your handlers. You’ll use the resmgr layer for
initialization, and also through the dispatch layer which will also be
used for initialization and the main loop of your program.

-David

David Gibbs
QNX Training Services
dagibbs@qnx.com

David Gibbs <dagibbs@qnx.com> wrote:
DG > alpha <alpha1@takas.lt> wrote:

Hello,

I have no general knowledge on layers of resource manager. There are
four layers, but do I need to use all of them? Is there any difference
between what level will be created first and so on. What is the
different between resmgr and dispatch layers and why multithreaded
resource managers can use one of them?
Think this question isn’t clear, but maybe you can give me some advices
except of buying books.

DG > Well, I guess I can’t suggest buying and reading Rob Krten’s (very good)
DG > books on programming for QNX Neutrino.

DG > So, first, have you read the chapter in the Programmer’s Guide of the QNX
DG > documentation on writing a resource manager?

DG > It does talk about the four layers – but I think it has its layers
DG > upside down. I’d describe them, top to bottom, as:

DG > thread_pool layer - optional, only needed for multi-threaded resmgrs,
DG > gives a dynamic thread pool
DG > dispatch layer - optional, but usual. Extends resoure manager from
DG > handling just IO messages to handling pulses, non-IO messages, and
DG > select on some other server
DG > resmgr layer – the main attach, block, and handling functions – the
DG > core structure of the resource manager framework
DG > io funcs layer – default handlers for all IO messages, and the helper
DG > functions they use, and that you can and should use, for handling most
DG > messages in a POSIX way.

DG > In general, you will replace some of the iofuncs layer (e.g. read and
DG > write handling) with your functions, and use pieces of the iofunc layer
DG > to help you implement your handlers. You’ll use the resmgr layer for
DG > initialization, and also through the dispatch layer which will also be
DG > used for initialization and the main loop of your program.

DG > -David
DG > –
DG > David Gibbs
DG > QNX Training Services
DG > dagibbs@qnx.com

Very good explanation. I wish the docs were as clear.

Bill Caroselli <qtps@earthlink.net> wrote:

Very good explanation. I wish the docs were as clear.

I just took the course from David, and I hope to look at the docs soon.


Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems

Hello,

Well, I guess I can’t suggest buying and reading Rob Krten’s (very good)
books on programming for QNX Neutrino.

I want that book, but my company can’t spend any money on QNX untill I will
do some work with data acquisition. If I will have success so I can have
this book and also 6.3.1PE with all printed books, but by now I need to use
only online docs and this forum.

So, first, have you read the chapter in the Programmer’s Guide of the QNX
documentation on writing a resource manager?

Yes, I read that, so thats why I have these questions :slight_smile:


It does talk about the four layers – but I think it has its layers
upside down. I’d describe them, top to bottom, as:

thread_pool layer - optional, only needed for multi-threaded resmgrs,
gives a dynamic thread pool
dispatch layer - optional, but usual. Extends resoure manager from
handling just IO messages to handling pulses, non-IO messages, and
select on some other server
resmgr layer – the main attach, block, and handling functions – the
core structure of the resource manager framework
io funcs layer – default handlers for all IO messages, and the helper
functions they use, and that you can and should use, for handling most
messages in a POSIX way.

In general, you will replace some of the iofuncs layer (e.g. read and
write handling) with your functions, and use pieces of the iofunc layer
to help you implement your handlers. You’ll use the resmgr layer for
initialization, and also through the dispatch layer which will also be
used for initialization and the main loop of your program.

Thank you very much. This is the explanation I wanted. Now its all very
clear. Thank you very much.

Best regards,
Darius

Bill Caroselli <qtps@earthlink.net> wrote:

David Gibbs <> dagibbs@qnx.com> > wrote:
DG > alpha <> alpha1@takas.lt> > wrote:

Very good explanation. I wish the docs were as clear.

Thanks, I’ve just emailed the above explanation off to Steve Reid,
and maybe it will get included…

-David

David Gibbs
QNX Training Services
dagibbs@qnx.com