Pintos is an instructional operating system, complete with documentation
-and ready-made, structured assignments that introduce students to the
-principles of multi-programming, scheduling, virtual memory, and file systems.
-By allowing students to run their work product on actual hardware,
-rather than only in simulated or emulated environments, Pintos can
-increase student engagement. Unlike tailored versions of commercial
-or open source OS such as Linux, Pintos is designed from the ground up
-from an educational perspective. Finally, Pintos includes a set of
-debugging, diagnosis, and dynamic analysis tools to reduce the complexity
-of kernel-level development.
+and ready-made, structured assignments that introduce students to
+the principles of multi-programming, scheduling, virtual memory,
+and file systems. By allowing students to run their work product on
+actual hardware, while simultaneously benefiting from the debugging
+and dynamic analysis tools provided in simulated and emulated environments,
+Pintos increases student engagement. Unlike tailored versions of
+commercial or open source OS such as Linux, Pintos is designed from the
+ground up from an educational perspective.
+It has been used by multiple institutions for a number of years and
+is available for wider use.
+%Finally, Pintos includes a set of debugging, diagnosis, and dynamic analysis
+%tools to reduce the complexity of kernel-level development.
\subsection{Project 1 -- Threads}
% intro
-Project 1 centers around threads. The baseline Pintos code boots into a kernel that
+Project 1 revolves around threads. The baseline Pintos code boots into a kernel that
supports multiple in-kernel threads. It provides code for initialization, thread creation and
destruction, context switches, thread blocking and unblocking as well as a simple but
preemptive round-robin scheduler.
understand how threads are created and destroyed, and to understand the transitioning of
threads between the READY, RUNNING, and BLOCKED states. They also study how a thread's
internal memory is managed, which is used to store its runtime stack and thread control block.
-Student can examine the context switch code, but the projects do not involve any modifications
+Students can examine the context switch code, but the projects do not involve any modifications
to it.
After reading the baseline code, the project asks students to implement several features
\paragraph{Learning Objectives}
In project 3, students learn how an OS creates the environment in which a user
program executes as it relates to the program's code and variables.
-It also provides a deep understanding of how OS use fault resumption to
+It also provides a deep understanding of how OS use fault resumption
to virtualize a process's use of physical memory.
In addition, students gain hands-on experience with page replacement algorithms
and have the opportunity to observe their performance impact.
physical or virtual computer on which Pintos runs, and use the student's kernel
to copy files in and out of their filesystems.
Similarly, we encourage students to experiment with different replacement
-strategies for their buffercache (though we require that their algorithm
+strategies for their buffer cache (though we require that their algorithm
behaves at least as good as a least-recently-used (LRU) strategy.
As with all projects, this assignment includes additional parallel programming
-tasks: in this project, we include a requirement that students a multiple-reader,
-single-writer access scheme for individual buffer cache blocks.
+tasks: in this project, we suggest that students implement
+a multiple-reader, single-writer access scheme for individual buffer cache blocks.
\paragraph{Testing and Grading}
Project 4 adds a new set of test cases that test the extended functionality.
-Project 4 does not require the virtual memory functionality, so can be built
-either on project 2 or 3 depending on the instructor's judgment.
+Project 4 does not require the virtual memory functionality, so it can be built
+on either project 2 or 3, depending on the instructor's judgment.
For each functionality test, we provide a sibling persistence test that verifies
that the changes done to the filesystem survive a shutdown and restart.
\end{figure*}
}
+% these are needed to use \fbox{} to surround includegraphics with so we can see the borders
+\setlength\fboxsep{0pt}
+\setlength\fboxrule{0.5pt}
+
+\newcommand{\pintosdetailfiguretwo}{
+ \begin{figure*}[htp]
+ % \centering
+ \begin{tabular}{cc}
+ % left bottom right top
+ \includegraphics[trim=.0in .4in .25in .1in, width=.7\textwidth]{pintosoverviewnolegend.pdf}
+ &
+ \includegraphics[trim=.0in 3.3in 7.3in .0in, width=1.6in]{pintosoverviewlegend.pdf}
+ \\
+ \end{tabular}
+ \caption{Components of Pintos split in provided support code, test cases,
+ and components created in assignments. Overlapping components indicate
+ when students have to replace parts of the support code.}
+ \label{fig:pintosdetail}
+ \end{figure*}
+}
+
\newcommand{\pintostestcounttable}{
\begin{table}
\begin{tabular}{lccc}
Despite the wide use of higher-level languages and environments, gaining a robust
understanding of operating systems (OS) fundamentals and training in the current design and
-implementation practices of operating systems remains a cornerstone goal of
+implementation practices of OS remains a cornerstone goal of
undergraduate computer science education.
% abstract/concrete
% internal/external
-Approaches to teaching such a course generally fall along two axes:
+Approaches to teaching OS courses generally fall along two axes:
whether the treatment of the material is abstract or
concrete~\cite{Hovemeyer2004Running}, and whether they adopt an
internal or external perspective~\cite{Deitel2003Operating}.
approach is challenging for several reasons. While realistic,
assignments should be relatively simple and doable within a realistic time frame.
Whereas assignments should use current hardware architectures,
-they must not impart too much knowledge that is transient.
+they must not impart too much transient knowledge.
Assignments should include and emphasize the use of modern software
engineering practices and tools, such as dynamic program analysis.
has been in use at several institutions for about 4 years. Pintos provides
a bootable kernel for standard personal computers. We provide several
structured assignments in which students implement a basic priority
-scheduler, a multi-level feedback queue scheduler, the ability to
-load programs and support a set of system calls, page-based virtual memory
+scheduler, a multi-level feedback queue scheduler, a process-based
+multi-programming system, page-based virtual memory
including on-demand paging, memory-mapped files, and swapping, and a
simple hierarchical file system. An overview of the projects enabled
by Pintos is given in Figure~\ref{fig:pintosdetail}, which shows which
-software is provided, which is created by students, and the relative
-relationship of test cases to Pintos modules.
+software is provided as support code and test cases,
+the parts that are created by students, and their relationship.
Although Pintos follows in the tradition of instructional operating systems
such as Nachos~\cite{Christopher1993Nachos}, OS/161~\cite{Holland2002New}, and
the three environments in which the same kernel can be run.
Others have used Linux, either on dedicated devices (e.g., iPodLinux~\cite{1352199}),
-or in virtualizated environments~\cite{1008027,1352648,Nieh2005Experiences}, to provide
+or in virtualized environments~\cite{1008027,1352648,Nieh2005Experiences}, to provide
an internal, concrete perspective. Compared to those approaches, Pintos provides
a similar level of realism to students in that they can see the result of their
work on concrete or virtualized hardware, but does not require that students
\pintosenvfigure{}
-\pintosdetailfigure{}
+\pintosdetailfiguretwo{}
% Challenges.
% How to embed principles?
\section{Design Principles}
\label{sec:designprinciples}
-The Pintos series of projects are built on a number of principles.
+Pintos's projects are built on a number of principles.
\paragraph{Read before you Code}
Each project involves a significant amount of reading code before
-students write the first line of their code.
+students write the first line of code.
Because software maintenance constitutes the vast majority of all
software development efforts~\cite{Boehm1981Software}, this setup mirrors the
environment in which most software engineers work.
+Simultaneously, we limit the amount students have to read
+by encapsulating lower layers, such as device drivers.
We went to great lengths to write the entire Pintos baseline code,
-and in particular the portions students will read, in a style that shows,
-by example, the coding style we expect from students. This style
-includes purely syntactical convention such as the choice of the
-GNU indentation style, and extends to commenting style and naming
-conventions. During the semesters in which Pintos was used, we
-continuously refined the internal code documentation, focusing on those
+and in particular the portions students must read, in a style that shows,
+by example, the coding style we expect from students.
+% cut for length
+%This style includes purely syntactical convention such as the choice of the
+%GNU indentation style, and extends to commenting style and naming conventions.
+We continuously refined the internal code documentation over several
+semesters, focusing on those
portions that initially proved difficult to understand or confusing.
\paragraph{Maximize Creative Freedom}
\paragraph{Practice Test-driven Development}
%Test-driven development~\cite{Edwards}
Each project includes a large number of test cases that is accessible
-to students.
-They must implement the API that is exercised by these test cases. An overview is provided in Table~\ref{table:tests}.
+to students, as shown in Table~\ref{table:tests}.
+They must implement the API that is exercised by these test cases.
Students are encouraged to add their own test cases.
\paragraph{Work in a Team}
The projects presented in this paper are designed to be accomplished by teams of
2-4 students. Working in a team provides an environment that more closely resembles
-industrial software development, and it provides a way for students brainstorm and
+industrial software development, and it provides a way for students to brainstorm and
implement together. In addition, we teach and require the use of group collaboration tools,
notably shared source code version control systems such as CVS.
\paragraph{Justify your Design}
Design justification and rationale is as important for learning as creating an artifact
-that fulfill a set of given requirements. We designed a set of structured questionnaires
+that fulfills a set of given requirements. We designed a set of structured questionnaires
in which students describe their design and discuss choices and trade-offs they made.
\paragraph{Provide a Reproducible, Manageable Environment}
Operating Systems are inherently concurrent environments, which can be difficult
to debug. For educational use, we must provide an environment that is
-manageable and reproducible, which is given by the option
-of running Pintos in a simulated environment eliminates this
-non-determinism. As a result, Pintos kernels can be debugged in a manner that
+manageable and reproducible, which we do by providing the option
+of running Pintos in a simulated, fully deterministic environment.
+As a result, Pintos kernels can be debugged in a manner that
is substantially similar to how user programs are being debugged.
\paragraph{Include Analysis Tools}
-Static and dynamic analysis tools are now widely being used; an OS course should
-be no exception. We have extended the Qemu emulator that perform tailored
-analyses that can point out errors such as race conditions.
+Static and dynamic analysis tools are now being widely used; an OS course should
+be no exception. We have extended the QEMU emulator~\cite{Bellard2005QEMU} to
+perform tailored analyses that point out errors such as race conditions.
\paragraph{Provide Extensive and Structured Documentation}
-Instructional systems often are not shared, or fall in disuse because the expertise to use them
-in a teaching setting relies on too much undocumented knowledge, making training of
-teaching assistants difficult and providing a steep learning curve for instructors
-wishing to use. Pintos includes an extensive 129 page manual, a sample solution,
-and instructions for teaching assistants. The assignment documentation separates those parts
-students must read from those parts that merely provide supplemental information.
+If using an instructional system requires too much undocumented knowledge,
+the system is often not shared, or falls into disuse, because the learning curve
+for instructors wishing to use it is too steep and training teaching assistants is difficult.
+Pintos includes an extensive 129 page manual, a sample solution,
+and instructions for teaching assistants. The assignment documentation separates sections
+students must read from sections that merely provide supplemental information.
%Even though Pintos uses an existing and complex architecture, our experience indicates
%that the manual is sufficient for most students.
Invalid memory accesses, such as a read from newly allocated but uninitialized data, are detected by
tracking all memory accesses. Heap allocation calls are instrumented to map a range of addresses as
-uninitialized. When data is written to a memory address, it is marked as initialized. If a address
+uninitialized. When data is written to a memory address, it is marked as initialized. If an address
marked as uninitialized is read from, the error is reported and the address is marked as
uninitialized to mask spurious reports.
% More sophisticated analysis may be implemented in the future.
In the future, we will expand Pintos's analysis capabilities to
provide quantitative information and include realistic
device models.
-We also considering the extension of Pintos to multiple
-CPUs, and the development of assignments that involve
+We are also considering extending Pintos to multiple
+CPUs, and developing assignments that involve
networking and interprocess communication (IPC).
Although feedback from our industrial affiliates, who compare
-students having Pintos to students having taken course that use
-less concrete or external approaches, is highly favorable,
+students having used Pintos to students having taken courses
+that use less concrete or external approaches, is highly favorable,
we need to perform a formal evaluation comparing learning
outcomes using Pintos to other alternatives.