Driver or Recource Manager

Hi,
Im having a problem understanding the differance between a recource manager
and driver. They seem to be the same thing, both seem to be similar to linux
modules.
Is there anything a Driver can do that a Recource manager cant? Anyone have
a link that might clear things up? Thank you!
kw

wasiul wrote:

Im having a problem understanding the differance between a recource manager
and driver. They seem to be the same thing, both seem to be similar to linux
modules.

Yes and no. Like modules in that they both hit the hardware but unlike a modules in that the QNX device drivers/resource managers do not run in kernel space. I believe the API for a resource manager has similarities to modules.


Is there anything a Driver can do that a Recource manager cant? Anyone have

A Device Driver is exactly as is, it manages (or drives) a device, this can be as simple as a shared object that you link to with any arbitrary data passing mechanisms. A Resource Manager is a daemon but also hits the hardware like a driver and also interfaces to the pathspace and POSIX facilities. Resource managers can be built that will load one of many drivers for different makes of hardware that perform the same function.

PS: This is general knowledge rather than my personal experience of writing a RM.


Evan

A resource manager is very generic process structure. While used for
drivers, it does not have to be related to any hardware. For example
a data base manager could be a resource manager.

Evan Hillas wrote:

wasiul wrote:

Im having a problem understanding the differance between a recource
manager and driver. They seem to be the same thing, both seem to be
similar to linux modules.

It’s too bad that Robert Krten’s book on writing resource managers is
out of print, or we could refer them to there.

John Nagle

A resource manager is very generic process structure. While used for
drivers, it does not have to be related to any hardware. For example
a data base manager could be a resource manager.

But can a recource manager do everything a driver can? Im porting a
simple character driver from linux which ill use a recource manager for. But
later i have a wireless network card that needs a driver, can i also use a
recource manager for that or for some reason it has to be a driver (what im
trying to get at is what would make one choose a driver over a recource
manager or vice versa.)
Thanks for your replies so far!

But can a recource manager do everything a driver can?

?
hm…

You can write device driver that creates resource manager.

wasiul wrote:

But can a recource manager do everything a driver can? Im porting a
simple character driver from linux which ill use a recource manager for. But
later i have a wireless network card that needs a driver, can i also use a

The resource manager gives you a tidy framework to the pathspace so it would be a good move to use it.

To make this real clear, there is no single driver framework. There is only the resource manager framework. The term “driver” under QNX 6 is used in it’s real sense - a lump of code that accesses a device’s register set.


Evan

wasiul wrote:

But can a recource manager do everything a driver can? Im porting a
simple character driver from linux which ill use a recource manager for. But
later i have a wireless network card that needs a driver, can i also use a

Maybe this is what you are asking, there is a number of Driver Development Kits for attaching drivers to particular resource managers. Using such DDKs is an even better solution for devices that match, ie: Character DDK and Network DDK respectively.


Evan

John Nagle <nagle@downside.com> wrote:

It’s too bad that Robert Krten’s book on writing resource managers is
out of print, or we could refer them to there.

QSS bought the rights to Getting Started with QNX Neutrino 2, so if you
want a copy, talk to your sales rep. The plan is to update it for
Neutrino 6 and republish it.


Steve Reid stever@qnx.com
Technical Editor
QNX Software Systems

[quote:5621354433]A resource manager is very generic process
structure. While used for
drivers, it does not have to be related to any hardware. For
example
a data base manager could be a resource manager.

But can a recource manager do everything a driver can?

I think you are missing the point.


In whatever form it is, a piece of software that creates a software
layer hiding hardware is a driver. A resource manager creates a
special (important in QNX) software layer between an application and
whatever.
If the whatever is hardware, then the resource manager is a driver.
This is a syntax issue, not a technology one. Maybe you should be
more specific about what you want to accomplish.

It is amazing how easy it becomes to understand something once you have a
non-redudnant definition (i.e., a ‘minimalistic’ definition).
Let me try…

  1. Resource manager - a process that that attaches and manages an element in
    the filesystem namespace. Could be any name, attached anywhere, possibly
    more than one name, possibly a hierarchical structure. The minimal defining
    characteristic is just that - the fact that it owns a piece of namespace
    (“resource”). It could be using the “resource manager framework” but it does
    not have to, it’s just a convinience.

  2. Driver - a piece of code that manages a “device”, which could be hardware
    or any kind of abstraction. Could be a standalone process, or a shared
    object (a-la DLL). Usually owns a piece of namespace (representing the
    device) and provides POSIX-style interface to the device
    (open/read/write/ioctl). In that case it is also a resource manager (by the
    definition above) and then it usually uses one or another “framework” to
    make the design easier. It does not have to be - a driver can also just bang
    directly at the HW using ‘private’ interface that you come up with and could
    be all spaghetti code with no framework at all if you wish so. In that case
    the defining characteristic would be the ability to bang at the hardware
    (requires issuing a special system call and running at root).

In practical terms the drivers will fall into one of two groups - those
covered by one of QNX “DDK” that were designed for some specific classes of
devices (USB, character I/O, network, graphics, audio, etc) and those that
are not (because they do not fit well into any class).

For the former kind there is a high-level framework (different for each
class) typically consisting of a main “manager” that handles namespace and
provides general internal plumbing (threading, buffering, wait lists,
diagnostic interfaces, etc) and one ore more loadable shared objects
(drivers) that only deal with the hardware. This is quite similar to Linux
driver concept, except in Linux the kernel usually playes the role of the
main “manager” and provides an execution context for the driver. So in the
strict sense such driver (by itself) will not be a “resource manager”, it
will be just a HW-dependent part of one.

For the latter kind you don’t have a high-level framework. There is just a
generic resource-manager framework, which you can use in many ways. You can
do it as a standalone do-it-all process or (if you have more than one device
to manage) you could come up with your own “class” and a main manager for it
and then write drivers in the same way as above. It is not an easy
excersize.

– igor

“wasiul” <wasiul06@yahoo.com> wrote in message
news:e7b265$f5l$1@inn.qnx.com

Hi,
Im having a problem understanding the differance between a recource
manager and driver. They seem to be the same thing, both seem to be
similar to linux modules.
Is there anything a Driver can do that a Recource manager cant? Anyone
have a link that might clear things up? Thank you!
kw

Igor,

An excellent summary. This all is a confusing area. Sometimes a
driver is even more removed from hardware, as in the case where a
“printer driver” is nothing more than a translator or
filter from one page representation to another.

Hi,

just an other trial…

  • a driver is a software layer around the hardware of a device

  • a resource manager is a driver which provides also management and
    configuration functionality for the device.

Just my 0.02$

–Armin



wasiul wrote:

Hi,
Im having a problem understanding the differance between a recource manager
and driver. They seem to be the same thing, both seem to be similar to linux
modules.
Is there anything a Driver can do that a Recource manager cant? Anyone have
a link that might clear things up? Thank you!
kw

Short answer is Yes.

A device driver may or may not be a resource manager.
A resource manager may or may not be a device driver.

The resource manager just makes it easier for an application to attach to
it.

“maschoen” <maschoen@pobox-dot-com.no-spam.invalid> wrote in message
news:e7kckm$pc0$1@inn.qnx.com

[quote:5621354433]A resource manager is very generic process
structure. While used for
drivers, it does not have to be related to any hardware. For
example
a data base manager could be a resource manager.

But can a recource manager do everything a driver can?

I think you are missing the point.


In whatever form it is, a piece of software that creates a software
layer hiding hardware is a driver. A resource manager creates a
special (important in QNX) software layer between an application and
whatever.
If the whatever is hardware, then the resource manager is a driver.
This is a syntax issue, not a technology one. Maybe you should be
more specific about what you want to accomplish.

Armin Steinhoff <a-steinhoff@web.de> wrote:

Hi,

just an other trial…

  • a driver is a software layer around the hardware of a device

Yes.

  • a resource manager is a driver which provides also management and
    configuration functionality for the device.

No. Because a resource manager doesn’t have to have underlieing
hardware. For instance, mqueue is a resource manager that maintains
in-memory queues and the namespace under /dev/mqueue.

-David

David Gibbs
QNX Training Services
dagibbs@qnx.com

David Gibbs wrote:

Armin Steinhoff <> a-steinhoff@web.de> > wrote:


Hi,


just an other trial…

\

  • a driver is a software layer around the hardware of a device


    Yes.

    \
  • a resource manager is a driver which provides also management and
    configuration functionality for the device.


    No. Because a resource manager doesn’t have to have underlieing
    hardware. For instance, mqueue is a resource manager that maintains
    in-memory queues and the namespace under /dev/mqueue.

And memory isn’t hardware ??

–Armin

-David

Armin Steinhoff <a-steinhoff@web.de> wrote:

David Gibbs wrote:
Armin Steinhoff <> a-steinhoff@web.de> > wrote:

  • a resource manager is a driver which provides also management and
    configuration functionality for the device.


    No. Because a resource manager doesn’t have to have underlieing
    hardware. For instance, mqueue is a resource manager that maintains
    in-memory queues and the namespace under /dev/mqueue.

And memory isn’t hardware ??

If you consider memory to be hardware, then every process in the
system is a device driver, and therefor the distinction becomes
meaningless.

-David

David Gibbs
QNX Training Services
dagibbs@qnx.com

This is a case of an argument that is too strong. It makes the term
driver useless. If we call a driver a piece of software that
accesses hardware, and for this definition, we consider memory
hardware, then every piece of software is a driver. You could
soften it a little and say that instead of accessing memory, we mean
allocating memory, but then malloc() is a driver.

David Gibbs wrote:

Armin Steinhoff <> a-steinhoff@web.de> > wrote:

David Gibbs wrote:

Armin Steinhoff <> a-steinhoff@web.de> > wrote:

  • a resource manager is a driver which provides also management and
    configuration functionality for the device.


    No. Because a resource manager doesn’t have to have underlieing
    hardware. For instance, mqueue is a resource manager that maintains
    in-memory queues and the namespace under /dev/mqueue.


    And memory isn’t hardware ??


    If you consider memory to be hardware, then every process in the
    system is a device driver, and therefor the distinction becomes
    meaningless.

True :slight_smile: So we have to differenciate between resource managers for
hardware and software resources ??


–Armin

-David

I thought we had? Resource managers for hardware (but not memory) are
called drivers in addition to being called resource managers. Maybe
you would like some new more efficient vocabulary? Soft-RM,
Hard-RM?