The results of the course evaluation are available (PDF):
and will be discussed during the last lecture.
Lecture blog
The results of the course evaluation are available (PDF):
and will be discussed during the last lecture.
On the lab page you can find a sample solution to the filesystem lab.
The last (optional) lab is finally online. You can get all the details at the parallel lab webpage.
As usual, if there are any questions, comments or bugs, file them to Mathias.
So long, and have fun with the last optimization lab.
If the URL that is passed to parse_uri just contains a hostname withouy any path (e.g. http://www.foo.bar) then the function might cause a core dump because there is a small bug in the parse_uri function…
The diff for the parse_uri function looks as follows:
/* Extract the host name */
hostbegin = uri + 7;
- hostend = strpbrk(hostbegin, ” :/\r\n\0″);
+ /* does not work because it maps to the end-of-string and strpbrk
+ * will return NULL
+ */
+ //hostend = strpbrk(hostbegin, ” :/\r\n\0″);
+ hostend = strpbrk(hostbegin, ” :/\r\n”);
+ if (hostend == NULL) hostend = hostbegin+strlen(hostbegin);
len = hostend – hostbegin;
strncpy(hostname, hostbegin, len);
hostname[len] = ‘\0′;
Of course you can download the corrected handout at http://www.lst.inf.ethz.ch/teaching/lectures/ss07/2100/proxy_lab/proxylab-handout.tar
As Matteo said in the lecture you can choose your programming language for this lab. But keep in mind that the exercise should not be made simpler than it is in C. So you should not use any high-level functions to program sockets and use high-level objects for String manipulation or URL-handling.
Also dont use any uncommon or unusual languages. If you are in doubt, check back with Mathias.
Some of you told me that you don’t have enough time to complete the proxy lab, so the deadline is postponed to June, 10.
Also you have to take care for some special hickups if you use HTTP/1.1 because the connection is not closed when all data is transfered.
You can use the following procedure to avaid a (forever) blocking read:
Also keep in mind that you might need to reformat “GET http://server/path/ HTTP/1.1″ to “GET path/ HTTP/1.1\nHost: server” depending on the server implementation of HTTP/1.1.
The last lab about parallelization with OpenMP will be optional and will provide the possibility to raise the grade of a student or a group (but not to lower it).
I will present the details during monday’s lecture.
I was told that there was a mistake in the proxy_lab and filesystem_lab exercise sheets. They stated that groups up to three people could be formed, but the course homepage itself says that only groups up to two people are allowed.
So I wanted to clarify that only groups up to TWO people are allowed to work together.
I hope that this does not cause any inconveniences to you. If there are any problems, step by at my office and we’ll try to solve them!
An example of Doxygen documentation for the filesystem lab is available in HTML and PDF format. The settings used to generate the documentation can be found in the Doxygen configuration file.
On the lab page you can find a sample solution to the filesystem lab.
The new assignment is out, check the website at http://www.lst.inf.ethz.ch/teaching/lectures/ss07/2100/proxy_lab/index.html
A new version of the handout is available online. It contains a new fstest.c with some bug fixes
A new command file is available to test for the append operation (if a write is issued on an existing file the written content will be appended at the end of the existing data).
You can assume that the parameters passed to the filesystem lab are correct. You are not requested to check for invalid file names (with non-legal characters) or invalid paths (e.g. fs_creat("/non-existing-dir/file-to-be-created.ext"))
Your FAT driver can have the following limitations:
You can test the listed operations with evaluation.img image file and the corresponding evaluation.img.command command file
On the lab page you can find a sample solution to the scheduler lab.
To test changes on a disk image (performed with the fs_creat and fs_write calls) you should check the modified image file with a filesystem checker.
Example on Linux:
$ fsck.vfat -lnv single.img
dosfsck 2.11 (12 Mar 2005)
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "mkdosfs"
Media byte 0xf8 (hard disk)
512 bytes per logical sector
2048 bytes per cluster
1 reserved sector
First FAT starts at byte 512 (sector 1)
2 FATs, 12 bit entries
1024 bytes per FAT (= 2 sectors)
Root directory starts at byte 2560 (sector 5)
512 root directory entries
Data area starts at byte 18944 (sector 37)
502 data clusters (1028096 bytes)
32 sectors/track, 64 heads
0 hidden sectors
2048 sectors total
Checking file /single
Checking file /FILE.TXT
Checking for unused clusters.
single.img.orig: 2 files, 1/502 clusters
Options:
-l: list path names of files being processed-n: no-operation mode: non-interactively check for errors, but don’t write anything to the filesystem-v: verboseThe points computed by mdriver are not absolute but depend on the machine where the test is run as they depend on an evaluation of the installed libc performance. You might therefore notice different results for your lab. All the labs are tested on the same machine and evaluated using the same libc performance values.
Some sample solutions and examples for the malloc lab are availble.
| mm-naive.c | The simplest solution: malloc simply sbrk’s and writes a size header. free does nothing. realloc is implemented directly with malloc and free. This solution has great throughput but terrible space utilization, and thus fails on many traces because it exhausts memory. |
| mm-implicit.c | Solution based on coalescing implicit free lists with boundary tag. This is the simplest reasonable package. |
| mm-explicit.c | Solution based on explicit free list with boundary tag coalescing and first fit placement. |
| mm-tree.c | Highly optimized solution based on red-black trees. |
| mm-test.c | A buggy malloc that produces overlapping blocks. Used for testing the driver. |