Test cases [[/25]] ------------------ -15 Didn't write own test cases -10 Insufficient testing Design [[/100]] --------------- Quality of DESIGNDOC -10 Arg passing -20 Copying data around: User-to-kernel copying. Kernel-to-user copying. String copying. -20 System calls: Allocation of file descriptors. Handling exceptions and related cleanup. pid_t rationale (if they changed tid_t -> pid_t mapping). Synchronization of system calls and filesystem. Overall: -1 Gratuitous use of malloc() (e.g. for allocating a list or a lock) -1 Inappropriate use of ASSERT (e.g. to verify that malloc() succeeded) Program arguments: +1 Support multiple pages of arguments. User/kernel copying: -5 Too many copies of user/kernel copying code -20 Doesn't check for page boundaries -10 Imperfect checking for page boundaries -5 Doesn't check whether pointers are at or above PHYS_BASE -2 Imperfect checking whether pointers are at or above PHYS_BASE +3 Copies large chunks while properly observing page boundaries +3 Scans for string null terminators w/o checking individual bytes while properly observing page boundaries +3 Uses get_user() and put_user() functions from FAQ for copying System call design: -5 Disables interrupts without reasonable justification -2 Doesn't close open files at process exit -2 Doesn't acquire file system lock to close files at process exit -5 Buffer overflow in read or write system call -5 System call error exit leaks memory/fails to release global lock -5 Uses a pointer as a file descriptor or pid without justifying Wait system call: -3 Busy waiting -3 A static list of all parent-child pairs is extremely wasteful -3 Obviously wasteful with memory (not deleting processes) -2 Finished parent deletes children which may still be running -1 Enable/disable interrupts -2 Joinable child lets its struct thread be deleted before parent dies -1 Race condition between wait and thread exit Style [[/25]] ------------- -5 Extraneous output caused warnings -5 Didn't print process termination messages -5 One big function for handling system calls -5 No attempt to conform to existing coding style Comments --------