A future simple linux-like (or unix-like) OS -- could theoretically be created with <i>only 4 syscalls</i>:<p>open()
read()
write()
close()<p>Such a theoretical linux-like or unix-like OS would assume quite literally that <i>"everything is a file"</i> -- including the ability to <i>perform all other syscall/API calls/functions via special system files</i>, probably located in /proc and/or /sys and/or other special directories, as other posters have previously alluded to...<p>Also, these 4 syscalls could theoretically be combined into a <i>single syscall</i> -- something like (I'll use a Pascal-like syntax here because it will read easier):<p>FileHandleOrResult = <i>OpenOrReadOrWriteOrClose(FileHandle: Integer; Mode: Integer; pData: Pointer; pDataLen: Integer);</i><p>if Mode = 1 then open();<p>if Mode = 2 then read();<p>if Mode = 3 then write();<p>if Mode = 4 then close();<p>FileHandle is the handle for the file IF we have one; that's for read() write() and close() -- for open() it could be -1, or whatever...<p>Mode is the mode, as previously enumerated.<p>pData is a pointer to a pre-allocated data buffer, the data to read or write, or the full filename when opening...<p>(And of course, the OS could overwrite it with text strings of any error messages that occur... if errors should occur...)<p>pDataLen is the size of that buffer in bytes.<p>When the Mode is open(), pData contains a string of the path and file to open.<p>When Mode is read(), pData is read <i>to</i>, that is, overwritten.<p>When Mode is write(), pData is used to write <i>from</i>.<p>All in all, pretty simple, pretty straightforward...<p>A <i>"one syscall Linux or Unix (or Linux-like or Unix-like) operating system"</i>, if you will... for simplicity and understanding!<p>(Andrew Tannenbaum would be pleased!)<p>Related: "One-instruction set computer" (OISC): <a href="https://en.wikipedia.org/wiki/One-instruction_set_computer" rel="nofollow">https://en.wikipedia.org/wiki/One-instruction_set_computer</a>