diff --git a/src/Warm-Ups/Sysadmin/main.tex b/src/Warm-Ups/Sysadmin/main.tex deleted file mode 100755 index 850ff53..0000000 --- a/src/Warm-Ups/Sysadmin/main.tex +++ /dev/null @@ -1,89 +0,0 @@ -\documentclass[ - solutions, - hidewarning, - singlenumbering, - nopagenumber -]{../../../lib/tex/ormc_handout} -\usepackage{../../../lib/tex/macros} - - - -\usepackage{tikz} - - -\title{The Sysadmin's Warm-Up} -\uptitler{\smallurl{}} -\subtitle{Prepared by Mark on \today} - - -\begin{document} - - \maketitle - - - Most of you have seen a hard drive. Many have touched one, and a lucky few have poked around inside one. These devices have two interesting properties: - - \begin{enumerate} - \item They hold valuable data - \item They eventually fail - \end{enumerate} - - Needless to say, this is a problem. \par - We need to design a system that allows hard drives to fail without data loss. - - \definition{} - You can think of a hard drive as a long string of bits. \par - Assume all hard drives can store 1 TiB of data. - - \begin{center} - \begin{tikzpicture} - - \node[above] at (1/2, 0) {Drive A}; - \draw (0cm, 0cm) -- (0cm, -3cm); - \draw (1cm, 0cm) -- (1cm, -3cm); - \foreach \i in {0,...,-6} { - \draw (0cm,\i cm / 2) -- (1cm ,\i cm / 2); - } - - \node at (1/2, - 1 / 4) {1}; - \node at (1/2, - 3 / 4) {1}; - \node at (1/2, - 5 / 4) {0}; - \node at (1/2, - 7 / 4) {...}; - \node at (1/2, - 9 / 4) {1}; - \node at (1/2, -11 / 4) {0}; - - - \node[above] at (5/2, 0) {Drive B}; - \draw (2cm, 0cm) -- (2cm, -3cm); - \draw (3cm, 0cm) -- (3cm, -3cm); - \foreach \i in {0,...,-6} { - \draw (2cm,\i cm / 2) -- (3cm ,\i cm / 2); - } - - \node at (5/2, - 1 / 4) {0}; - \node at (5/2, - 3 / 4) {1}; - \node at (5/2, - 5 / 4) {0}; - \node at (5/2, - 7 / 4) {...}; - \node at (5/2, - 9 / 4) {0}; - \node at (5/2, -11 / 4) {1}; - \end{tikzpicture} - \end{center} - - \problem{} - Suppose we have two hard drives. How can we arrange our data so that... - \begin{enumerate} - \item We get 1 TiB of usable storage - \item We lose no data if any one drive fails - \end{enumerate} - - \vfill - - \problem{} - Suppose we have three hard drives. How can we arrange our data so that... - \begin{enumerate} - \item We get 2 TiB of usable storage - \item We lose no data if any one drive fails - \end{enumerate} - - \vfill -\end{document} \ No newline at end of file diff --git a/src/Warm-Ups/Sysadmin/main.typ b/src/Warm-Ups/Sysadmin/main.typ new file mode 100644 index 0000000..0ba4726 --- /dev/null +++ b/src/Warm-Ups/Sysadmin/main.typ @@ -0,0 +1,35 @@ +#import "@local/handout:0.1.0": * + +#show: handout.with( + title: [The Sysadmin's Warm-Up], + by: "Mark", +) + +Most of you have seen a hard drive. \ +Many have touched one, and a lucky few have taken one apart. \ +These devices have two interesting properties: +- They hold valuable data +- They inevitably fail + +Needless to say, this is a problem. \ +We would like to design a system that tolerates hard drive failures without data loss. + +#definition() +You can think of a hard drive as a long string of bits. \ +Assume all hard drives in the following problems have the same size. \ +If a hard drive "fails", all data on it is instantly lost. + +#problem() +Suppose we have two hard drives. How can we arrange our data so that... +- We get 1 TiB of usable storage +- We lose no data if any one drive fails + +#v(1fr) + +#problem() +Suppose we have three hard drives. How can we arrange our data so that... +- We get 2 TiB of usable storage +- We lose no data if any one drive fails + +#v(1fr) +