cd76579f1ac5e7c7949cc2e1bd0073353590236e
[pintos-anon] / sigcse2009 / introduction.tex
1 \section{Introduction}
2 \label{sec:intro}
3
4 Despite the wide use of higher-level languages and environments, gaining a robust
5 understanding of operating systems (OS) fundamentals and training in the current design and
6 implementation practices of OS remains a cornerstone goal of 
7 undergraduate computer science education.
8
9 % abstract/concrete
10 % internal/external
11 Approaches to teaching OS courses generally fall along two axes: 
12 whether the treatment of the material is abstract or 
13 concrete~\cite{Hovemeyer2004Running}, and whether they adopt an
14 internal or external perspective~\cite{Deitel2003Operating}.
15 An abstract approach discusses algorithms and techniques used in operating 
16 systems and may include partial implementation or simulation exercises,
17 whereas a concrete approach stresses the design and creation of 
18 realistic artifacts.
19 When adopting the internal perspective, an operating system is considered
20 from the point of view of the OS designer, whereas the external perspective 
21 assumes the role of a user or programmer using an OS's 
22 facilities~\cite{Bryant2002Computer}.
23
24 % is this too controversial for this audience?
25 The approach advocated in this paper adopts a concrete approach and the internal
26 perspective.  Students who have been in the role of an
27 OS designer bring a better understanding of how to use one; and students
28 who have both studied, implemented, and evaluated core OS techniques obtain 
29 a deeper understanding than those who have merely studied them.
30 Finally, adopting a concrete approach brings significant secondary
31 benefits, including training in modern software development techniques
32 and tools.  The C language remains the implementation language of choice
33 for operating system kernels and for many embedded systems.
34 Practice and debugging skills in C, particularly using modern tools,
35 not only increases students' ``market value,''~\cite{1292450} but provides students with
36 the insight that a low-level programming and runtime model is not incompatible
37 with high-level tools.
38
39 Designing course material for the internal and concrete 
40 approach is challenging for several reasons.  While realistic, 
41 assignments should be relatively simple and doable within a realistic time frame.  
42 Whereas assignments should use current hardware architectures, 
43 they must not impart too much transient knowledge.
44 Assignments should include and emphasize the use of modern software 
45 engineering practices and tools, such as dynamic program analysis.
46
47 This paper introduces Pintos, an instructional operating system kernel that 
48 has been in use at several institutions for about 4 years.  Pintos provides 
49 a bootable kernel for standard personal computers.  We provide several
50 structured assignments in which students implement a basic priority
51 scheduler, a multi-level feedback queue scheduler, a process-based 
52 multi-programming system, page-based virtual memory
53 including on-demand paging, memory-mapped files, and swapping, and a
54 simple hierarchical file system.  An overview of the projects enabled
55 by Pintos is given in Figure~\ref{fig:pintosdetail}, which shows which
56 software is provided as support code and test cases,
57 the parts that are created by students, and their relationship. 
58
59 Although Pintos follows in the tradition of instructional operating systems 
60 such as Nachos~\cite{Christopher1993Nachos}, OS/161~\cite{Holland2002New}, and
61 GeekOS~\cite{Hovemeyer2004Running}, 
62 PortOS~\cite{Atkin2002PortOS}),
63 BLITZ~\cite{PorterOverview},
64 JOS~\cite{1088822}, or Yalnix~\cite{1088822},
65 we believe that it is unique in two
66 aspects.  First, Pintos runs on both real hardware and in emulated and
67 simulated environments.\footnote{\small GeekOS is the only other system that claims to 
68 also run on real PC hardware; it requires, however, a dedicated disk and 
69 does not support running off USB devices, making it impractical for many 
70 laboratory settings.}  We believe that having the ability to see the outcome
71 of their project interact with actual hardware increases student engagement.
72 Second, we have created a set of analysis tools
73 for the emulated environment that allows students to detect programming
74 mistakes such as race conditions.  Figure~\ref{fig:pintosenvs} shows
75 the three environments in which the same kernel can be run.
76
77 Others have used Linux, either on dedicated devices (e.g., iPodLinux~\cite{1352199}),
78 or in virtualized environments~\cite{1008027,1352648,Nieh2005Experiences}, to provide
79 an internal, concrete perspective.  Compared to those approaches, Pintos provides
80 a similar level of realism to students in that they can see the result of their
81 work on concrete or virtualized hardware, but does not require that students 
82 understand the often arcane and ill-documented interfaces of the Linux kernel,
83 which were not designed from an educational perspective.  By contrast, all
84 Pintos code is written to be studied by students.
85
86 %This paper summarizes the design philosophy that underlies Pintos,
87 %details its structure, and outlines the nature and learning goals of each
88 %assignment.
89
90 \pintosenvfigure{}
91
92 \pintosdetailfiguretwo{}
93
94 % Challenges.
95 % How to embed principles?
96 % How to teach software engineering?
97 % Realism vs. Simplification
98
99 %User-Mode Linux\cite{1008027}
100 %Virtualization\cite{1352648}
101 %Linux in VM\cite{Nieh2005Experiences}
102