User Tools

Site Tools


faq

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
faq [2010/10/07 03:23] jxufaq [2010/11/04 06:31] (current) jxu
Line 29: Line 29:
       http://www.gnu.org/software/make/manual/       http://www.gnu.org/software/make/manual/
  
-**Question 3**: For Assignment 3can include the errors.h file that was used in Assignment 2?+**Question 3**: For cse3221 assignment 2, I am having trouble compiling the code of my programThe errors that I get are: 1. ... 2. ... 3. ... ... 
 +This makes me suspect that there is something wrong with the <pthreads.h> library on the "RED" server, or maybe something is wrong with ..., or maybe something is wrong with ...   ... 
 +Could you please advise me on this issue.
  
-Answer to Question 3: Yes.+Answer to Question 3
 + 
 +There is nothing wrong with the pthread library on RED. 
 +The best and easiest way to do the assignment, is to follow the advice 
 +in the assignment 2 description document: 
 + 
 +   "F. Hints 
 +   1. You may start by trying to read and understand the program 
 +      "alarm_mutex.c" in pages 52-58 of the book "Programming with POSIX 
 +      Threads" by David R. Butenhof. 
 +   2. The program "alarm_mutex.c" and the file "errors.h" and "README" can 
 +      be downloaded from the directory /cs/course/3221/assign2. 
 +      Try to compile and execute this program by following the 
 +      instructions in the "README" file. 
 +   3. The book "Programming with POSIX Threads" by David R. Butenhof has       
 +      been put on reserve in Steacie Library." 
 + 
 + Once you have studied and understood the program "alarm_mutex.c", and have learned how to compile and execute this program by following the instructions in the "README" file, you can use the program "alarm_mutex.c" as a template to write your own program for the assignment 2. 
 + 
 +The following "gradualist" approach will minimize the chances of getting an unmanageable large number of compilation errors: 
 + 
 +Start with the program "alarm_mutex.c"; each time make just a few changes to make it closer to satisfying the requirements of assignment 2; each time after making just a few changes, try to compile it and run it and make sure that the new version of your code is at least compilable and is at least executable. Always save several previous compilable and executable versions of your code so that you can revert back to a previous compilable and executable version of your code if you experience difficulty compiling and executing the most recent version of your code and/or find it difficult to determine what is possibly wrong with the most recent version of your code. 
 + 
 + 
 +**Question 4**: For Assignment 3, can I include the errors.h file that was used in Assignment 2? 
 + 
 +Answer to Question 4: Yes
 + 
 +**Question 5**: For Assignment 3, can I use an approach similar to the approach suggested in the answer to Question 3 above?  
 + 
 +Answer to Question 4:  
 + 
 +Yes. You should follow the advice given in the "F. Hints" section in the Assignment 3 description document. Once you have studied and understood the programs “pxsem/prodcons3.c”, and  “pxsem/prodcons4.c”, and have learned how to compile and execute these programs by following the instructions in the "README" file, you can use the programs “pxsem/prodcons3.c”, and  “pxsem/prodcons4.c”, as a template to write your own program for  Assignment 3.
faq.1286421816.txt.gz · Last modified: 2010/10/07 03:23 by jxu

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki