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.