systems and software can run under it. In class we will use the
@uref{http://bochs.sourceforge.net, , Bochs} and
@uref{http://fabrice.bellard.free.fr/qemu/, ,
systems and software can run under it. In class we will use the
@uref{http://bochs.sourceforge.net, , Bochs} and
@uref{http://fabrice.bellard.free.fr/qemu/, ,
-qemu} simulators. Pintos has also been tested with
-@uref{http://www.vmware.com/products/server/gsx_features.html, ,
-VMware GSX Server}.
+QEMU} simulators. Pintos has also been tested with
+@uref{http://www.vmware.com/, , VMware Player}.
These projects are hard. CS 140 has a reputation of taking a lot of
time, and deservedly so. We will do what we can to reduce the workload, such
These projects are hard. CS 140 has a reputation of taking a lot of
time, and deservedly so. We will do what we can to reduce the workload, such
@uref{http://www.stanford.edu/services/cluster/environs/sweet/, , ITSS
webpage}. You may use the Solaris or Linux machines. We will test your
code on these machines, and the instructions given here assume this
@uref{http://www.stanford.edu/services/cluster/environs/sweet/, , ITSS
webpage}. You may use the Solaris or Linux machines. We will test your
code on these machines, and the instructions given here assume this
-environment. However, Pintos and its supporting tools are portable
-enough that it should build ``out of the box'' in other environments.
+environment. We cannot provide support for installing and working on
+Pintos on your own machine, but we provide instructions for doing so
+nonetheless (@pxref{Installing Pintos}).
Once you've logged into one of these machines, either locally or
remotely, start out by adding our binaries directory to your @env{PATH}
Once you've logged into one of these machines, either locally or
remotely, start out by adding our binaries directory to your @env{PATH}
Now you can extract the source for Pintos into a directory named
@file{pintos/src}, by executing
@example
Now you can extract the source for Pintos into a directory named
@file{pintos/src}, by executing
@example
displayed in the terminal you used to run @command{pintos}. This is
because Pintos sends all output both to the VGA display and to the first
serial port, and by default the serial port is connected to Bochs's
displayed in the terminal you used to run @command{pintos}. This is
because Pintos sends all output both to the VGA display and to the first
serial port, and by default the serial port is connected to Bochs's
command line, e.g.@: @code{pintos run alarm-multiple > logfile}.
The @command{pintos} program offers several options for configuring the
command line, e.g.@: @code{pintos run alarm-multiple > logfile}.
The @command{pintos} program offers several options for configuring the
from them by @option{--}, so that the whole command looks like
@code{pintos @var{option}@dots{} -- @var{argument}@dots{}}. Invoke
@code{pintos} without any arguments to see a list of available options.
from them by @option{--}, so that the whole command looks like
@code{pintos @var{option}@dots{} -- @var{argument}@dots{}}. Invoke
@code{pintos} without any arguments to see a list of available options.
-Options can select a simulator to use: the default is Bochs, but on the
-Linux machines @option{--qemu} selects qemu. You can run the simulator
+Options can select a simulator to use: the default is Bochs, but
+@option{--qemu} selects QEMU. You can run the simulator
with a debugger (@pxref{GDB}). You can set the amount of memory to give
the VM. Finally, you can select how you want VM output to be displayed:
use @option{-v} to turn off the VGA display, @option{-t} to use your
terminal window as the VGA display instead of opening a new window
with a debugger (@pxref{GDB}). You can set the amount of memory to give
the VM. Finally, you can select how you want VM output to be displayed:
use @option{-v} to turn off the VGA display, @option{-t} to use your
terminal window as the VGA display instead of opening a new window
The Pintos kernel has commands and options other than @command{run}.
These are not very interesting for now, but you can see a list of them
The Pintos kernel has commands and options other than @command{run}.
These are not very interesting for now, but you can see a list of them
program twice and have it do exactly the same thing. On second and
later runs, you can make new observations without having to discard or
verify your old observations. This property is called
program twice and have it do exactly the same thing. On second and
later runs, you can make new observations without having to discard or
verify your old observations. This property is called
second of real time. Simulation in real-time mode is not reproducible,
and options @option{-j} and @option{-r} are mutually exclusive.
second of real time. Simulation in real-time mode is not reproducible,
and options @option{-j} and @option{-r} are mutually exclusive.
-rest of the projects, they will probably run faster in qemu.
+rest of the projects, they will run much faster in QEMU.
+@command{make check} will select the faster simulator by default, but
+you can override its choice by specifying @option{SIMULATOR=--bochs} or
+@option{SIMULATOR=--qemu} on the @command{make} command line.
You can also run individual tests one at a time. A given test @var{t}
writes its output to @file{@var{t}.output}, then a script scores the
You can also run individual tests one at a time. A given test @var{t}
writes its output to @file{@var{t}.output}, then a script scores the
specifying @option{VERBOSE=1} on the @command{make} command line, as in
@code{make check VERBOSE=1}. You can also provide arbitrary options to the
@command{pintos} run by the tests with @option{PINTOSOPTS='@dots{}'},
specifying @option{VERBOSE=1} on the @command{make} command line, as in
@code{make check VERBOSE=1}. You can also provide arbitrary options to the
@command{pintos} run by the tests with @option{PINTOSOPTS='@dots{}'},
All of the tests and related files are in @file{pintos/src/tests}.
Before we test your submission, we will replace the contents of that
All of the tests and related files are in @file{pintos/src/tests}.
Before we test your submission, we will replace the contents of that
is better to spend one or two hours writing a good design document than
it is to spend that time getting the last 5% of the points for tests and
then trying to rush through writing the design document in the last 15
is better to spend one or two hours writing a good design document than
it is to spend that time getting the last 5% of the points for tests and
then trying to rush through writing the design document in the last 15
patchwork of different styles that makes it obvious that three different
people wrote the code. Use horizontal and vertical white space to make
code readable. Add a brief comment on every structure, structure
patchwork of different styles that makes it obvious that three different
people wrote the code. Use horizontal and vertical white space to make
code readable. Add a brief comment on every structure, structure
-member, global or static variable, and function definition. Update
+member, global or static variable, typedef, enumeration, and function
+definition. Update
existing comments as you modify code. Don't comment out or use the
preprocessor to ignore blocks of code (instead, remove it entirely).
Use assertions to document key invariants. Decompose code into
existing comments as you modify code. Don't comment out or use the
preprocessor to ignore blocks of code (instead, remove it entirely).
Use assertions to document key invariants. Decompose code into
read by humans. It has to be acceptable to the compiler too, but the
compiler doesn't care about how it looks or how well it is written.
read by humans. It has to be acceptable to the compiler too, but the
compiler doesn't care about how it looks or how well it is written.
Pintos is distributed under a liberal license that allows free use,
modification, and distribution. Students and others who work on Pintos
own the code that they write and may use it for any purpose.
Pintos is distributed under a liberal license that allows free use,
modification, and distribution. Students and others who work on Pintos
own the code that they write and may use it for any purpose.
In the context of Stanford's CS 140 course, please respect the spirit
and the letter of the honor code by refraining from reading any homework
In the context of Stanford's CS 140 course, please respect the spirit
and the letter of the honor code by refraining from reading any homework
but do not copy code from them literally. Please cite the code that
inspired your own in your design documentation.
but do not copy code from them literally. Please cite the code that
inspired your own in your design documentation.
-Pintos comes with NO WARRANTY, not even for MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE.
-
-The @file{LICENSE} file at the top level of the Pintos source
-distribution has full details of the license and lack of warranty.
-
The original structure and form of Pintos was inspired by the Nachos
instructional operating system from the University of California,
The original structure and form of Pintos was inspired by the Nachos
instructional operating system from the University of California,
A few of the Pintos source files are derived from code used in the
Massachusetts Institute of Technology's 6.828 advanced operating systems
course. These files bear the original MIT license notice.
The Pintos projects and documentation originated with those designed for
A few of the Pintos source files are derived from code used in the
Massachusetts Institute of Technology's 6.828 advanced operating systems
course. These files bear the original MIT license notice.
The Pintos projects and documentation originated with those designed for
University, including at least Yu Ping, Greg Hutchins, Kelly Shaw, Paul
Twohey, Sameer Qureshi, and John Rector.
University, including at least Yu Ping, Greg Hutchins, Kelly Shaw, Paul
Twohey, Sameer Qureshi, and John Rector.