11/06: P5 stuff. Using condition variables, using makecontext()/etc.
10/23: P4 stuff. Simple thread creation; coarse-grained vs. fine-grained locking.
10/16: P3 questions (a few at least). One I didn't answer in class: how to use gdb with a linked library (if you are having trouble with LD_LIBRARY_PATH within gdb). One way is to compile your main program (the one calling the library) with the load path built in:
gcc -o main main.c -lmem -L. -Wl,-rpath,.
That last flag specifies the rpath which puts . into the binary itself, thus removing the need for you to even set LD_LIBRARY_PATH.
In discussion, we will cover the more practical side of systems and systems programming. Occasionally, we will even hold extra discussions, because in the past people have found them quite useful. However, because some of you cannot make the alternate time, we bring you here a transcript of what happened.
09/25: P2 again. strtok, execvp, and some other fun stuff. shell magic too, towards the end.
09/18: P2 introduction. Discussion of shells, built-in commands, and redirection. Fork: how it works. Execvp: how it works. How to do redirection with close() and open(). I kind of said this incorrectly during discussion: execvp() uses the existing path to find where executables are. Thus, your shell does not have to implement a path, as execvp() does that for you. Sorry for the confusion!
09/11: Projects questions (qsort, long lines, strtok, atoi/strtol, are books truthful?), Purify (again), C pointers/strcpy. In this discussion, we again touched on a number of interesting issues related to the project, saw better how to use purify, and talked about pointers (again). Will we ever stop talking about pointers? Probably not.
09/09: Project Questions, AFS, Makefiles, Purify, Testing. In this discussion, we covered a wide range of topics, including questions from students about P1, and a variety of other tools and things which should be useful to you in the coming semester (and beyond!).
Associated files can be found here. In particular, start with the README file, and feel free to look at the other remnants of discussion.
09/04: C Tips. Here is the set of notes from the first discussion: