Re: NPTL

From: jimmy bahuleyan
Date: Thu Jul 12 2007 - 08:52:55 EST


Ni@m wrote:
> So I can say that in linux 'thread' == 'process'?
>

No. It's more like, in linux threads are visible to the kernel (unlike
in N:1 thread models, linux is 1:1). Threads are the basic unit of
scheduling.

A process can have >1 threads.

> Is kernel routine 'kthread' creating a process?
> I'm just thinking on this subject: if to create 'real threads' - will
> it increase performance? Should I ever think in this way?
> When I say 'real thread' - I mean the thread that doen't switch
> context when it's starting to run.
>

What do you mean by context?

Each thread has it's own stack, registers, etc. which form it's context.
A process has more info like file descriptors, IPC resources, virtual
memory info. Between scheduling threads of the same process these stay same.

-jb
--
Tact is the art of making a point without making an enemy.
-
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/