Rubric updates from Winter 2013 CS 140 at Stanford
[pintos-anon] / ta-advice / hw3.txt
1 HW3 DESIGN SUMMARY
2 ==================
3
4 OVERALL
5
6   DOCUMENTATION
7     -20 Egregious violation of style versus design document example
8     -10 Numerous excessively long lines (> 79 characters)
9     -10 Numerous capitalization, punctuation, spelling, or grammar errors
10
11   DESIGN
12     -10 Failure to check return value of malloc()
13     -10 Use of ASSERT to check something that can actually fail, e.g. malloc()
14      -6 First race condition [specify where]
15      -3 For each additional race conditiona [specify where]
16
17   CODING STYLE
18     -10 Inconsistent or bad coding style: no indentation, cramming
19         many statements into one line, other issues at TA's discretion
20     -10 Numerous very long source code lines (> 100 characters)
21     -10 Commented-out or #if'd out code makes real code hard to read
22     -10 Many missing comments on structure, structure members,
23         global or static variables, or function definitions
24     -10 Function(s) should be decomposed for clarity [indicate function]
25     -10 Cut-and-pasted code should be made into function [indicate where]
26     -10 Uninformative or deceptive identifiers
27      
28 Total deductions (capped at -40): XXX
29
30 PROBLEM 1: PAGE TABLE MANAGEMENT
31
32   DOCUMENTATION
33     -16 Grossly inaccurate: documentation has no resemblance to code
34      -8 Important inaccuracies: documentation and code differ significantly
35         [indicate how]
36      -4 Minor inaccuracies: documentation and code differ [indicate how]
37      -4 A1: Missing entirely/missing comments or purpose/too long
38      -4 A2: Missing/non-responsive/too long/too short
39      -4 A3: Missing/non-responsive/too long/too short
40      -4 A3: Sharing implemented, but no explanation of how accessed
41         and dirty bits are coordinated
42      -4 A3: Sharing not implemented, but explanation states or implies
43         that a page can have multiple aliases
44      -4 A4: Missing/non-responsive/too long/too short
45      -4 A5: Missing/non-responsive/too long/too short
46
47   DESIGN
48     -25 Not implemented
49     -10 Page dirty status must be determined accurately, not approximately
50     -10 SPT implemented with a list (per page)
51     -10 Per-process supplementary page table not protected
52     
53 Total deductions (capped at -25): XXX
54
55 PROBLEM 2: PAGING TO AND FROM DISK
56
57   DOCUMENTATION
58     -30 Grossly inaccurate: documentation has no resemblance to code
59     -15 Important inaccuracies: documentation and code differ significantly
60         [indicate how]
61      -8 Minor inaccuracies: documentation and code differ [indicate how]
62      -5 B1: Missing entirely/missing comments or purpose/too long
63      -5 B2: Missing/non-responsive/too long/too short
64      -5 B3: Missing/non-responsive/too long/too short
65      -5 B4: Missing/non-responsive/too long/too short
66      -5 B4: Heuristic does not make sense
67      -2 B4: Claim that "struct intr_frame" is on user stack
68      -2 B4: Forgot to mention stack limit heuristic
69      -5 B5: Missing/non-responsive/too long/too short
70      -5 B5: Claim that deadlock is "rare" or has a "short" window
71      -5 B6: Missing/non-responsive/too long/too short
72      -3 B6: Didn't answer first part of question
73      -3 B6: Didn't answer second part of question
74      -3 B5: Disables interrupts
75      -5 B7: Missing/non-responsive/too long/too short
76      -5 B8: Missing/non-responsive/too long/too short
77      -3 B8: When pre-locking of pages is used, no discussion of
78         deadlock prevention
79      -3 B8: When global eviction lock is used, no discussion of
80         how pages are brought into main memory
81      -5 B9: Missing/non-responsive/too long/too short
82
83   DESIGN
84     -45 Not implemented
85      -5 Clock algorithm implementation literally uses a timer
86     -10 Clock algorithm implementation resets dirty bits
87      -5 Eagerly writes dirty pages to disk when running clock algorithm
88      -5 Stack fault heuristic allows more than 32 bytes below stack pointer
89      -3 Stack limit is smaller than 1 MB
90     -20 Globally locked and all page faults serialized
91     -10 Holds per process single SPT lock during the entire length of I/O
92      -5 Does not clear the swap slot after bringing the page back in memory. 
93         (Could potentially run out of swap slots)
94      
95 Total deductions (capped at -45): XXX
96
97 PROBLEM 3: MEMORY-MAPPED FILES
98
99   DOCUMENTATION
100     -12 Grossly inaccurate: documentation has no resemblance to code
101      -6 Important inaccuracies: documentation and code differ significantly
102         [indicate how]
103      -3 Minor inaccuracies: documentation and code differ [indicate how]
104      -3 C1: Missing entirely/missing comments or purpose/too long
105      -3 C2: Missing/non-responsive/too long/too short
106      -3 C3: Missing/non-responsive/too long/too short
107      -3 C3: No mention of stack expansion
108      -2 C3: Claim that memory mappings in different processes can "overlap"
109      -3 C4: Missing/non-responsive/too long/too short
110
111   DESIGN
112     -20 Not implemented
113      -5 Pre-reserves or permanently assigning file pages to frames
114      -5 Pre-reserves or permanently assigning file pages to swap slots
115      -5 Global counter for mapid_t lacks synchronization
116      -5 Global table of file mappings lacks synchronization
117      -5 Global table allows multiple processes to access same file mapping
118      -5 Superfluous locking on per-thread data structure [which]
119      -5 Fails to release resources in normal / failure case [specify where]
120      
121 Total deductions (capped at -20): XXX