-
Notifications
You must be signed in to change notification settings - Fork 0
/
00247.mbox
75 lines (68 loc) · 3.28 KB
/
00247.mbox
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
From [email protected] Tue Jul 16 16:58:43 2002
Received: from mail.lysator.liu.se ([130.236.254.3])
by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian))
id 17UZP9-0008JS-00
for <[email protected]>; Tue, 16 Jul 2002 16:58:43 -0400
Received: from fafner.lysator.liu.se (fafner.lysator.liu.se [130.236.254.31])
by mail.lysator.liu.se (Postfix) with ESMTP
id EE49C8301CC; Tue, 16 Jul 2002 22:58:41 +0200 (MET DST)
Received: (from nisse@localhost)
by fafner.lysator.liu.se (8.9.3/8.8.7) id WAA28477;
Tue, 16 Jul 2002 22:58:41 +0200 (MEST)
X-Authentication-Warning: fafner.lysator.liu.se: nisse set sender to [email protected] using -f
Subject: Re: Message passing in user-land
References: <[email protected]>
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 8bit
From: [email protected] (Niels =?iso-8859-1?q?M=F6ller?=)
Date: 16 Jul 2002 22:58:40 +0200
In-Reply-To: <[email protected]>
Message-ID: <[email protected]>
Lines: 31
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Sender: [email protected]
Errors-To: [email protected]
X-BeenThere: [email protected]
X-Mailman-Version: 2.0.11
Precedence: bulk
List-Help: <mailto:[email protected]?subject=help>
List-Post: <mailto:[email protected]>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-hurd>,
<mailto:[email protected]?subject=subscribe>
List-Id: Bug reports for the GNU Hurd <bug-hurd.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-hurd>,
<mailto:[email protected]?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-hurd/>
[email protected] writes:
> I'll try to roughly explain my idea, which doesn't apply
> to every IPC type, but only to a small subset thereof. This
> subset includes the message passing between a client/server
> pair and among the servers themselves, with the additional
> constraint of very small pieces of data being passed at once.
I think the problem is that you have some memory shared between
threads (of different processes). For now, I'm assuming that this
sharing is setup in advance by some memory manager or kernel
mechanism.
But as several threads need to access the memory in parallell, you
need to use some syncronization primitives (mutexes, condition
variables, see any book on programming with threads) to coordinate
access. And as far as I can see, that's hard to do without kernel help.
One basic problem is: I'm an idle server process, and I want to wait
for a client to send me a message. How do I do that? There are two
ways: Either I poll the structures regularly, or I need some basic ipc
primitive, typically a wakeup call to a thread in a different process.
In the former case, I'll either waste cpu time or get slow ipc
response time, and for the latter case, it seems hard to do it
completely in user space.
So to give a good answer I think one first need a thourough
understanding of how how threading primitives like mutexes and
condition variables are implemented, and that's not really my area.
/Niels