4 ms·
Isn't ios based on Linux? Sorry for the dumb question...
by SeriousM 8y ago
Isn't ios based on Linux? Sorry for the dumb question...
- wilsonnb3 8y agoI believe it uses the same kernel as MacOS which is based on some kind of BSD.
- yjftsjthsd-h 8y agoThe kernel is called XNU; it's a weird Mach derivative which I do believe has pieces of BSD grafted on.
- k__ 8y agoiOS is based on macOS, which is based on NeXTStep, which is based on BSD.
- TickleSteve 8y agoNeXTStep is based on Mach, not BSD. MacOS has a BSD user-land, the kernel isn't anything to do with BSD.
- lukeh 8y agoThe macOS kernel has lots of BSD bits in it [1], it's not a classic microkernel in that sense. [1] https://github.com/apple/darwin-xnu/tree/master/bsd https://github.com/apple/darwin-xnu/tree/master/bsd
- TickleSteve 8y agoIf you look at the contents of that repo, you will see that the majority of the code there is headers to allow compilation of very specific parts (e.g the net and inet directories), not the whole codebase. Certainly, there is no kernel there and most calls redirect back into xnu. Most functionality is Mach-based, this is just for a user-facing API.
- broknbottle 8y agoit's a hybrid so bit of both
- TickleSteve 8y agoThe kernel is entirely xnu/mach. The BSD parts are a POSIX layer on top of that.
- notaplumber 8y agoAnd Mach was a modified 4.2BSD kernel adding microkernel aspects. It was literally written as a drop in replacement for BSD. The kernel also includes code from BSD, source is available, including from FreeBSD/NetBSD and OpenBSD. For example, the network stack is BSD code. It also includes OpenBSD's pf(4). For example, there was a recent ICMP vulnerability in XNU, that later affected FreeBSD. So please reconsider posting misinformation in the future.
- TickleSteve 8y agoIf you look at the comments below, I'm well aware of the repo containing XNU and BSD. Mach was not a modified BSD kernel, it was a research kernel developed at CMU developed from the Accent and Aleph kernel(s) as a replacement for the BSD kernel, nothing to do with BSD excepting that BSD took some ideas from it... later. https://en.wikipedia.org/wiki/Mach_(kernel) https://en.wikipedia.org/wiki/Mach_(kernel) Look at the repo, the BSD sources are nothing but a userland (POSIX) API layer + the odd device compatibility layer. Please refrain from posting misinformation in the future.
- notaplumber 8y agohttps://opensource.apple.com/source/xnu/xnu-4570.71.2/bsd/kern/ https://opensource.apple.com/source/xnu/xnu-4570.71.2/bsd/ke... https://opensource.apple.com/source/xnu/xnu-4570.71.2/bsd/net/ https://opensource.apple.com/source/xnu/xnu-4570.71.2/bsd/ne... https://opensource.apple.com/source/xnu/xnu-4570.71.2/bsd/netinet/ https://opensource.apple.com/source/xnu/xnu-4570.71.2/bsd/ne... https://opensource.apple.com/source/xnu/xnu-4570.71.2/bsd/netinet6/ https://opensource.apple.com/source/xnu/xnu-4570.71.2/bsd/ne... You will find RCS tags for OpenBSD/NetBSD/FreeBSD littered throughout the kernel source tree, some files even retaining original SCCS ids from 1980's CSRG days. $ grep -R "\$OpenBSD:" | wc -l 24 $ grep -R "\$NetBSD:" | wc -l 138 $ grep -R "\$FreeBSD:" | wc -l 162 $ grep -R "\$KAME:" | wc -l 73 $ grep -R "WIDE Project" | wc -l 87 $ grep -R "The Regents" | wc -l 427 $ grep -R "Berkeley" | wc -l 919 This isn't "userland (POSIX) API layer + the odd device compatibility layer", far from it. Don't presume to know who you're talking smack to, when it's clear you have absolutely no idea what you're talking about.
- umanwizard 8y agoNope — also there is no such thing as a “Linux shell”. I use the same shell on FreeBSD as I do on Linux.