谁创建了/dev/下的对象 udev

谁执行了mount udisk2

块设备容易导致读/写放大

为了让文件系统感知“块”的概念,引入bio这一中间层管理读写请求

overlayfs虚拟的目录

文件系统级api

exit那些事

tldr:exit库函数高级封装了_exit()wrapper函数,_exit()wrap了exit_group。要使用exit系统调用可以syscall sys_exit。

准确来说似乎c语言exit包装的系统调用名为exit_group,这个系统调用据说唤醒(SIG_KILL)并杀死所有组内的线程

_exit是exit_group的包装

man_exit(2)

By contrast with the C library wrapper function, the raw Linux _exit() system call terminates only the calling thread, and actions such as reparenting child processes or sending SIGCHLD to the parent process are performed only if this is the last thread in the thread group.

_exit曾经是同名系统调用的wrapper,现在是exit_group的wrapper。实际上观察strace发现似乎没有_exit这种系统调用,只有exit,并且它的行为与所谓的_exit系统调用描述一致。😵

线程和进程类似,当你pthread_create传入一个函数指针时,你的函数被包裹在一个start中执行

clone3?