Gentoo Archives: gentoo-user

From: Michael Mol <mikemol@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Is my system (really) using nptl
Date: Sun, 14 Oct 2012 19:32:07
Message-Id: CA+czFiB5b95Yszv4kjb_B56cq16r6F__z3c8OjK0MDWBHxh+Ug@mail.gmail.com
In Reply to: Re: [gentoo-user] Is my system (really) using nptl by Florian Philipp
1 On Sun, Oct 14, 2012 at 3:19 PM, Florian Philipp <lists@×××××××××××.net> wrote:
2 > Am 14.10.2012 17:07, schrieb Michael Mol:
3 >> On Sun, Oct 14, 2012 at 5:31 AM, Florian Philipp <lists@×××××××××××.net> wrote:
4 >>> Am 14.10.2012 01:20, schrieb Michael Mol:
5 >>>> On Sat, Oct 13, 2012 at 4:18 PM, Canek Peláez Valdés <caneko@×××××.com> wrote:
6 >>>>> On Sat, Oct 13, 2012 at 2:50 PM, Michael Mol <mikemol@×××××.com> wrote:
7 >>>>> [snip]
8 >>>>>> (Well, I'm not certain that POSIX thinks of threads as parents to each other.
9 >>>>>
10 >>>>> Hence the reason I put "parent" in quotes, and I specified "actually,
11 >>>>> the thread that created it".
12 >>>>>
13 >>>>>> There are *numerous* IPC mechanisms available on Linux. For starters,
14 >>>>>> there are sockets (domain, IPv4, IPv6, et al), named pipes, signals,
15 >>>>>> mmap()'d files, messaging, etc.
16 >>>>>
17 >>>>> Yeah, none of them "easy and quickly" to use, or at least not if you
18 >>>>> compare it with shared memory.
19 >>>>
20 >>>> I assume you mean 'shared memory' in the 'many threads to an address
21 >>>> space', not the /dev/shm sense.
22 >>>>
23 >>>
24 >>> If we really want to be nit-picking, we have to assume 'shared memory'
25 >>> as in malloc'ed [1] or stack memory. Anonymous mmap'ed memory mappings
26 >>> are preserved across forks and changes in them can be shared since
27 >>> kernel 2.4.
28 >>
29 >> Absolutely.
30 >>
31 >>> [1] Yes, I know that malloc uses mmap but its mappings are MAP_PRIVATE.
32 >>
33 >> For the GNU libc, yeah. I noticed that in strace, and was amused.
34 >>
35 >
36 > Huh? Are there other libcs that do it differently? I can't imagine any
37 > alternative (except of the sbrk function from the bad old days).
38
39 These days, and outside of Windows? I'm not familiar with any.
40
41 --
42 :wq