Skip to content

Commit

Permalink
Enabled GladOs and created last lab LaTeX files. OS seems to be worki…
Browse files Browse the repository at this point in the history
…ng correctly, and I was able to implement some of the challenges. I think I have enough extra credit, so I will save some time with the other challenges. I had fun making this. It was a bit difficult juggling this with capping and work, but I got through it and learned a lot. I think I may make the front-end of it look better and more fancy later before I make it public. For now though, I think it is all done. Just gonna run one more test pulling from master and hopefully it won't break.
  • Loading branch information
Eric Stenton committed Dec 9, 2019
1 parent c04a94b commit 13b2eae
Show file tree
Hide file tree
Showing 12 changed files with 303 additions and 8 deletions.
Binary file added Lab_8_LaTeX_Files/Lab_8.pdf
Binary file not shown.
97 changes: 97 additions & 0 deletions Lab_8_LaTeX_Files/main.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% CMPT 424N-111
% Fall 2019
% Lab Eight
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Short Sectioned Assignment
% LaTeX Template
% Version 1.0 (5/5/12)
%
% This template has been downloaded from: http://www.LaTeXTemplates.com
% Original author: % Frits Wenneker (http://www.howtotex.com)
% License: CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
% Modified by Alan G. Labouseur - [email protected]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----------------------------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------

\documentclass[letterpaper, 10pt,DIV=13]{scrartcl}

\usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs
\usepackage[english]{babel} % English language/hyphenation
\usepackage{amsmath,amsfonts,amsthm,xfrac} % Math packages
\usepackage{sectsty} % Allows customizing section commands
\usepackage{graphicx}
\graphicspath{ {./} }
\usepackage[lined,linesnumbered,commentsnumbered]{algorithm2e}
\usepackage{listings}
\usepackage{parskip}
\usepackage{lastpage}

\allsectionsfont{\normalfont\scshape} % Make all section titles in default font and small caps.

\usepackage{fancyhdr} % Custom headers and footers
\pagestyle{fancyplain} % Makes all pages in the document conform to the custom headers and footers

\fancyhead{} % No page header - if you want one, create it in the same way as the footers below
\fancyfoot[L]{} % Empty left footer
\fancyfoot[C]{} % Empty center footer
\fancyfoot[R]{page \thepage\ of \pageref{LastPage}} % Page numbering for right footer

\renewcommand{\headrulewidth}{0pt} % Remove header underlines
\renewcommand{\footrulewidth}{0pt} % Remove footer underlines
\setlength{\headheight}{13.6pt} % Customize the height of the header

\numberwithin{equation}{section} % Number equations within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)
\numberwithin{figure}{section} % Number figures within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)
\numberwithin{table}{section} % Number tables within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)

\setlength\parindent{0pt} % Removes all indentation from paragraphs.

\binoppenalty=3000
\relpenalty=3000

%----------------------------------------------------------------------------------------
% TITLE SECTION
%----------------------------------------------------------------------------------------

\newcommand{\horrule}[1]{\rule{\linewidth}{#1}} % Create horizontal rule command with 1 argument of height

\title{
\normalfont \normalsize
\textsc{CMPT 424N-111 - Fall 2019 - Dr. Labouseur} \\[10pt] % Header stuff.
\horrule{0.5pt} \\[0.25cm] % Top horizontal rule
\huge Lab Eight \\ % Assignment title
\horrule{0.5pt} \\[0.25cm] % Bottom horizontal rule
}

\author{Eric Stenton \\ \normalsize [email protected]}

\date{\normalsize\today} % Today's date.

\begin{document}
\maketitle % Print the title

%----------------------------------------------------------------------------------------
% start PROBLEM ONE
%----------------------------------------------------------------------------------------
\section{Problem One}

\textbf{\emph{Question:}}
Have you had enough of this yet?

\textbf{\emph{Answer:}}
Yes. Yes I have. It's been fun, but I am ready to be done with these projects and this semester.

%----------------------------------------------------------------------------------------
% end PROBLEM ONE
%----------------------------------------------------------------------------------------

\end{document}
Binary file added Lab_9_LaTeX_Files/Lab_9.pdf
Binary file not shown.
97 changes: 97 additions & 0 deletions Lab_9_LaTeX_Files/main.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% CMPT 424N-111
% Fall 2019
% Lab Nine
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Short Sectioned Assignment
% LaTeX Template
% Version 1.0 (5/5/12)
%
% This template has been downloaded from: http://www.LaTeXTemplates.com
% Original author: % Frits Wenneker (http://www.howtotex.com)
% License: CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
% Modified by Alan G. Labouseur - [email protected]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----------------------------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------

\documentclass[letterpaper, 10pt,DIV=13]{scrartcl}

\usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs
\usepackage[english]{babel} % English language/hyphenation
\usepackage{amsmath,amsfonts,amsthm,xfrac} % Math packages
\usepackage{sectsty} % Allows customizing section commands
\usepackage{graphicx}
\graphicspath{ {./} }
\usepackage[lined,linesnumbered,commentsnumbered]{algorithm2e}
\usepackage{listings}
\usepackage{parskip}
\usepackage{lastpage}

\allsectionsfont{\normalfont\scshape} % Make all section titles in default font and small caps.

\usepackage{fancyhdr} % Custom headers and footers
\pagestyle{fancyplain} % Makes all pages in the document conform to the custom headers and footers

\fancyhead{} % No page header - if you want one, create it in the same way as the footers below
\fancyfoot[L]{} % Empty left footer
\fancyfoot[C]{} % Empty center footer
\fancyfoot[R]{page \thepage\ of \pageref{LastPage}} % Page numbering for right footer

\renewcommand{\headrulewidth}{0pt} % Remove header underlines
\renewcommand{\footrulewidth}{0pt} % Remove footer underlines
\setlength{\headheight}{13.6pt} % Customize the height of the header

\numberwithin{equation}{section} % Number equations within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)
\numberwithin{figure}{section} % Number figures within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)
\numberwithin{table}{section} % Number tables within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)

\setlength\parindent{0pt} % Removes all indentation from paragraphs.

\binoppenalty=3000
\relpenalty=3000

%----------------------------------------------------------------------------------------
% TITLE SECTION
%----------------------------------------------------------------------------------------

\newcommand{\horrule}[1]{\rule{\linewidth}{#1}} % Create horizontal rule command with 1 argument of height

\title{
\normalfont \normalsize
\textsc{CMPT 424N-111 - Fall 2019 - Dr. Labouseur} \\[10pt] % Header stuff.
\horrule{0.5pt} \\[0.25cm] % Top horizontal rule
\huge Lab Nine \\ % Assignment title
\horrule{0.5pt} \\[0.25cm] % Bottom horizontal rule
}

\author{Eric Stenton \\ \normalsize [email protected]}

\date{\normalsize\today} % Today's date.

\begin{document}
\maketitle % Print the title

%----------------------------------------------------------------------------------------
% start PROBLEM ONE
%----------------------------------------------------------------------------------------
\section{Problem One}

\textbf{\emph{Question:}}
What now?

\textbf{\emph{Answer:}}
In the past, the answer would have been to implement swapping with the scheduler. Since I already did that and am filling this out after I've finished, it is now time to prepare for finals and sleep.

%----------------------------------------------------------------------------------------
% end PROBLEM ONE
%----------------------------------------------------------------------------------------

\end{document}
Binary file added Lab_A_LaTeX_Files/Lab_A.pdf
Binary file not shown.
97 changes: 97 additions & 0 deletions Lab_A_LaTeX_Files/main.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% CMPT 424N-111
% Fall 2019
% Lab A
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Short Sectioned Assignment
% LaTeX Template
% Version 1.0 (5/5/12)
%
% This template has been downloaded from: http://www.LaTeXTemplates.com
% Original author: % Frits Wenneker (http://www.howtotex.com)
% License: CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
% Modified by Alan G. Labouseur - [email protected]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----------------------------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------

\documentclass[letterpaper, 10pt,DIV=13]{scrartcl}

\usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs
\usepackage[english]{babel} % English language/hyphenation
\usepackage{amsmath,amsfonts,amsthm,xfrac} % Math packages
\usepackage{sectsty} % Allows customizing section commands
\usepackage{graphicx}
\graphicspath{ {./} }
\usepackage[lined,linesnumbered,commentsnumbered]{algorithm2e}
\usepackage{listings}
\usepackage{parskip}
\usepackage{lastpage}

\allsectionsfont{\normalfont\scshape} % Make all section titles in default font and small caps.

\usepackage{fancyhdr} % Custom headers and footers
\pagestyle{fancyplain} % Makes all pages in the document conform to the custom headers and footers

\fancyhead{} % No page header - if you want one, create it in the same way as the footers below
\fancyfoot[L]{} % Empty left footer
\fancyfoot[C]{} % Empty center footer
\fancyfoot[R]{page \thepage\ of \pageref{LastPage}} % Page numbering for right footer

\renewcommand{\headrulewidth}{0pt} % Remove header underlines
\renewcommand{\footrulewidth}{0pt} % Remove footer underlines
\setlength{\headheight}{13.6pt} % Customize the height of the header

\numberwithin{equation}{section} % Number equations within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)
\numberwithin{figure}{section} % Number figures within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)
\numberwithin{table}{section} % Number tables within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)

\setlength\parindent{0pt} % Removes all indentation from paragraphs.

\binoppenalty=3000
\relpenalty=3000

%----------------------------------------------------------------------------------------
% TITLE SECTION
%----------------------------------------------------------------------------------------

\newcommand{\horrule}[1]{\rule{\linewidth}{#1}} % Create horizontal rule command with 1 argument of height

\title{
\normalfont \normalsize
\textsc{CMPT 424N-111 - Fall 2019 - Dr. Labouseur} \\[10pt] % Header stuff.
\horrule{0.5pt} \\[0.25cm] % Top horizontal rule
\huge Lab A \\ % Assignment title
\horrule{0.5pt} \\[0.25cm] % Bottom horizontal rule
}

\author{Eric Stenton \\ \normalsize [email protected]}

\date{\normalsize\today} % Today's date.

\begin{document}
\maketitle % Print the title

%----------------------------------------------------------------------------------------
% start PROBLEM ONE
%----------------------------------------------------------------------------------------
\section{Problem One}

\textbf{\emph{Question:}}
How well does your operating system work?

\textbf{\emph{Answer:}}
It works decently. I'm not getting anymore errors, and I haven't run into any more bugs. I implemented some of the challenges, so it's pretty fancy now. I look forward to making it public later on and talking about it on interviews.

%----------------------------------------------------------------------------------------
% end PROBLEM ONE
%----------------------------------------------------------------------------------------

\end{document}
2 changes: 1 addition & 1 deletion distrib/host/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ var TSOS;
// Add pcb information
row.insertCell(-1).innerHTML = _ResidentList[i].pid;
row.insertCell(-1).innerHTML = _ResidentList[i].state.toLocaleUpperCase();
row.insertCell(-1).innerHTML = _ResidentList[i].state == 'terminated' ? '--' : _ResidentList[i].storageLocation;
row.insertCell(-1).innerHTML = _ResidentList[i].state == 'terminated' ? '--' : _ResidentList[i].storageLocation.toLocaleUpperCase();
row.insertCell(-1).innerHTML = _ResidentList[i].priority;
row.insertCell(-1).innerHTML = _ResidentList[i].PC;
row.insertCell(-1).innerHTML = _ResidentList[i].Acc.toString(16).toLocaleUpperCase();
Expand Down
5 changes: 3 additions & 2 deletions distrib/os/memoryManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ var TSOS;
break;
}
}
var pcb;
// Memory is full ... use hard drive
if (memorySegment === undefined) {
// Hard drive must be formatted first
if (!_krnFileSystemDriver.formatted) {
return _StdOut.putText("No free memory available. Format hard drive for more space.");
}
// Create process control block for program
var pcb = new TSOS.PCB();
pcb = new TSOS.PCB();
var result = void 0;
// Create swap file and store in hard disk
pcb.swapFile = "@" + pcb.pid;
Expand All @@ -50,7 +51,7 @@ var TSOS;
}
else {
// Create process control block for program
var pcb = new TSOS.PCB();
pcb = new TSOS.PCB();
// Clear memory in case of remaining process code
_MemoryAccessor.clear(this.memoryRegisters[memorySegment]);
// Load program into free memory segment
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<!-- Other Routines -->
<script type="text/javascript" src="distrib/utils.js"></script>
<!-- Uncomment the line below to enable GLaDOS testing. -->
<!-- <script type="text/javascript" src="test/glados-ip3.js"></script>-->
<script type="text/javascript" src="test/glados-ip4.js"></script>


</head>
Expand Down
2 changes: 1 addition & 1 deletion source/host/control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ module TSOS {
// Add pcb information
row.insertCell(-1).innerHTML = _ResidentList[i].pid;
row.insertCell(-1).innerHTML = _ResidentList[i].state.toLocaleUpperCase();
row.insertCell(-1).innerHTML = _ResidentList[i].state == 'terminated' ? '--' : _ResidentList[i].storageLocation;
row.insertCell(-1).innerHTML = _ResidentList[i].state == 'terminated' ? '--' : _ResidentList[i].storageLocation.toLocaleUpperCase();
row.insertCell(-1).innerHTML = _ResidentList[i].priority;
row.insertCell(-1).innerHTML = _ResidentList[i].PC;
row.insertCell(-1).innerHTML = _ResidentList[i].Acc.toString(16).toLocaleUpperCase();
Expand Down
6 changes: 4 additions & 2 deletions source/os/memoryManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ module TSOS {
}
}

let pcb;

// Memory is full ... use hard drive
if (memorySegment === undefined) {
// Hard drive must be formatted first
Expand All @@ -38,7 +40,7 @@ module TSOS {
}

// Create process control block for program
let pcb = new PCB();
pcb = new PCB();

let result;

Expand All @@ -54,7 +56,7 @@ module TSOS {

} else {
// Create process control block for program
let pcb = new PCB();
pcb = new PCB();

// Clear memory in case of remaining process code
_MemoryAccessor.clear(this.memoryRegisters[memorySegment]);
Expand Down
3 changes: 2 additions & 1 deletion tsos.css
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,13 @@ table thead th:first-child {
width:320px;
}

#tableCpu, #tablePcb {
#tableCpu {
width: 350px;
}

#tablePcb {
overflow-y: scroll;
width: 550px;
}

#floatDiv {
Expand Down

0 comments on commit 13b2eae

Please sign in to comment.