Operating system (source code)

= Operating system
{wiki}

An <operating system> manages the resources that let programs run and cooperate. <Operating-system processes> organize running work, <virtual memory> supplies protected <address spaces>, and a <file system> supplies named <files> that can outlive the <operating-system process> that created them. The <operating-system kernel> enforces the core mechanisms; <system calls> let programs request its services. Separating these responsibilities makes it possible to share a <file> while keeping the participating <operating-system processes>' <address spaces> isolated. https://pages.cs.wisc.edu/~remzi/OSTEP/file-intro.pdf[Arpaci-Dusseau and Arpaci-Dusseau, OSTEP chapter 39, introduction: processes, address spaces and persistent storage]{ref}

A concrete example makes the separation useful: two <operating-system processes> can each use <file descriptor> `3`, yet refer to different <files>; two different names can instead refer to the same <file> through <hard links>. Neither a name nor a small <integer> identifies an object without its context. <Virtual memory> has a related distinction: the same <virtual address> in different <address spaces> can designate different <physical addresses>.

<Unix> provides an influential example of this design. In their July 1974 paper, Dennis M. Ritchie and Ken Thompson date its earliest version to approximately 1969–70 and describe <operating-system processes>, a hierarchical <file system>, and <inodes> separating <directory entries> from <file metadata>. This is a documented historical example, rather than a claim that every <operating system> uses <Unix> conventions. https://www.cs.cmu.edu/~15712/papers/ritchie74.pdf[Ritchie and Thompson, The UNIX Time-Sharing System, Communications of the ACM 17(7), 1974, sections 1, 3 and 4]{ref}