4 ms·
How do these compare to Mach IPC in OSX?
by derefr 10y ago
How do these compare to Mach IPC in OSX?
- nickpsecurity 10y agoL4 was created partly due to how much Mach failed in performance and such. The first generation by Liedkte was something like 5 times faster in overhead than Mach solutions hosting Linux. I haven't timed the recent ones but there's numbers of Mach vs L4 in here: http://ts.data61.csiro.au/publications/papers/Heiser_10:iids.slides.pdf http://ts.data61.csiro.au/publications/papers/Heiser_10:iids...
- Animats 10y agoHere's a Linux/L4/QNX comparison.[1] My favorite table: Kernel Source Lines of Code (SLOC) OKL4 13.8k QNX Neutrino v6.3.2 23k Linux Kernel 2.6.0 5.2M Windows XP Kernel size unknown but totals at approx 40M Windows Vista Kernel size unknown but totals at approx 50M Modern microkernels are so small that they can be thoroughly debugged, or formally verified. [1] http://www.gelato.unsw.edu.au/IA64wiki/JamieLennox/QNXvL4?action=AttachFile&do=get&target=Jamie08.pdf http://www.gelato.unsw.edu.au/IA64wiki/JamieLennox/QNXvL4?ac...
- ori_b 10y agoOn a related note, QNX was open source for a while, before it was bought by Blackberry. Do you know if anyone managed to snag a copy of it?
- pjmlp 10y agoIt was available for free on a floppy, but never open source.
- wolfgke 10y agoIt was never open source in the sense of the OSI (Open Source Initiative) definition, but the source code was available to the public for a while: > https://en.wikipedia.org/w/index.php?title=QNX&oldid=730827552#History https://en.wikipedia.org/w/index.php?title=QNX&oldid=7308275... "In September 2007, QNX Software Systems announced the availability of some of its source code. [http://www.qnx.com/news/pr_2471_1.html http://www.qnx.com/news/pr_2471_1.html] On April 9, 2010, Research In Motion announced they would acquire QNX Software Systems from Harman International Industries. On the same day, QNX source code access was restricted from the public and hobbyists."
- pawadu 10y agoKind of off-topic, but where can I find the OKL4 source code? All I have found is a really old version that doesn't seem to have much in common with the current one.
- bicolao 10y agoThis is from 2015, not sure if it's that old. https://github.com/tomga/genode/commit/c8a64b5c3465cde1723b26ff471d088fb4400e92 https://github.com/tomga/genode/commit/c8a64b5c3465cde1723b2...
- pawadu 10y agoI think the latest version is 5 or 6. The one you pointed to seems to be pretty old: OKL4 Release 2.1 ================ Date: 15 April 2008
- rayiner 10y agoNote OS X mostly doesn't use Mach IPC for anything. Calling, e.g., write() results in a system call into the BSD portion of the XNU kernel, not all that different from what happens on Linux.
- tptacek 10y agoOS X doesn't use Mach IPC to emulate POSIX, but it uses (or did last I checked, which was a while ago) Mach IPC directly for things like launchd.
- deleted 10y ago[deleted]
- simscitizen 10y agoThat is completely untrue. While the BSD syscalls are supported, Mach syscalls and Mach IPC are also heavily used, especially internally at Apple. Just one simple example: run "sample <process>" (where <process> is any Cocoa application) on OS X. Pretty much every thread will have an event loop powered by CFRunLoop, and they'll all be stuck in mach_msg_trap waiting for an event to occur. Also, pretty much any sort of semi-complicated IPC on OS X is done over Mach IPC (e.g. passing a large bitmap copy-on-write from one process to another). Take a look at the ipc directory in the Chromium source, for example.
- rayiner 10y agoYes, I'd assume it's more heavily used in the higher-level application layer. I was talking about basic UNIX functions.
- swolchok 10y agoEven Unix signals are delivered as Mach exceptions first. If the process doesn't have a Mach exception handler set up, the kernel's exception handler converts them to Unix signals and tries delivery that way: https://github.com/opensource-apple/xnu/blob/27ffc00f33925b582391b1ef318b78b8bd3939d1/bsd/uxkern/ux_exception.c#L428 https://github.com/opensource-apple/xnu/blob/27ffc00f33925b5... and https://github.com/opensource-apple/xnu/blob/27ffc00f33925b582391b1ef318b78b8bd3939d1/bsd/dev/i386/unix_signal.c#L775 https://github.com/opensource-apple/xnu/blob/27ffc00f33925b5...