TA Notes - Spring 2013
( Last Update - April 17, 2013 )
Quick Links
Lab1
-
In Problem 4 and 5 of Lab1, there is a typo for someproc. It should be someprog instead. Either usage way is fine for the submission. Of course, everything has to be consistent, that is, someprogA and someprogB, or someprocA and someprocB, throughout problems 5 and 6.
-
If you have questions about grading, please contact the correspongind TAs to discuss.
P3.1-3.3 Nguyen Ngoc Duong, P3.4-4 Wei-Chiu Chuang, P5-6 Hou-Jen Ko
-
Please use the following instruction to retrieve the detailed lab1 grades and report. Each report file is only readable by the student and the TAs.
cat /u/u3/cs354/Spring2013/grades/__your_cs_login_/lab1.rpt
Lab2
-
Some students were confused about turnin instructions in Lab1. The handout says "Do not put any functionality in the main.c." It doesn't mean that you should not submit your test cases. Some test cases are necessary for grading. In order to be consistent, please rename your main.c for different questions according to the section in which they are located. For example, in Lab2, you will have four main files that are main.c.3.1 for cpu-intensive, main.c.3.2 for IO-intensive, main.c.3.3 for half-and-half, and main.c.4 for starvation.
-
If you have questions about grading, please contact the correspongind TAs to discuss.
P3 Wei-Chiu Chuang, P4-5 Hou-Jen Ko
-
Please use the following instruction to retrieve the detailed lab2 grades and report. Each report file is only readable by the student and the TAs.
cat /u/u3/cs354/Spring2013/grades/__your_cs_login_/lab2.rpt
Lab3
-
Please write your registercb() and sendb() in system/registercb.c and system/sendb.c respectively.
-
Since you have to implement two approaches in the last problem, please use a macro in your source code. In order to be consistent and eaiser for TAs to grade, please do the steps as follow:
1. Create a new header file include/config.h
2. Add a single line "#define APPROACH3" in include/config.h. (You can change this line while you test your program. See the note at the end for more details.)
3. Add "include < config.h >" at the end of include/xinu.h
4. In your source code, use the macro preprocessor to separate your two versions of code. For example, in sendb.c you have something like:
sendb(){
#ifdef APPROACH3
The version of sendb for approach3
#else
The version of sendb for approach1
#endif
}
Note: After you have done these steps, it will generate the code for approach3. If we comment out the line we defined in Step 2, it would generate the code for approach1.
-
Some changes for the first approach in Problem 2 because a sender calls receive() via a callback function that makes it send to itself.
1. Implementing the first approach in Problem 2 is optional. Those who implement it will receive 150 pts as bonus (i.e., extra credit) points.
2. Focus on implementing the third approach which for modern kernels is the only sound approach. The third approach still counts for 150 pts.
3. Those that choose to implement the first approach should make the following modifications:
a. Create a simple variant of receive(), call it, preceive() in preceive.c, that is identical to receive() except that it takes an integer argument
where the argument passed replaces the global currpid for indexing the receiver process's process table entry.
b. Change the function definition of myrecvhandler() so that it takes the pid of the receiver process as input:
-
If you have questions about grading, please contact the correspongind TAs to discuss.
P1 Wei-Chiu Chuang, P2 APPROACH1 Hou-Jen Ko, P2 APPROACH3 Nguyen Ngoc Duong
-
Please use the following instruction to retrieve the detailed lab3 grades and report. Each report file is only readable by the student and the TAs.
cat /u/u3/cs354/Spring2013/grades/__your_cs_login_/lab3.rpt
Lab4
-
Although the handout does not mention the case that freememgb() may deallocate a space which is smaller than a process allocated using getmemgb(), it is expected to be handled in your implementation.
- Duong is going to hold office hour on Friday, 10:30AM - 12:00PM, at Xinu lab (HAAS 257). If you have question regarding lab4 grades, please come.
-
Please use the following instruction to retrieve the detailed lab4 grades and report. Each report file is only readable by the student and the TAs.
cat /u/u3/cs354/Spring2013/grades/__your_cs_login_/lab4.rpt
Midterm
-
Please use the following instruction to retrieve the midterm exam score.
cat /u/u3/cs354/Spring2013/grades/__your_cs_login_/midterm.rpt
Final
-
Please use the following instruction to retrieve the final exam score.
cat /u/u3/cs354/Spring2013/grades/__your_cs_login_/final.rpt