From: pwaechtler@mac.com
To: golbi@mat.uni.torun.pl
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] POSIX message queues
Date: Thu, 29 Aug 2002 23:53:50 +0200 [thread overview]
Message-ID: <CDB36B91-BB99-11D6-B9F3-00039387C942@mac.com> (raw)
some comments as asked for:
I know that it's nowhere stated, but POSIX mqueues are perfectly
designed to be
implemented in userspace with locking facilities provided by the system.
With PROCESS_SHARED mutexes and condvars in NGPT we have that - and I am
in the process in converting the mmap() based implementation of
Richard Stevens in UNPv2 onto Linux.
The messages are stored in shmem and the library routines access the
structures
with proper locking. I am not very happy about the fact, that with
futexes the whole
cooperating system get stuck when 1 process crashes inside a critical
region
(yes, then your system is screwed anyway).
BUT the messages are not copied between user- and kernelspace like they
are
in SysV msgsnd.
POSIX mqueues have "kernel persistence", i.e. they live until
mq_unlink() is called.
They do not vanish with the creator on exit().
Without rlimits you can easily consume all available kernel memory (DoS)
by creating
a mqueue and filling it with garbage.
When implemented in kernel space, you have to create a thread with the
brand new
sys_clone_startup (or whatever name it gets) as notification
(SIGEV_THREAD) - which
is SCOPE_SYSTEM, no control about this and not always what is desired.
next reply other threads:[~2002-08-29 22:05 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-29 21:53 pwaechtler [this message]
2002-08-30 9:48 ` Amos Waterland
2002-08-31 11:43 ` pwaechtler
2002-08-31 13:14 ` Krzysztof Benedyczak
2002-09-01 0:22 ` Amos Waterland
2002-09-01 1:50 ` Amos Waterland
2002-09-04 11:13 ` Ingo Molnar
2002-09-06 10:04 ` Pavel Machek
2002-09-07 14:16 ` pwaechtler
2002-09-06 22:48 ` Amos Waterland
2002-09-07 14:11 ` pwaechtler
2002-09-07 15:17 ` Ingo Molnar
2002-09-08 22:00 ` Amos Waterland
2002-08-31 12:53 ` Krzysztof Benedyczak
2002-09-07 14:39 ` pwaechtler
-- strict thread matches above, loose matches on Subject: below --
2002-09-04 16:03 Manfred Spraul
2002-08-27 21:48 Krzysztof Benedyczak
2002-08-27 22:16 ` Christoph Hellwig
2002-08-31 13:28 ` Krzysztof Benedyczak
2002-09-01 7:24 ` Jakub Jelinek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CDB36B91-BB99-11D6-B9F3-00039387C942@mac.com \
--to=pwaechtler@mac.com \
--cc=golbi@mat.uni.torun.pl \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®