Gentoo Archives: gentoo-user

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

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Is my system (really) using nptl Michael Mol <mikemol@×××××.com>
Re: [gentoo-user] Is my system (really) using nptl "mike@×××××××.us" <mike@×××××××.us>