\documentclass{article}
\usepackage[style=mla,backend=biber]{biblatex}

%for Copyleft Symbol
\usepackage{graphicx}

%for URL embedding
\usepackage{hyperref}
\hypersetup{
    colorlinks=true,
    urlcolor=blue,
    pdfborderstyle={/S/U/W 1},
    citecolor=black
}


%
%Margin - 1 inch on all sides
%
\usepackage[letterpaper]{geometry}
\geometry{top=1.0in, bottom=1.0in, left=1.0in, right=1.0in}

%
%Doublespacing
%
\usepackage{setspace}
\doublespacing

% 
%Babel package for multiple language typesetting
%
%\usepackage[T1]{fontenc}
%\usepackage[latin1]{inputenc}

%
%Setting the font
%
\usepackage{times}

%
%Rotating tables (e.g. sideways when too long)
%
\usepackage{rotating}

%
%For multiple rows in tables
%
\usepackage{multirow}

%
%Sexy, Sexy images...
%
\usepackage{graphicx}

% 
%Line numbering in verse environment
%
\usepackage{lineno} 


%Bibliography File
\addbibresource{Biblio.bib} 

\newcommand{\secheader}[1]{\textbf{#1}}


\begin{document}
\begin{flushleft}

%%%%Title
\begin{center}
The GNU/Linux Operating System's Shutdown Process
\end{center}


%%%%Changes paragraph indentation to 0.5in
\setlength{\parindent}{0.5in}

%%%%Begin body of paper here

The shutdown process is a process that happens when one opts to cease using a computer. GNU/Linux is a libre operating system that, like many operating systems, has a shutdown process built into it. The shutdown process goes through many phases usually starting with the mass termination of processes and ending in a total power off. Figure 1 shows this process occurring.
\includegraphics{HandOffProcess.png}
\newline
Figure 1: msglm - Shutdown Stages
\newline
\newline
\secheader{Userland}
\newline
    The shutdown process generally starts with the init system being told to initialize a shutdown. The init system proceeds from that by moving to runlevel 0 (where runlevels are a defined set of scripts that traditionally are used for system clean up and start up program configuration). Runlevel 0 generally consists of mass termination signals to all currently running programs along with other "system cleanup" scripts that unmount drives, save hardware clock time locally, turn off internet, and disable modifications to the main file system. Once this part is completed, and depending upon the nature of the clean up scripts and process termination, this may take an indeterminate amount of time, the init system calls upon the Linux Kernel to take over shutting down the computer before killing itself.
\newline
\newline
    \secheader{Kernel Space}
\newline
    Once the Linux Kernel takes over shutting the computer down, the processes in question become much more streamlined as it is based on already set configurations that came with the compiling of the kernel. The Kernel then calls upon a function that orders the CPUs to start shutting themselves down. This process depends on CPU architecture, thus, going forward, it will be assumed an AMD processor will be used. 
\pagebreak
\newline
\newline
    \secheader{CPU Shutdown}
\newline
    In chronological order the disabling of the CPU happens as follows: CPU Interrupts (or requests for input from a piece of software) are disabled, Other CPUs the computer currently has in use are disabled, The controller that allows for multiprocessor systems is disabled (APIC), The APIC as a whole is then disconnected from the system that allows for CPU Interrupts, The High Precision Event Timer is then disabled, and CPU Input-Output Memory Management is disabled (a system that allows the virtual memory locations to be translated to physical memory). This entire series of disabling effectively kills the CPU, however keeps power running. 
\newline
\newline
    \secheader{Halting Computer}
\newline
    In most cases, a power off signal is send and this instead avoids turning the CPU off. Instead it figures out the architecture of the CPU and directly gives information to the CPU that tells itself to terminate. As this is CPU dependent, a concise description of the process is not possible. Though, generally, some form of information the CPU can read is sent. In cases where the Linux Kernel doesn't have instructions for a CPU, a custom shutdown method is used to force a power off.
\newline
\newline

%%%%Works cited

\printbibliography

\end{flushleft}

\scriptsize{
        \begin{center}
                \vspace*{\fill}
                Copyright \copyright \the\year{} msglm -
                This work is licensed under the \href{https://creativecommons.org/licenses/by-sa/4.0/}{CC-BY-SA 4.0} with a willingness to sell exceptions.
        \end{center}
}
\end{document}

