FREE LESSON · Operating systems & runtimes · 3 OF 4
System Calls, File Descriptors and Persistence
System calls and durable names — Files, descriptors, buffering, and persistence
A syscall asks the kernel to exercise privileged authority.
User code places arguments according to an ABI and traps into the kernel. The kernel validates permissions and addresses, performs or starts the operation, then returns a result. File descriptors are process-local handles to kernel-managed open objects; paths are names resolved through a filesystem namespace.
A handle refers to an opened object; a path is a lookup instruction. Renaming a path need not invalidate an existing handle.
Write completion is not one universal promise
A library may buffer in user space; the kernel may buffer in memory; the device may have its own cache. A successful write can mean bytes were accepted at one boundary, not that stable media now contains them. Flush and synchronization operations strengthen the promise, subject to filesystem and hardware contracts.
Ask “durable against which failure after which acknowledgement?” at every storage layer.