User vs Kernel mode

Greg 'groggy' Lehey grog at
Tue Oct 17 02:41:09 UTC 2006

On Tuesday, 17 October 2006 at  9:35:14 +0700, Olivier Nicole wrote:
> Hi,
> I have an application that is running on virtual tty 0, i start it the
> following way:
> /etc/ttys
> ttyv0   "/usr/libexec/getty Door"               cons25  on  secure
> /etc/gettytab
> Door:   :ht:np:sp#115200:al=door:
> /etc/passwd
> door:*:0:0:Run the door program:/usr/local/door:/usr/local/door/door
> While the application is launched by getty, I would like to know if it
> is running in user mode or in kernel mode.

Processes always start in kernel mode, because they're started by the
kernel.  They typically spend most of their time in kernel mode (for
example, whenever they're idle or waiting for I/O).  An active process
may switch back and forward between kernel mode and user mode
thousands of times a second.

> I think in user mode, and so there is no reason why it should affect
> other processes, even if my application had some memory management
> problems.

A process which spends all its time in user mode is looping :-) 

Maybe you should describe your problem.

When replying to this message, please copy the original recipients.
If you don't, I may ignore the reply or reply to the original recipients.
For more information, see
See complete headers for address and phone numbers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list