Gentoo Archives: gentoo-user

From: Volker Armin Hemmann <volkerarmin@××××××××××.com>
To: gentoo-user@l.g.o
Cc: Michael Mol <mikemol@×××××.com>
Subject: Re: [gentoo-user] Is my system (really) using nptl
Date: Sun, 14 Oct 2012 22:34:58
Message-Id: 6778833.iCzrs0J5kD@localhost
In Reply to: Re: [gentoo-user] Is my system (really) using nptl by Michael Mol
1 Am Samstag, 13. Oktober 2012, 19:20:25 schrieb Michael Mol:
2 > On Sat, Oct 13, 2012 at 4:18 PM, Canek Peláez Valdés <caneko@×××××.com>
3 wrote:
4 > > On Sat, Oct 13, 2012 at 2:50 PM, Michael Mol <mikemol@×××××.com> wrote:
5 > > [snip]
6 > >
7 > >> (Well, I'm not certain that POSIX thinks of threads as parents to each
8 > >> other.>
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 > >> When one process writes to the chunk of its address space mapped to
23 > >> that file, the other process can immediately see those changes. All
24 > >> that remains is sending the other process a signal or some other
25 > >> driving mechanism to wake it up and have it look at that region for
26 > >> updates.
27 > >
28 > > Yup, certainly neither "easy" nor "quick".
29 >
30 > In C (or C++, or any language capable of directly manipulating mmapped
31 > regions), that's about as dead simple as it gets. Nothing else comes
32 > close to that degree of efficiency for that degree of simplicity.
33 >
34 > >> dbus is only a 'little wonder' in that it provides protocol
35 > >> constraints and language bindings, which isn't really relevant when
36 > >> we're talking about same-address-space vs separate-address-space
37 > >> threading models.
38 > >
39 > > You right, of course; it has nothing to do with the discussion at
40 > > hand. Is just that I *really* like dbus, and I preferred it over
41 > > almost any other IPC mechanism in Linux.
42 >
43 > I know how much you like dbus. :) I just didn't care for the
44 > implication that it was the only mechanism of note. There are other
45 > extraordinarily important mechanisms.
46 >
47 > >>> AFAIK, Google Chrome was
48 > >>> the first desktop program in Linux which uses several processes
49 > >>> runnning under the same GUI.
50 > >>
51 > >> Absolutely not. I used to play a game called 'realtimebattle'
52 > >
53 > > OK, I will rephrase it: Google Chrome is the first *relevant* desktop
54 > > program in Linux which uses several processes runnning under the same
55 > > GUI.
56 >
57 > Chrome was certainly the first *web browser* to take fault
58 > segmentation through separate processes that far. Before Chrome,
59 > Firefox used a separate process to thunk between the 32-bit Flash
60 > plugin and the 64-bit Firefox process on amd64 machines.
61 >
62 > Sticking with Desktop systems (so, not touching on SCADA), and
63 > sticking with Linux (so, not discussing the extensive use of ActiveX
64 > and OLE on Windows), we're left looking for some other multiprocess
65 > desktop applications. Here's a quick list of reasonably well-known
66 > ones:
67 >
68 > * VLC, ffmpeg and xine, which all used the xshm extension as a shared
69 > memory IPC mechanism to push video data rapidly to the X server (a
70 > separate process)
71 > * Everything in GNOME that ever used CORBA. I presume there was
72 > something similar for performing RPC calls within the KDE setup.
73
74 yes, dcop. Which made it possible to script every kde app. It was also used
75 for all those modules to talk to each other. Why they dumbed down to dbus - I
76 don't know.
77 --
78 #163933