1
0
mirror of git://projects.qi-hardware.com/iris.git synced 2025-04-21 12:27:27 +03:00

add license; reorganize arch

This commit is contained in:
Bas Wijnen
2009-06-01 14:26:42 +02:00
parent ef1b9bfe10
commit aa7263c565
26 changed files with 612 additions and 191 deletions

View File

@@ -1,16 +1,33 @@
% Iris: micro-kernel for a capability-based operating system.
% kernel.tex: Description of Iris.
% Copyright 2009 Bas Wijnen <wijnen@debian.org>
%
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program. If not, see <http://www.gnu.org/licenses/>.
\documentclass{shevek}
\begin{document}
\title{Overview of my kernel}
\title{Overview of Iris}
\author{Bas Wijnen}
\date{\today}
\maketitle
\begin{abstract}
This document briefly describes the inner workings of my kernel, including the
reasons for the choices that were made. It is meant to be understandable (with
effort) for people who know nothing of operating systems. On the other hand,
it should also be readable for people who know about computer architecture, but
want to know about this kernel. It is probably better suited for the latter
category.
This document briefly describes the inner workings of my kernel, Iris,
including the reasons for the choices that were made. It is meant to be
understandable (with effort) for people who know nothing of operating systems.
On the other hand, it should also be readable for people who know about
computer architecture, but want to know about this kernel. It is probably
better suited for the latter category.
\end{abstract}
\tableofcontents
@@ -20,7 +37,7 @@ This section describes what the purpose of an operating system is, and defines
what I call an ``operating system''\footnote{Different people use very
different definitions, so this is not as trivial as it sounds.}. It also goes
into some detail about microkernels and capabilities. If you already know, you
can safely skip this section. It contains no information about my kernel.
can safely skip this section. It contains no information about Iris.
\subsection{The goal of an operating system}
In the 1980s, a computer could only run one program at a time. When the
@@ -160,8 +177,8 @@ into the hands of the user (as far as allowed by the system administrator).
This is a very good thing.
\section{Kernel objects}
This section describes all the kernel objects, and the operations that can be
performed on them. One operation is possible on any kernel object (except a
This section describes all kernel objects of Iris, and the operations that can
be performed on them. One operation is possible on any kernel object (except a
message and reply and call Capabilities). This operation is \textit{degrade}.
It creates a copy of the capability with some rights removed. This can be
useful when giving away a capability.
@@ -191,13 +208,13 @@ Receiver's queues.
\item Get and set the limit, which is checked when allocating pages for this
Memory or any sub-structure.
\item Drop a capability. This can only be done by Threads owned by the Memory,
because only they can present capabilities owned by it.\footnote{The kernel
checks if presented capabilities are owned by the Thread's Memory. If they
aren't, no capability is passed instead. The destroy operation destroys an
object that a capability points to. Drop destroys the capability itself. If a
Thread from an other Memory would try to drop a capability, the kernel would
refuse to send it in the message, or it would not be dropped because it would
be owned by a different Memory.}
because only they can present capabilities owned by it.\footnote{Iris checks if
presented capabilities are owned by the Thread's Memory. If they aren't, no
capability is passed instead. The destroy operation destroys an object that a
capability points to. Drop destroys the capability itself. If a Thread from
an other Memory would try to drop a capability, Iris would refuse to send it in
the message, or it would not be dropped because it would be owned by a
different Memory.}
\end{itemize}
\subsection{Receiver}
@@ -249,15 +266,15 @@ flags (whether the process is running or waiting for a message, setting these
flags is a way to control this for other Threads), the program counter and the
stack pointer. This call is also used to get the contents of processor
registers and possibly other information which is different per Thread.
\item Let the kernel schedule the next process. This is not thread-specific.
\item Let Iris schedule the next process. This is not thread-specific.
\item Get the top Memory object. This is not thread-specific. Most Threads
are not allowed to perform this operation. It is given to the initial Threads.
They can pass it on to Threads that need it (mostly device drivers).
\item In the same category, register a Receiver for an interrupt. Upon
registration, the interrupt is enabled. When the interrupt arrives, the
registered Receiver gets a message from the kernel and the interrupt is
disabled again. After the Thread has handled the interrupt, it must reregister
it in order to enable it again.
registered Receiver gets a message from Iris and the interrupt is disabled
again. After the Thread has handled the interrupt, it must reregister it in
order to enable it again.
\item And similarly, allow these priviledged operations (or some of them) in an
other thread. This is a property of the caller, because the target thread
normally doesn't have the permission to do this (otherwise the call would not
@@ -286,8 +303,8 @@ all flags can be set in all cases.
\end{itemize}
\subsection{Capability}
A capability object can be invoked to send a message to a receiver or the
kernel. The owner cannot see from the capability where it points. This is
A capability object can be invoked to send a message to a receiver or to Iris
itself. The owner cannot see from the capability where it points. This is
important, because the user must be able to substitute the capability for a
different one, without the program noticing. In some cases, it is needed to
say things about capabilities. For example, a Memory can list the Capabilities