Re: Fwd: NPTL

From: Bernd Petrovitsch
Date: Thu Jul 12 2007 - 09:17:25 EST


On Thu, 2007-07-12 at 15:58 +0300, Ni@m wrote:
[...]
> >>No, a process also contains an address space.
> Of course .. I ment they are _almoust_ similar.

Not really. A process has one or more threads, (virtual) memory, open
file descriptors, a uid, a gid and several other resources.

Historically there were only "processes". "Threads" were invented later
on so there is (usually) some confusion remaining here .....

> >>No, that is creating a schedule unit (task) without an address space.
> Ok, I've already found that in kernel code ... and correctly understood.
>
> >>Surely you need some context switch when switching between runnable
> contexts.
> Hm. If the thread is running after it's sister or parent process - you
> do not have to switich the process context. Is this done in kernel??

"switch process context" is misleading wording - "task switch" is better
(and "task" is usually the kernels view on a thread). You have at least
to store the registers of the old task somewhere and load the ones from
the new task.

> Sorry if my thought are idiotic .. I'm a newby and trying to
> investigate the kernel.

Hmm, you might invest in a book about operating systems to learn the
basic concepts.

Bernd
--
Firmix Software GmbH http://www.firmix.at/
mobil: +43 664 4416156 fax: +43 1 7890849-55
Embedded Linux Development and Services


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/