Hello everyone, Here are the final tutorial notes for the term. Remember, feel free to contact me if you have any questions about the material. If there are any problems that arise during your tutorials, please let me know. Reminders ========= - Assignment 4 is due this Friday at noon. - I will be in touch with each you about any outstanding assignment marking, assignment remarks, and/or final end-of-term administrivia. Tutorial 12 Notes -- August 10 ============================== (1) Assignment 4 Assignment 4 is due this Friday at noon so there still might be some questions about it. If there are questions that you can't answer, let me know or tell the student to speak to me directly. (2) Posted example code Last week we finished covering threads and shared memory in lecture. I've posted some sample programs to the course webpage (on the lectures and tutorials page) that illustrate these topics. Please point out these examples to your students and remind them that they should review all the sample code and tutorial examples as part of their exam preparation. (3) Review questions Because this is the last tutorial, and the exam is on Monday, I'd like you to work through a few sample exam questions with your students. These questions are all taken from previous exams, and the solutions to these questions are provided (I'll point you to the necessary documents). The important thing with these problems is to try to get the students involved in the solutions. Encourage your students to help you develop the solution. Let your class assess whether or not a solution is correct or not. Ask them if a potential solution has any flaws. Basically, try to prompt the students, and let them direct you in how to solve the problem. I'm not too concerned if you can't get through all the questions. It's better to spend time on fewer problems if you're getting some good questions and the class is involved. Here are some problems I suggest you work through with your class (if you have any questions, please let me know): (i) Question 10 (p. 13) from the August 2002 exam: http://www.cs.utoronto.ca/~rpetrick/csc209/csc209summer2002exam.pdf This is a Bourne shell (sh) question. It's been a while since we've looked at any shell scripts so it'll be good to go over this question. (An answer is given in the file listed above.) (ii) Question 6 (p. 8) from the April 2004 exam: http://www.cs.utoronto.ca/~reid/csc209/tests/final/Winter04FinalSolutions.pdf Note: i and j should also be defined to be of type pid_t (i.e., int). Answers (please verify these answers are correct): ------- Part (a): TRUE, FALSE, TRUE, TRUE, FALSE, FALSE Part (b): Yes; add wait(0) immediately after line 12. Part (c): Add wait(0) after line 8 and line 12. (iii) Question 9 (p. 14) from the December 2002 exam: http://www.cs.utoronto.ca/~reid/csc209/tests/final/Fall02FinalSolutions.pdf Answers ------- Part (a): answered in the file listed above. Part (b): Yes, for instance: Child: x is 55, y is 22 Parent: x is 11, y is 55 Done: z is 77 Done: z is 33 (iv) Question 1 (p. 2) from the December 2002 exam: If you still have time you can go over these TRUE/FALSE questions with your class.