[lkml]   [2003]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Who changed /proc/<pid>/ in 2.6.0-test5-bk9?
In article <>,
Linus Torvalds <> wrote:

| The reason people use threads is that sharing the VM space has real
| advantages: it makes context switching much cheaper (fewer hw resources in
| the form of TLB usages) and it allows for much faster synchronization
| through a shared address space.
| But the same isn't true of file descriptors or a lot of other software-
| level abstractions. There are no inherent advantages to sharing, and in
| fact sharing just gives more opportunity for race conditions, bad
| interaction etc.

That depends on what you're doing. It can be lower cost to have threads
putting fd's on a chain to be serviced by another thread than to start
another thread to do the service and use IPC to do serialization
between threads. And abstractions like SysV message queues are
inherently shared. Sometimes there are savings to be had by sharing.

Your base point that resources shouldn't be shared needlessly is
correct, or course.
bill davidsen <>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:49    [W:0.148 / U:22.824 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site