Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 39aab15

Browse files
committed
notes: added OS support section
1 parent 4e97b28 commit 39aab15

File tree

4 files changed

+63
-2
lines changed

4 files changed

+63
-2
lines changed

notes/COMP2120-Notes.tex

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,22 @@
1919
}{}
2020

2121
\tableofcontents
22+
\listoffigures
23+
24+
\vfill
25+
26+
\begin{remark}
27+
For taking the taking the final examination, an A4-sized double-sided cheatsheet
28+
is also provided on the same GitHub repository.
29+
\end{remark}
30+
31+
{
32+
\footnotesize
33+
This document is updated automatically on its GitHub distribution page.
34+
To ensure you have the latest information, please check the page regularly.
35+
The author bears no responsibility for any errors or omissions in this document.
36+
Use with discretion.
37+
}
2238

2339
\input{main}
2440

notes/chaps/instructions-sets/index.tex

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,4 +335,45 @@ \subsubsection{Flow Control}
335335
\end{minted}
336336
\end{example}
337337

338-
\end{enumerate}
338+
\end{enumerate}
339+
340+
\subsection{Operating System Support}
341+
342+
The operating system (OS) is a software that controls the execution of programs and
343+
manages hardware resources. It allows a computer to be used efficiently and conveniently.
344+
345+
\textbf{Services provided by the OS}:
346+
\begin{itemize}
347+
\item \textbf{Program Creation} -- through compilers, assemblers, editors, debuggers etc.
348+
\item \textbf{Program Execution} -- through loading programs into memory and preparing resources for the program
349+
\item \textbf{I/O Access} -- through providing a uniform I/O interface while the implementation is left to the OS
350+
\item \textbf{File System Management}
351+
\item \textbf{System Access} -- control access to system resources to prevent unauthorised users
352+
\item \textbf{Error Detection and Response}
353+
\item \textbf{Accounting} -- collecting usage statistics and monitoring performance parameters
354+
\end{itemize}
355+
356+
\subsubsection{OS Protection Scheme}
357+
358+
Most OSs uses two modes of operation: \textbf{user mode} and \textbf{kernel mode}.
359+
The CPU will execute in different modes to facilitate protection. Some OSs may use up
360+
to four modes. Some resources are only accessible in kernel mode.
361+
362+
An OS is supposed to be well-tested, while bugs may exist in user programs.
363+
364+
OS functions are usually accessed via special entry points called \textbf{system calls}.
365+
Upon a system call, the CPU will switch from user mode to kernel mode.
366+
367+
\subsubsection{Multitasking, Time Sharing \& Process Scheduling}
368+
369+
To fully utilise the CPU, the CPU is shared among multiple processes. Each process
370+
is given a time slice to execute. When it uses up its time slice, the CPU will
371+
suspend the execution and switch to another process.
372+
373+
The OS maintains a queue of processes in which the order of execution depends on
374+
several factors, such as priority, waiting time, whether the process has used up
375+
its time slice (i.e. CPU-bound jobs), the current system load, etc.
376+
377+
\subsection{Processor Organisation}
378+
379+
\subsection{Rich Instruction Set Architecture (RISC)}

notes/disclaimer.tex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,8 @@
77
This PDF file was automatically compiled and published at
88
\textcolor{blue}{\url{https://github.com/ShingZhanho/COMP2120-Notes}}.
99

10+
The order/arrangement of the contents in this document reflects neither the order of
11+
teaching of the course nor the order of the textbook. The author of these notes has
12+
rearranged the contents for his own convenience.
13+
1014
\end{remark}

notes/preambles.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,4 +267,4 @@
267267
268268
269269
\newbool{INCLUDE_DISCLAIMER}
270-
\setbool{INCLUDE_DISCLAIMER}{false}
270+
\setbool{INCLUDE_DISCLAIMER}{true}

0 commit comments

Comments
 (0)