15-213 Intro to Computer Systems: Frequently Asked Questions

    Getting Help

  • Should I read the lab writeup before seeking help?

    • Yes.
    • Did we say, "Yes"?
    • Yes, we did.
    • Please read the lab writeups.
    • :-)

  • How can I get help?

    • Email us at 15-213-staff@cs.cmu.edu.
    • Stop by during office hours, Sun-Thu, 5:30-8:30, WeH 5207.
    • There is walk-in tutoring for 213 students on Tuesdays, 8:30-11:00pm, Mudge Reading Room.
    • Schedule a 1:1 meeting with your instructors or TAs.

  • I have some command line output that I'd like to send to the staff. Should I send it as a screenshot?

    • No. Text (copy and paste) is fine.

  • General Programming Issues

  • My code looked fine in my editor, but when my TA graded it on Autolab the indenting was all wrong and I lost points. What gives?

    • After you handin your code, always view it in Autolab to make sure that the indenting is what you expect. If it's not, then there are two possible reasons: (1) Your editor is configured to indent tabs a certain width. (2) You've mixed tabs and spaces in your code.
    • In either case, you shoule use spaces instead of tabs. To replace all tabs with spaces, run
      expand -t4 foo.c > bar.c 

  • When I try to run an executable file included in a lab handout, I get a "Permission denied" error. What should I do?

    • The Linux executable bit is not set. Run "chmod +x <filename>" to set the executable bit.
    • This problem may occur if you extract the handout tarball on a Windows machine. Always extract the handout on a Linux machine.

  • How do I extract a tarball on a Linux machine?

    • Run "tar -xvf <filename>" to extract it.

  • General Course Issues

  • Why can't I access the course on Autolab?

    • You don't have an Autolab account for this course yet. Autolab accounts are not tied directly to the Hub like Blackboard accounts.
    • Email the staff list 15-213-staff@cs.cmu.edu if you need an account created for you. You must be enrolled in the course in order to get an Autolab account.

  • Why can't I access the shark machines?

    • You should be able to access the shark machines with your Andrew credentials. Email the staff list 15-213-staff@cs.cmu.edu if you have trouble.

  • Must I work on the shark machines?

    • Your work will be graded on the shark machines, so it is in your best interest to work there.
    • For most labs, you may alternatively work on the Andrew Unix machines, which are nearly identical.
    • However, you must complete bomblab and buflab on a shark machine.

  • Must I attend a particular recitation?

    • You may attend any recitation you wish as long as the instructor leading the recitation allows it.
    • Please make sure the recitation you normally attend is the one specified on your Autolab account; if this is not the case, email the staff list so that we can update your account.

  • Data Lab

  • My puzzles pass btest but I get errors when I submit to Autolab. What gives?

    • As we discussed in the writeup, Autolab uses the driver.pl program to grade your submission. The driver.pl program runs dlc to check for operator violations and bddcheck/check.pl to do exhaustive testing. There are three reasons why btest may give different scores than driver.pl:

      • Reason 1: dlc discovered that you used illegal operators or too many operators.
      • Reason 2: btest does not do exhaustive testing. It is mostly useful for testing individual inputs on invidivual puzzles. Use bddcheck/check.pl for final testing.
      • Reason 3: bddcheck/check.pl is finicky about the code formatting, especially the location of the first and last braces in a function. The final right brace must be in the first column.
    The moral of the story: Before submitting to Autolab, do a thorough test by running dlc, bddcheck/check.pl, and driver.pl yourself on the shark machines.

    Bomb Lab

  • How do I get to the secret phase?

    What secret phase?

  • Cache Lab

  • Why are warnings like "unused parameter" being reported as errors?

    • On some labs we have set flags (-Wall -Wextra) for the compiler to generate more warnings than usual. We also set a flag (-Werror) to treat warnings as errors.
    • Any class of errors that can be detected by the compiler should be addressed sooner rather than later.

  • My csim.c works just like the reference one, but when I run test-csim I get -1 for all the hits, misses and evicts! What's going wrong?

    • Your main function probably returns something other than 0.
    • Our driver checks to make sure your simulator exited successfully, and in C, a main function should return 0 if it exited successfully.

  • Why am I geting an error: implicit declaration of function 'getopt'?

    • Reason: you are missing some header files in your include list.
    • Fix: Add this to your other includes:
                #include  <getopt.h>
                #include  <stdlib.h>
                #include  <unistd.h>
              

  • Proxy Lab

  • Where do I find telnet on the shark machines?

    • shark> /usr/bin/telnet

  • Does my proxy need to support POST requests?

    • No, it only needs to support GET requests.

  • Why does my proxy seem unable to properly handle images or other non-text content?

    • You're probably reading the data with functions such as getstr or rio_readlineb that are designed for text. Random end-of-line characters in the binary data will cause these functions to terminate prematurely. Use rio_readn and rio_readnb instead.

  • Why am I getting all these sig* warnings in csapp.c?

    • You've probably added -std=c99 to your CFLAGS. Leave it out or set it to gnu99 instead.

  • What's the easiest way to get started testing my proxy?

    • Have two terminal windows open, ssh to the same shark, start your proxy in one:
      [myshark]$ ./proxy <portnum>
      
      and do the following in the other:
      [myshark]$ export http_proxy=myshark:<portnum>
      [myshark]$ wget -d www.cnn.com
      
      Note that the "-d" option provides debugging info with exact request/response headers.
    • For fine-grain debugging, you can send headers from wget output line by line with nc:
      [myshark]$ nc myshark <portnum>
      GET http://www.cnn.com/ HTTP/1.0
      ...
      

  • I'm trying to test with nc. How do I generate \r\n?

    • At the end of the line press Ctrl^V then enter to generate \r. Another enter will generate \n.