
System Extensions and DriverKit – WWDC 2019 [video] - pjmlp
https://developer.apple.com/videos/play/wwdc2019/702/
======
monocasa
Didn't NeXTSTEP already have DriverKit? That for some reason they didn't want
ObjC in the kernel, so it was replaced with IOKit?

Edit: lol, yep.
[http://www.nextcomputers.org/NeXTfiles/Docs/Developer/Driver...](http://www.nextcomputers.org/NeXTfiles/Docs/Developer/DriverKit/DriverKit.pdf)

You'd think they wouldn't name it something that literally conflicts their
previous deprecated framework.

~~~
mrpippy
Yep, it's amusing that both these APIs recycle the names of what Mac OS X's
parents used (DriverKit for NeXTSTEP, and the infamous System Extensions of
classic Mac OS).

Obviously no technical recycling going on though; the new DriverKit allows
user-mode drivers, not ObjC in the kernel or willy-nilly patching of the OS.

~~~
jjtheblunt
NeXT's driverkit allowed user-mode drivers, as I recall, having written one in
1993.

------
aequitas
I love how wholesome this presentation is. It's clearly noticeable the speaker
nervous and is not used to doing this, especially compared to a natural like
what Jobs used to be. But he clearly bring over all information and cracks a
nice joke on top of that.

------
drudru11
Hmmm. We’re headed back to a microkernel.

~~~
pjmlp
Slowly leaving BSD/Linux and other UNIX clones as the surviving monoliths.

~~~
monocasa
Eh, NT is pretty much still a monolith.

~~~
pjmlp
NT 4.0 might be, Windows 10 not really, specially since Vista, MinWin and
WinRT related changes.

~~~
monocasa
Yes really. Vista even with UMDF kept pretty much everything of note in kernel
space; only the network looking stuff like USB drivers could be pulled out
into user space. MinWin and WinRT have literally nothing to do with the
kernel/user boundary.

Edit: you might have an argument on the WSL-WSL2 transition. But, IMO, that
feels more like a exokernel than a microkernel since it's running on the side
over Hyper-V.

~~~
pjmlp
USB and GPU drivers are also user space.

~~~
monocasa
As much as they are in Linux. Honestly Linux puts more in user space, and
allows USB target drivers in user space too (ie. an implementation of the
backing USB device).

Edit: and the GPU drivers still very much have a kernel component, and more or
less have to. The creation of a GPU instance is super duper privileged, since
it's setting up page tables. If you allowed user space to do that, you'd be
able to circumvent the MMU.

~~~
pjmlp
My GPU drivers never bork the machine like they do on Linux, just a couple of
seconds black screen and business as usual.

Same applies to USB drivers not doing a kernel panic when plugged on.

Naturally there is always a part that only the kernel is allowed to own
control over.

~~~
monocasa
> My GPU drivers never bork the machine like they do on Linux, just a couple
> of seconds black screen and business as usual.

None of that has to do with the kernel/user boundary. It's that dwm does a
better job recovering than x11. Wayland also does a better job recovering.

> Same applies to USB drivers not doing a kernel panic when plugged on.

Like I said, Linux has had USB drivers in user space for longer than NT, and
I've def recently had NT USB drivers bluescreen my system.

> Naturally there is always a part that only the kernel is allowed to own
> control over.

I mean, not necessarily. I've seen true ukernels run GPU drivers entirely in
user space. It's just that NT isn't at all a ukernel. They just like to call
it a hybrid because the executive is a different folder in their source code,
lol.

