Permalink
Browse files

added design doc

  • Loading branch information...
1 parent 6977b0b commit 11d65fedd63a5d9c51ba7a82189c7bc0041b2381 @Frankencelery Frankencelery committed Oct 5, 2012
Showing with 136 additions and 0 deletions.
  1. +136 −0 DesignDoc.txt
View
@@ -0,0 +1,136 @@
+CIS 520 - Programming Project #1
+
+---- GROUP ----
+
+Benjamin Kuestersteffen <bkuester@ksu.edu
+<Grant>
+
+...
+
+---- PRELIMINARIES ----
+
+None
+
+
+ ALARM CLOCK
+ ===========
+
+---- DATA STRUCTURES ----
+
+timer.c:
+static struct list thread_list;
+
+thread.h:
+int64_t wakeup_time;
+struct semaphore sema_wakeup;
+>> A1: Copy here the declaration of each new or changed `struct' or
+>> `struct' member, global or static variable, `typedef', or
+>> enumeration. Identify the purpose of each in 25 words or less.
+
+
+
+---- ALGORITHMS ----
+
+>> A2: Briefly describe what happens in a call to your timer_sleep(),
+>> including the effects of the timer interrupt handler.
+
+>> A3: What steps are taken to minimize the amount of time spent in
+>> the timer interrupt handler?
+
+
+---- SYNCHRONIZATION ----
+
+>> A4: How are race conditions avoided when multiple threads call
+>> timer_sleep() simultaneously?
+
+
+>> A5: How are race conditions avoided when a timer interrupt occurs
+>> during a call to timer_sleep()?
+
+
+---- RATIONALE ----
+
+>> A6: Why did you choose this design? In what ways is it superior to
+>> other designs that you considered?
+
+
+
+ PRIORITY SCHEDULING
+ ===================
+
+---- DATA STRUCTURES ----
+
+>> B1: Copy here the declaration of each new or changed `struct' or
+>> `struct' member, global or static variable, `typedef', or
+>> enumeration. Identify the purpose of each in 25 words or less.
+
+>> B2: Explain the data structure used to track priority donation.
+
+
+---- ALGORITHMS ----
+
+>> B3: How do you ensure that the highest priority thread waiting for
+>> a lock, semaphore, or condition variable wakes up first?
+
+>> B4: Describe the sequence of events when a call to lock_acquire()
+>> causes a priority donation. How is nested donation handled?
+
+>> B5: Describe the sequence of events when lock_release() is called
+>> on a lock that a higher-priority thread is waiting for.
+
+---- SYNCHRONIZATION ----
+
+>> B6: Describe a potential race in thread_set_priority() and explain
+>> how your implementation avoids it. Can you use a lock to avoid
+>> this race?
+
+---- RATIONALE ----
+
+>> B7: Why did you choose this design? In what ways is it superior to
+>> another design you considered?
+
+
+ ADVANCED SCHEDULER [EXTRA CREDIT]
+ =================================
+
+---- DATA STRUCTURES ----
+
+>> C1: Copy here the declaration of each new or changed `struct' or
+>> `struct' member, global or static variable, `typedef', or
+>> enumeration. Identify the purpose of each in 25 words or less.
+
+---- ALGORITHMS ----
+
+>> C2: Suppose threads A, B, and C have nice values 0, 1, and 2. Each
+>> has a recent_cpu value of 0. Fill in the table below showing the
+>> scheduling decision and the priority and recent_cpu values for each
+>> thread after each given number of timer ticks:
+
+timer recent_cpu priority thread
+ticks A B C A B C to run
+----- -- -- -- -- -- -- ------
+ 0
+ 4
+ 8
+12
+16
+20
+24
+28
+32
+36
+
+>> C3: Did any ambiguities in the scheduler specification make values
+>> in the table uncertain? If so, what rule did you use to resolve
+>> them? Does this match the behavior of your scheduler?
+
+>> C4: How is the way you divided the cost of scheduling between code
+>> inside and outside interrupt context likely to affect performance?
+
+---- RATIONALE ----
+
+>> C5: Briefly critique your design, pointing out advantages and
+>> disadvantages in your design choices. If you were to have extra
+>> time to work on this part of the project, how might you choose to
+>> refine or improve your design?
+

0 comments on commit 11d65fe

Please sign in to comment.