kernel mode

Hi,

Sorry for stupid question :slight_smile:

Is there kernel mode in QNX6 ?

In which mode works the general qnx processes such as
io-net, dev* etc
If in kernel – who and in which manner do set this mode for those processes?


-pirat

“pirat” <pirat@bum.au> wrote in message news:9q9908$aqe$1@inn.qnx.com

Hi,

Sorry for stupid question > :slight_smile:

Is there kernel mode in QNX6 ?

There is no such thing :wink:

In which mode works the general qnx processes such as
io-net, dev* etc

If in kernel –

There is no such thing, as “in kernel”. Everything is outside the kernel.

who and in which manner do set this mode for those processes?

If a program need to access hardware (irq, io, physical ram) it must
call ThreadCtl() with the proper flag. And to be allow to call ThreadCtl
the program must be run as root.

-pirat


\

Previously, pirat wrote in qdn.public.qnxrtp.os:

Sorry for stupid question > :slight_smile:

Is there kernel mode in QNX6 ?

In which mode works the general qnx processes such as
io-net, dev* etc
If in kernel – who and in which manner do set this mode for those processes?

Not in the traditional Unix sense. There is a kernel, and when the kernel
is running, you are in kernel mode. Since drivers are not part of the
kernel, you can’t really write kernel mode code. Once exception might be
if you are adapting the kernel to some special hardware. I understand that
there are code links from the kernel to hardware dependent routines.


Mitchell Schoenbrun --------- maschoen@pobox.com

Sorry for stupid question > :slight_smile:

Is there kernel mode in QNX6 ?

In which mode works the general qnx processes such as
io-net, dev* etc
If in kernel – who and in which manner do set this mode for those processes?

Not in the traditional Unix sense. There is a kernel, and when the kernel
is running, you are in kernel mode. Since drivers are not part of the
kernel, you can’t really write kernel mode code. Once exception might be
if you are adapting the kernel to some special hardware. I understand that
there are code links from the kernel to hardware dependent routines.

if that’s true –
does effectiveness decrease
in comparision with conventional Unix standart kernel mode ???

Or qnx even so has kernel mode but we has no its kernel sources???

Best regards,
-null

If you read the System Architecture and other docs you will see that the
philosophy of QNX is to make the kernel a true micro kernel. i.e. it does as
little work as possible. All of the real work is done by processes that are
NOT part of the kernel. This is MORE effective than standard Linux.


Bill Caroselli – 1(530) 510-7292
Q-TPS Consulting
QTPS@EarthLink.net


“vasa” <vv40in@rambler.ru> wrote in message news:9qfl87$3i4$1@inn.qnx.com

Sorry for stupid question > :slight_smile:

Is there kernel mode in QNX6 ?

In which mode works the general qnx processes such as
io-net, dev* etc
If in kernel – who and in which manner do set this mode for those
processes?

Not in the traditional Unix sense. There is a kernel, and when the
kernel
is running, you are in kernel mode. Since drivers are not part of the
kernel, you can’t really write kernel mode code. Once exception might
be
if you are adapting the kernel to some special hardware. I understand
that
there are code links from the kernel to hardware dependent routines.

if that’s true –
does effectiveness decrease
in comparision with conventional Unix standart kernel mode ???

Or qnx even so has kernel mode but we has no its kernel sources???

Best regards,
-null
\

Previously, vasa wrote in qdn.public.qnxrtp.os:

if that’s true –
does effectiveness decrease
in comparision with conventional Unix standart kernel mode ???

What do you mean by effectiveness? If you mean context switch times,
they are much much better under QNX. There is nothing really wonderful
about running with the priviledges of Kernel mode. It just opens up
the ways that your code can screw things up. With the exception of
things like going in and rewriting the scheduler, a small project for
a sunny afternoon, there isn’t much you can’t do from a QNX process.

Or qnx even so has kernel mode but we has no its kernel sources???

No you don’t have the source to the kernel. Is that what you are
asking?


Mitchell Schoenbrun --------- maschoen@pobox.com

“vasa” <vv40in@rambler.ru> wrote in message news:9qfl87$3i4$1@inn.qnx.com

Sorry for stupid question > :slight_smile:

Is there kernel mode in QNX6 ?

In which mode works the general qnx processes such as
io-net, dev* etc
If in kernel – who and in which manner do set this mode for those
processes?

Not in the traditional Unix sense. There is a kernel, and when the
kernel
is running, you are in kernel mode. Since drivers are not part of the
kernel, you can’t really write kernel mode code. Once exception might
be
if you are adapting the kernel to some special hardware. I understand
that
there are code links from the kernel to hardware dependent routines.

Yes that’s true. However the hooks to the hardware are extremely limited.
Thing like accessing network card, video card, etc are done outside the
kernel.

if that’s true –
does effectiveness decrease
in comparision with conventional Unix standart kernel mode ???

Not at all. Unix is a very old technology, its implemententation has
not evolved much. QNX has a very different implementation. It’s
as effective as the Unix way if not better.

Because driver run outside the kernel, they can be debugged
start/stop like any other program. They can use the same C library
as any other program.

Or qnx even so has kernel mode but we has no its kernel sources???

The source aren’t not available nor do they have to be. They don’t
need to be recompile to add features.

  • You want a USB stack, you type in the shell: devu-uhci
  • You want networking, you type in the shell: io-net -dne2000 -ptcpip
  • Etc…

People with Unix/Linux background often beleive driver are
in the kernel because that’s how it MUST be done. But QNX
proves otherwise.

The only thing you cannot do with driver running outside
the kernel is run x86 ring 0 instructions.

Best regards,
-null
\

“Mario Charest” <mcharest@clipzinformatic.com> wrote in message
news:9qhg3r$7pg$1@inn.qnx.com

People with Unix/Linux background often beleive driver are
in the kernel because that’s how it MUST be done. But QNX
proves otherwise.

The only thing you cannot do with driver running outside
the kernel is run x86 ring 0 instructions.

And technically, you can do ring 0 inside of your ISR in a regular process.


Bill Caroselli – 1(530) 510-7292
Q-TPS Consulting
QTPS@EarthLink.net