Project 1 Feedback

From CS415

Table of contents

Grading Rubric

  • Code Style (10pts): Points for common coding errors like memory leaks, lack of error checking etc is deducted only once
  • Queue (20pts): Correctness of your queue implementation
  • Threads (30pts): Correctness of your minithread implementation
  • Synchronization (20pts): Correctness of your semaphore implementation
  • ProdCons (10pts): Correctness of your Producer-Consumer program
  • Tests (10pts): Whether code compiles, how much memory it uses, how fast it runs etc.

Common Errors

  • Semaphores: Thread1:P() Thread2:P() Thread3:V() Thread3:V() does not wake up Thread 1 and 2
  • MiniThreads: Calling start multiple times on the TCP returned by minithread_create(), causes the thread to be scheduled more often, or keeps lingering running copies in the queue even after the thread dies and its stack is freed leading to crashes. Also, having start() make a thread runnable even through it has hit finalize and has terminated can cause it to crash.
  • Code Style: Missing error checking -- return code from malloc (i.e. NULL)
  • ProdCons: Busy waiting, or not protecting shared variables

Tests

The tests comprised of compiling your code, running your ProdCons program and the Sieve program with the default arguments. After that, your memory usage and performance for sieve(10000) was compared to the rest of the submissions and extra points were awarted based on the rank.

Get Out of Jail Free Card

A lot of bugs, and problems were pointed out on the detailed report. Some minor ones were not scored down. Grading will be stricter for subsequent projects and for regrades.