Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Oct 2006 12:11:02 +0930
From:      Greg 'groggy' Lehey <grog@FreeBSD.org>
To:        Olivier Nicole <on@cs.ait.ac.th>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: User vs Kernel mode
Message-ID:  <20061017024102.GO96445@wantadilla.lemis.com>
In-Reply-To: <200610170235.k9H2ZElx012419@banyan.cs.ait.ac.th>
References:  <200610170235.k9H2ZElx012419@banyan.cs.ait.ac.th>

next in thread | previous in thread | raw e-mail | index | archive | help

--vNrHrykRFvLVX6W3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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=3Ddoor:
>
> /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 :-)=20

Maybe you should describe your problem.

Greg
--
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.

--vNrHrykRFvLVX6W3
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (FreeBSD)

iD8DBQFFNEK+IubykFB6QiMRAmNcAKCrN6f+KCkWmVKjOVBLMKMy1WgdBwCcCOzT
DaMboYxNNmkiY6yR8yHVl9w=
=n+vE
-----END PGP SIGNATURE-----

--vNrHrykRFvLVX6W3--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061017024102.GO96445>