Filesystem

The part of OS that helps programs create, manage, and delete files on disk (sec. storage)

Dozens exist

Virtualization of File on a Disk

OS abstracts a file on disk as a virtual object for processes

System Call API for File Handling:

open(): Create a file; assign fd; optionally overwrite read(): Copy file’s bytes on disk to in-mem. buffer; sized write(): Copy bytes from in-mem. buffer to file on disk fsync(): “Flush” (force write) “dirty” data to disk close(): Free up the fd and other OS state info on it lseek(): Position offset in file’s fd (for random R/W later) Dozens more (rename, mkdir, chmod, etc.)

Files Vs Databases: Data Model