Skip to content

Subsystem · The POSIX personality

BSD

Processes, files, signals, sockets, system calls — the FreeBSD-derived layer that makes XNU look like a Unix.

BSD process and file descriptor tableAnatomy of struct proc: pid, ucred, pointer to the Mach task, and a file-descriptor table whose entries dispatch through fileops to vnodes, sockets, or kqueues.struct procbsd/sys/proc_internal.hp_pidpid_tp_pptrparentucreduid · gid · entitlementstask →pointer to Mach taskfdt →file-descriptor tablebsd_info ↔ taskMach taskosfmk/kern/task.hfdt — array of fileproc *stdinvnodestdoutvnodestderrvnodefd 3socketfd 4kqueueEach slot's fileglob.fg_ops table dispatches read / write / closeto the right type — vnode for files, socket, kqueue.read(fd, …) →
BSD: structure at a glance.

Articles in this series

Processes, file descriptors, signals, sockets — the FreeBSD-derived layer that sits on top of Mach and makes macOS pass POSIX.
POSIX says signals are per-process. Mach says everything is a thread. Here's how XNU bridges the two — pending masks, delivery threads, the AST mechanism, and exception ports.
The Unix-est of Unix calls, implemented on a Mach kernel. Why fork is awkward on macOS, what exec actually replaces, and why posix_spawn is now the preferred way to start a process.
The full chain from power-on to your login window. Boot ROM, iBoot, kernelcache, kernel_init, bsdinit_task, launchd — what each stage does and how control transfers.
From the classic 4.4 BSD TCP/IP stack to Apple's modern Skywalk replacement — how packets traverse XNU's networking code, and why Apple is moving the data plane out of the BSD layer.
From double-click to first window: LaunchServices, launchd, posix_spawn, AMFI, dyld, the shared cache, sandbox profile installation, the runloop. Six subsystems in three seconds.
Inside dyld — Loader data structures, the modern chained-fixups format, PrebuiltLoaders in the shared cache, and what dlopen actually does at runtime.
Dispatch queues, the workqueue thread pool, voucher adoption, async vs sync — what happens between your dispatch_async call and your block running on a worker thread.
The 4.4 BSD TCP stack as it actually runs on macOS — state transitions, send/receive locking, Apple's congestion-control variants, and the kqueue path back to your app.