User vs Kernel mode
Greg 'groggy' Lehey
grog at FreeBSD.org
Tue Oct 17 02:41:09 UTC 2006
On Tuesday, 17 October 2006 at 9:35:14 +0700, Olivier Nicole wrote:
> I have an application that is running on virtual tty 0, i start it the
> following way:
> ttyv0 "/usr/libexec/getty Door" cons25 on secure
> Door: :ht:np:sp#115200:al=door:
> 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
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 http://www.lemis.com/questions.html
See complete headers for address and phone numbers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20061017/f95c08a1/attachment.pgp
More information about the freebsd-questions