Here you can find all the information that you'll need throughout the semester. All announcements will be made on this page so I recommend you monitor it regularly.
If you would like to check out previous offerings of this course, see Fall 1999, Fall 2001, Fall 2003. Fall 2005.
I will hand out the assignment's requrements in class on Monday 04/07.
Posted: 04-04-2008 20:09 by fredk
Posted: 20-02-2008 17:48 by fredk
your host> ssh hive.cec.wustl.edu hive:~/wusrc> cd ~cse522/wusrc hive:~/wusrc> pwd /home/cec/class/cse522/wusrc hive:~/wusrc> ls -la total 40 drwxr-xr-x 3 cse522 class 8192 Feb 18 18:22 . drwxr-xr-x 15 cse522 class 8192 Feb 18 18:51 .. -rw-r--r-- 1 cse522 class 6372 Feb 18 18:22 Makefile.cse -rw-r--r-- 1 cse522 class 2428 Feb 18 18:22 Makefile.inc drwxr-xr-x 3 cse522 class 8192 Feb 18 18:37 wulibI have copied all of the wulib library source code into the wulib directory. So create a wusrc directory within your own login account and copy the Makefiles and source code. Note, you will need to define the WUSRC environment variable in your login script:
mkdir $HOME/cse522 mkdir $HOME/cse522/wusrc # BASH use .bashrc or .bashrc.mine export WUSRC=$HOME/cse522/wusrc # csh or tcsh use .cshrc and setenv setenv WUSRC $HOME/cse522/wusrcBefore you can use these new environment variables you will need to source the login script you just edited:
# bash . ~/.bashrc.mine # csh or tcsh source ~/.cshrc.mineNext go my project source directory:
hive:~/wusrc> cd ~cse522/src hive:~/wusrc> ls -la total 56 drwxr-xr-x 6 cse522 class 8192 Feb 18 18:34 . drwxr-xr-x 15 cse522 class 8192 Feb 18 18:51 .. drwxr-xr-x 3 cse522 class 8192 Feb 18 10:25 context -rw-r--r-- 1 cse522 class 915 Feb 18 18:34 Makefile.inc drwxr-xr-x 3 cse522 class 1024 Feb 18 18:51 wth_tests drwxr-xr-x 3 cse522 class 8192 Feb 18 10:28 wuperf drwxr-xr-x 3 cse522 class 1024 Feb 18 18:49 wuthreadsThen create your own project soruce directory and copy over the Makefiles and wth_tests directory. In the wuthreads directory you should copy over the header files, Makefile and the library in wuthreads/Linux/libwth.a.
Feel free to browse through the files and directories in my wusrc and src directories (well, the ones for which you have read permission).
Before building anything in the wth_tests directory you will need to define two more environment variables (or edit the makefiles):
mkdir $HOME/cse522/src # bash export WUCSE=$HOME/cse522/src export WTH=$WUCSE/wuthreads # csh or tcsh setenv WUCSE $HOME/cse522/src setenv WTH $WUCSE/wuthreadsNow your ready to make the example code using the wuthreads library I am providing.
hive:~/wusrc> cd $WUSRC/wulib hive:~/wusrc> make hive:~/wusrc> cd $WUCSE/wth_tests hive:~/wusrc> make hive:~/wusrc> Linux/callout hive:~/wusrc> Linux/testappLet me know if you have any trouble building the library and test apps.
Test Applications for wuthreads:
The testapp
program simply creates a set of client threads and has them do some busy
work and periodically checks to see which thread is running. It is thus able
to determine if your library is able to preempt the currently running thread
when they are in the round robin scheduling class.
The second program callout
implements a callout queue and uses a barrier defined in the wulib library.
If you want more information about the callout queue implementation either
read the code or see the corresponding undergraduate project
description.
The test programs will compile against the wuthreads library and header files I am making available. As stated above, to use the supplied Makefile you will have to define the WUSRC, WUCSE and WTH environment variables so they point to the correct directories, which I leave to you.
Posted: 18-02-2008 19:23 by fredk
Posted: 18-02-2008 13:43 by fredk
Posted: 11-02-2008 18:03 by fredk
prompt> gnuplot gnuplot> set logscale xyz 2 gnuplot> set pm3d gnuplot> splot "hosta.txt" with lines gnuplot> splot "hostb.txt" with lines gnuplot> splot "hostc.txt" with lines gnuplot> splot "hostd.txt" with linesIn the plots you should cleary see the influnce of the stride. You will also be able to identify the approximate size of L1 and L2 cache.
if (env.test == Unbound) {
/* ***** Local Scope -- Unbound Thread ***** */
if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_PROCESS) != 0) {
printf("ctx: Invalid scope for pthread_attr (PROCESS)\n");
return 1;
}
} else if (env.test == Bound) {
/* ***** System Scope -- Bound Thread ***** */
if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM) != 0) {
printf("ctx: Invalid scope for pthread_attr (SYSTEM)\n");
return 1;
}
}
cd mycode_some_dir
gcc -O4 -DMyOS=Linux -DPTHREADS -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE \
-W -Wall -Wundef -Wimplicit -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \
-I../ \
-o Linux/mem mem.c -L./Linux -lwu -lpthread -lm
Last update: 04/28/2008 17:50:12 CDT (-0500 GMT)