various updates
[pintos-anon] / sigcse2009 / principles.tex
1 \section{Design Principles}
2 \label{sec:designprinciples}
3
4 Pintos's projects are built on a number of principles.
5
6 \paragraph{Read before you Code}
7 Each project involves a significant amount of reading code before
8 students write the first line of code.
9 Because software maintenance constitutes the vast majority of all
10 software development efforts~\cite{Boehm1981Software}, this setup mirrors the 
11 environment in which most software engineers work.
12 Simultaneously, we limit the amount students have to read
13 by encapsulating lower layers, such as device drivers.
14 We went to great lengths to write the entire Pintos baseline code,
15 and in particular the portions students must read, in a style that shows,
16 by example, the coding style we expect from students.  
17 % cut for length
18 %This style includes purely syntactical convention such as the choice of the
19 %GNU indentation style, and extends to commenting style and naming conventions.
20 We continuously refined the internal code documentation over several
21 semesters, focusing on those portions that initially proved difficult to understand. 
22
23 \paragraph{Maximize Creative Freedom}
24 OS design involves a tremendous amount of creative freedom, both in the
25 choice of algorithms and data structures.  Our projects are designed to
26 stimulate creativity by avoiding the prescription of specific approaches
27 to accomplish each project's goals.  Instead, students design their
28 own data structures and associated algorithms as much as possible.
29
30 \paragraph{Practice Test-driven Development}
31 %Test-driven development~\cite{Edwards}
32 Each project includes a large number of test cases that are accessible
33 to students, as shown in Table~\ref{table:tests}.
34 They must implement the API that is exercised by these test cases.  
35 Students are encouraged to add their own test cases.
36
37 \paragraph{Work in a Team}
38 The projects presented in this paper are designed to be accomplished by teams of 
39 2-4 students.  Working in a team provides an environment that more closely resembles
40 industrial software development, and it provides a way for students to brainstorm and
41 implement together.  In addition, we teach and require the use of group collaboration tools,
42 notably shared source code version control systems such as CVS.
43
44 \paragraph{Justify your Design}
45 Design justification and rationale is as important for learning as creating an artifact 
46 that fulfills a set of given requirements.  We designed a set of structured questionnaires 
47 in which students describe their design and discuss choices and trade-offs they made.
48
49 \paragraph{Provide a Reproducible, Manageable Environment}
50 Operating Systems are inherently concurrent environments, which can be difficult
51 to debug.  For educational use, we must provide an environment that is
52 manageable and reproducible, which we do by providing the option
53 of running Pintos in a simulated, fully deterministic environment.  
54 As a result, Pintos kernels can be debugged in a manner that
55 is substantially similar to how user programs are being debugged.
56
57 \paragraph{Include Analysis Tools}
58 Dynamic analysis tools are now being widely used in software development; 
59 an OS course should be no exception.  
60 In Section~\ref{sec:dynamicanalysis}, we describe how we 
61 extended the QEMU emulator~\cite{Bellard2005QEMU} to 
62 perform tailored analyses that find errors such as race conditions.
63
64 \paragraph{Provide Extensive and Structured Documentation}
65 If using an instructional system requires too much undocumented knowledge,
66 the system is often not shared or falls into disuse because the learning curve
67 for instructors is too steep and training teaching assistants is difficult.
68 Pintos includes an extensive 129 page manual, a sample solution,
69 and grading instructions for teaching assistants.  The project documentation 
70 highlights sections students must read from sections that merely provide supplemental information.
71 %Even though Pintos uses an existing and complex architecture, our experience indicates
72 %that the manual is sufficient for most students.
73