From 93a9ead055ca69a11471e253201246119c12a77a Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Wed, 14 Aug 2024 19:40:14 +0200 Subject: LOCO: continue with the intro --- papers/LOCO-24/contents.latex | 62 ++++++++++++++++++++++++++++++++----------- 1 file changed, 46 insertions(+), 16 deletions(-) (limited to 'papers') diff --git a/papers/LOCO-24/contents.latex b/papers/LOCO-24/contents.latex index cc09008..273a957 100644 --- a/papers/LOCO-24/contents.latex +++ b/papers/LOCO-24/contents.latex @@ -167,12 +167,16 @@ Computing}{December 05, 2024}{Glasgow, Scotland, United Kingdom } \subsection{Von Neumann model} + The von Neummann model introduced in 1945 proposes a general purpose device + consisting of a \textit{Central Processing Unit} (CPU) and a \textit{Store}. -General purpose device: CPU + Store + User interaction - -The Store is implemented with hardware memories, flat storage of numbers in -addresses. + The \textit{Store} is often implemented as a \textit{Random Access Memory} + (RAM or, simply, \textit{memory}), which stores data in bytes, each of them + with an \textit{address}, in a tabulated fashion. + In the von Neumann model the data and the program are both written to and + read from the \textit{Store}. This arrangement had carried criticism over the + years but it's also a fundamental part of how modern Operating Systems work. \subsection{Unix's heritage} \epigraph{ @@ -203,29 +207,55 @@ addresses. \cite{QuarterCenturyUnix:Salus}. \subsubsection{Userspace programs} - ELF/Mach-O/EXE -> the kernel acts as an interpreter for them. - Virtual memory separates one program from another. - The CPU helps with that. - Each program is a process (invented concept) - Each process can launch threads \cite{Threads:Lee} -\paragraph{Language interpreters} - Language interpreters are run as userspace programs. + + Programs are loaded in and given access to \textit{virtual memory}, and they + can only run a subset of the CPU instructions of the machine, the + \textit{unprivileged} set. For restricted operations, programs need to call + the \textit{Kernel} using a \textit{system-call} that can be accepted or + rejected by the latter, according to some rules for \textit{permissions} or + resource availability. In order to achieve multitasking, many programs can be + loaded in memory (\textit{processes}) simultaneously and the \textit{Kernel} + \textit{schedules} which of the them will run at a given moment in time and + pauses the rest accordingly. + +% ELF/Mach-O/EXE -> the kernel acts as an interpreter for them. +% Virtual memory separates one program from another. +% The CPU helps with that. +% Each program is a process (invented concept) +% Each process can launch threads \cite{Threads:Lee} + + \paragraph{Concurrency} + If programs need to operate concurrently they can create many + \textit{processes} or use \textit{threads}. A \textit{thread} is a + lightweight version of a \textit{process} that shares the memory with the + \textit{process} that created it. Resource sharing in a concurrent system has + many security and reliability implications, and has proven to be a difficult + subject for computer programmers over the years + \cite{Threads:Lee}. + + +\subsubsection{Interpreters} +% Unix was marketed as a system for multiple languages / supports many +% languages via interpreters that ease the development experience. Describe how +% they work and why they are useful +% Interpreters are programs that run in userspace \subsection{Computer hardware} Computer processors, often marketed as "\textit{general purpose}", are based on the von Newmann model\cite{LiberateFromVonNeumann:Backus}, a CPU and a Store that is, and designed for running an Operating System on them. They - clearly separate privileged, reserved for the kernel, and unprivileged - instructions, that any userspace program can use, in order to facilitate - interrupt and virtual memory control. + clearly separate \textit{privileged}, reserved for the kernel, and + \textit{unprivileged} instructions, that any userspace program can use, in + order to facilitate \textit{system-calls} and \textit{interrupt} and + \textit{virtual memory} control. Contrary to what one could expect, most of the improvements in the processor architectures come from specialization for the said case, and not from generalization. Modern processors are heavily optimized for Operating Systems that follow the - Unix model (which includes MS Windows), and a memory layout that resembles - that of a C-like program, which also comes from the days of Unix + Unix model (including MS Windows), and a memory layout that resembles that of + a \textit{C-like} program, which also comes from the days of Unix \cite{GeneralPurposeProcessor:Chisnall}, reducing the chance for other paradigms to succeed. -- cgit v1.2.3