Added OS II assignments

This commit is contained in:
2018-06-08 00:50:59 -07:00
parent 43b3555da8
commit 06c37d59e1
76 changed files with 103393 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
\section{Commands}
\begin{itemize}
\item mkdir /scratch/spring2018/4
\item cd /scratch/spring20128/4
\item git init
\item wget http://git.yoctoproject.org/cgit.cgi/linux-yocto/snapshot/linux-yocto-3.19.2.tar.bz2
\item tar xvjf linux-yocto-3.19.2.tar.bz2
\item cp /scratch/files/bzImage-qemux86.bin .
\item cp /scratch/files/core-image-lsb-sdk-qemux86.ext4 .
\item cp /scratch/files/config-3.19.2-yocto-standard .config
\item source /scratch/files/environment-setup-i586-poky-linux.csh
\item make -j4
\item qemu-system-i386 -gdb tcp::5004 -nographic -kernel bzImage-qemux86.bin -drive file=core-image-lsb-sdk-qemux86.ext4,if=virtio -enable-kvm -net none -usb -localtime --no-reboot --append "root=/dev/vda rw console=ttyS0 debug".
\end{itemize}

View File

@@ -0,0 +1,53 @@
\section{QEMU Flags}
\begin{itemize}
\item \texttt{-gdb tcp::????}
Waits for a GDB connection on the specified device, namely a TCP
connection on port ????.
\item \texttt{-S}
Prevents the CPU from starting up when first launching the command.
\item \texttt{-nographic}
Disables graphical capabilities and turns qemu into a command line
application.
\item \texttt{-kernel bzImage-qemux86.bin}
Uses the ``\texttt{bzImage-qemux86.bin}'' binary as the kernel image to boot.
\item \texttt{-drive file=core-image-lsb-sdk-qemux86.ext4,if=virtio}
Uses ``\texttt{core-image-lsb-sdk-qemux86.ext4}'' as the file for the virtual
hard drive, and virtio as the I/O interface (virtio virtualizes I/O
operations like disk reads/writes).
\item \texttt{-enable-kvm}
Enables use of kernel-based virtual machine technology.
\item \texttt{-net none}
Indicates that no network devices should be configured.
\item \texttt{-usb}
Enables USB drivers.
\item \texttt{-localtime}
Uses the local time from the host machine to set the time in the guest,
instead of the default of UTC time.
\item \texttt{--no-reboot}
Shuts down the guest entirely on exit instead of rebooting.
\item \texttt{--append "root=/dev/vda rw console=ttyS0 debug"}
Uses \texttt{"root=/dev/vda rw console=ttyS0 debug"} as the initial command line,
running it on initial boot.
\end{itemize}

View File

@@ -0,0 +1,107 @@
\documentclass[onecolumn, draftclsnofoot, 10pt, compsoc]{IEEEtran}
\usepackage{graphicx}
\graphicspath{{./figures/}}
\usepackage{url}
\usepackage{setspace}
\usepackage{multicol}
\usepackage{pdflscape}
\usepackage{pdfpages}
\usepackage[british]{babel}
\usepackage{listings}
\usepackage{xcolor}
\usepackage{listings}
\usepackage{hyperref}
\usepackage{subfig}
\usepackage{geometry}
\geometry{textheight=9.5in, textwidth=7in}
% \overfullrule=2in
%Personal \newcommands
\definecolor{backcolor}{rgb}{0.95,0.95,0.92}
\lstset{basicstyle=\ttfamily,
backgroundcolor=\color{backcolor},
showstringspaces=false,
commentstyle=\color{red},
keywordstyle=\color{blue},
columns=fullflexible,
breaklines=true,
postbreak=\mbox{\textcolor{red}{$\hookrightarrow$}\space},
}
\newcommand{\NameSigPair}[1]{
\par
\makebox[2.75in][r]{#1}
\hfill
\makebox[3.25in]{
\makebox[2.25in]{\hrulefill}
\hfill
\makebox[.75in]{\hrulefill}
}
\par\vspace{-12pt}
\textit{
\tiny\noindent
\makebox[2.75in]{}
\hfill
\makebox[3.25in]{
\makebox[2.25in][r]{Signature}
\hfill
\makebox[.75in][r]{Date}
}
}
}
% 3. If the document is not to be signed, uncomment the command below
\renewcommand{\NameSigPair}[1]{#1}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\begin{titlepage}
\pagenumbering{gobble}
\begin{singlespace}
\par\vspace{2in}
\centering
\scshape{
\huge Operating Systems II Homework 1 \par
{\large\today}\par
\vspace{.5in}
\vfill
\vspace{5pt}
{\large Prepared by }\par
Group 4 \par
% 5. comment out the line below this one if you do not wish to name your team
\vspace{5pt}
{\Large
\NameSigPair{Corinna Brown}\par
\NameSigPair{Zachary Comito}\par
\NameSigPair{Corwin Perren}\par
}
\vspace{20pt}
\begin{abstract}
The document is our groups submission for homework one covering the commands our group ran to finish the assignment, descriptions of qemu flags, answers to explicit assignment questions, a version control log, and work log.
\end{abstract}
}
\end{singlespace}
\end{titlepage}
\newpage
\pagenumbering{arabic}
\tableofcontents
\clearpage
\input{commands}
\input{flags}
\input{questions}
\input{versioncontrollog}
\input{worklog}
\end{document}

View File

@@ -0,0 +1,31 @@
# This config is copied from overleaf so output there will match compiled output here
# support for the glossaries package:
add_cus_dep('glo', 'gls', 0, 'makeglossaries');
add_cus_dep('acn', 'acr', 0, 'makeglossaries');
sub makeglossaries {
system("makeglossaries \"$_[0]\"");
}
# support for the nomencl package:
add_cus_dep('nlo', 'nls', 0, 'makenlo2nls');
sub makenlo2nls {
system("makeindex -s nomencl.ist -o \"$_[0].nls\" \"$_[0].nlo\"");
}
# from the documentation for V. 2.03 of asymptote:
sub asy {return system("asy \"$_[0]\"");}
add_cus_dep("asy","eps",0,"asy");
add_cus_dep("asy","pdf",0,"asy");
add_cus_dep("asy","tex",0,"asy");
# metapost rule from http://tex.stackexchange.com/questions/37134
add_cus_dep('mp', '1', 0, 'mpost');
sub mpost {
my $file = $_[0];
my ($name, $path) = fileparse($file);
pushd($path);
my $return = system "mpost $name";
popd();
return $return;
}

View File

@@ -0,0 +1,19 @@
# Makefile created by Corwin Perren
# Generic makefile for all LaTeX projects downloaded from overleaf
#
# All this makefile does is call perl against latexmkrc, which is
# the latex equivalent of make
LATEXMK_COMPILE_FLAGS = -cd -pdf homework1.tex
LATEXMK_CLEAN_FLAGS = -c
.DEFAULT_GOAL := all
all: latexmk_output clean
latexmk_output:
perl latexmk.pl $(LATEXMK_COMPILE_FLAGS)
mv homework1.pdf CS444_project1_4.pdf
clean:
perl latexmk.pl $(LATEXMK_CLEAN_FLAGS)

View File

@@ -0,0 +1,12 @@
\section{Questions}
\subsection{Point of Assignment}
The point of this assignment was to make sure that our group could properly get the course's development environment up and running. Additionally, it gave us initial experience with using qemu, as that will be a core tool used during this class. Setting up the git repository also was needed to ensure both the instructors and our group can keep track of changes made to the kernel as we work on assignments over the term.
\subsection{Problem Approach}
We approached this problem by systematically following the directions on the homework page, and making adjustments as necessary to fit our particular development environment. Where needed, we also looked up documentation through man pages and the internet.
\subsection{Correctness}
We know that the end result was correct as we were able to successfully compile the kernel and boot the kernel in the emulator.
\subsection{What Was Learned}
We learned how to set up the environment needed to both build and run a custom modified linux kernel in a virtual machine.

View File

@@ -0,0 +1,10 @@
\section{Version Control Log}
\begin{center}
\begin{tabular}{l l l l} \textbf{Detail} & \textbf{Author} & \textbf{Date} &\textbf{Description}\\\hline
\href{commit/c52f73e00546af6f3fe60b23584aeb9c598db667}{c52f73e} & Corwin Perren & 2018-04-09 17:39:17 -0700 &Added initial kernel to our group folder.\\\hline
\href{commit/974b4529f98f277120295937f6491675832c97bc}{974b452} & Corwin Perren & 2018-04-09 18:48:36 -0700 &Initial commit after first build\\\hline
\end{tabular}
\end{center}

View File

@@ -0,0 +1,11 @@
\section{Work Log}
\begin{itemize}
\item 2018-04-09
\begin{itemize}
\item Group met in valley library
\item Set up initial os2 server workspace
\item Ran make on kernel for first time
\item Booted virtual machine for first time
\item Wrote latex document for homework 1
\end{itemize}
\end{itemize}