HW1 DESIGN SUMMARY ================== OVERALL DOCUMENTATION -20 Egregious violation of style versus design document example -10 Numerous excessively long lines (> 79 characters) -10 Numerous capitalization, punctuation, spelling, or grammar errors DESIGN -10 Failure to check return value of malloc() -10 Use of ASSERT to check something that can actually fail, e.g. malloc() CODING STYLE -10 Inconsistent or bad coding style: no indentation, cramming many statements into one line, other issues at TA's discretion -10 Numerous very long source code lines (> 100 characters) -10 Commented-out or #if'd out code makes real code hard to read -10 Many missing comments on structure, structure members, global or static variables, or function definitions -10 Function(s) should be decomposed for clarity [indicate function] -10 Cut-and-pasted code should be made into function [indicate where] -10 Uninformative or deceptive identifiers Subtotal: /10 (not capped) PROBLEM 1: ALARM CLOCK DOCUMENTATION -30 Grossly inaccurate: documentation has no resemblance to code -15 Important inaccuracies: documentation and code differ significantly [indicate how] -5 Minor inaccuracies: documentation and code differ [indicate how] -5 A1: Missing entirely/missing comments or purpose/too long -2 A1: Forgot to include some declarations [which] -5 A2: Missing/non-responsive/too long/too short -5 A3: Missing/non-responsive/too long/too short -5 A4: Missing/non-responsive/too long/too short -5 A5: Missing/non-responsive/too long/too short -5 A6: Missing/non-responsive/too long/too short -3 A6: "Straw man"--comparing correct design to an incorrect one -10 Claim or implication that list operations are atomic DESIGN -30 Not implemented -10 Interrupt handler always examines or modifies every waiting thread -5 Race between list modification and interrupt handler -10 A timer tick that occurs during list modification delays waking threads until the next timer tick -10 Race between two threads modifying list -10 Wakes only one thread even if multiple are finished sleeping -15 Malfunctions (e.g. by busy waiting or not waiting the full time), even in corner case (e.g. when malloc() returns NULL) -15 Fixed limit on number of threads that may sleep -5 Uses thread_block() instead of higher-level synchronization primitives -5 Disables interrupts unnecessarily -5 Unnecessary or redundant synchronization in timer_sleep() Subtotal: /30 (capped at 0) PROBLEM 2: PRIORITY SCHEDULING DOCUMENTATION -30 Grossly inaccurate: documentation has no resemblance to code -15 Important inaccuracies: documentation and code differ significantly [indicate how] -5 Minor inaccuracies: documentation and code differ [indicate how] -5 B1: Missing entirely/missing comments or purpose/too long -2 B1: Forgot to include some declarations [which] -5 B2: Missing/non-responsive/too long/too short -3 B2: Diagram is difficult to follow -3 B2: Diagram is not specific to the chosen design -3 B2: Didn't include explanatory text, just a diagram -3 B2: Didn't include diagram, just explanatory text -5 B3: Missing/non-responsive/too long/too short -3 B3: Didn't explain semaphores -3 B3: Didn't explain locks -3 B3: Didn't explain condition variables -5 B4: Missing/non-responsive/too long/too short -5 B5: Missing/non-responsive/too long/too short -5 B6: Missing/non-responsive/too long/too short -5 B7: Missing/non-responsive/too long/too short -3 B7: "Straw man"--comparing correct design to an incorrect one DESIGN -30 Not implemented -15 Malfunctions in corner case (e.g. when malloc() returns NULL) -15 Grossly simplified design egregiously limits generality, e.g. small, fixed limit on total number of donations, donees, donor locks, etc. -5 Global list of donations is unnecessary and inefficient -3 sema_up() yields regardless of whether a higher-priority thread was unblocked -5 sema_up() yields even when it does not unblock a thread -8 Race in lock_acquire() between priority donation and "down"ing sema -8 Race in lock_release() between release of donated pri and "up"ing sema Subtotal: /30 (capped at 0) PROBLEM 3: ADVANCED SCHEDULER DOCUMENTATION -30 Grossly inaccurate: documentation has no resemblance to code -15 Important inaccuracies: documentation and code differ significantly [indicate how] -5 Minor inaccuracies: documentation and code differ [indicate how] -5 C1: Missing entirely/missing comments or purpose/too long -2 C1: Forgot to include some declarations [which] -5 C2: Missing/non-responsive/too long/too short -2 C2: Minor mistakes in table -5 C2: Major mistakes in table -5 C3: Missing/non-responsive/too long/too short -5 C4: Missing/non-responsive/too long/too short -5 C5: Missing/non-responsive/too long/too short -3 C5: Did not mention advantage of submitted design -3 C5: Did not mention disadvantage of submitted design -5 C6: Missing/non-responsive/too long/too short -5 C6: Did not properly justify failure to abstract fixed-point math DESIGN -30 Not implemented -10 Code to update load average, recent_cpu, and thread priorities once per second is unreadable -5 Code to update load average, recent_cpu, and thread priorities once per second is difficult to read -5 Wastefully recalculates every thread's priority every 4th timer tick -5 Race against timer interrupt in thread_get_recent_cpu() or thread_get_load_avg() Subtotal: /30 (capped at 0)