CS 3210 - Final Review

This sheet contains everything you need to know about the Final.

Test Format

What kind of questions will be on the test?

  1. Matching Questions (25 qs @ 1 pts ea = 25 pts) - You must match numbered terms to lettered definitions. You will find terms, programs and functions that we covered in class.
  2. Fill-in-the-Blanks (15 qs @ 2 pts ea = 30 pts) - Complete sentences by filling in the blank with the word that best completes them. The answers to these will be things that we have mentioned frequently in class.
  3. Multiple-Choice (10 qs @ 2 pts ea = 20 pts) - Circle the letter of the item that best answers or completes the question. There is only one right answer per question.
  4. Short Answer Questions (5 qs @ 5 pts ea = 25 pts) - These questions will cover theory and concepts that we covered in class. These will make you think a little bit. You will answer them with one sentence each. You will get credit for a clear and complete answer, but not necessarily for a long answer. Be terse in your answers, but remember the short and sweet rule: your answer must be both short and sweet. It is possible for an answer to be plenty sweet but not short enough; it is likewise possible for an answer to be plenty short but not sweet enough. Feel free to give examples or draw pictures if it will make your answer clearer or help communicate to me that you understand the concept.

Note that I will make most questions worth more than one point so that if you give me a partially correct answer, I can give you partial credit.

Questions about the Test

Here are some answers to questions you might have regarding the test, presented in FAQ format.

What can't I use?

The test will be closed note, closed book, closed Internet. (And yes, closed neighbor.) In other words, you will need to study and pull the answers out of your head.

So, What can I use?

Students who do not speak English as their first language are allowed to use a translating dictionary (English -> Mandarin, English -> Russian, English -> Czech, etc.) durring the test.

Native English-speakers can't use anything.

Is the test going to be on the computer?

No, it will be a written test on sheets of paper. Bring a pen or pencil.

Do I have to write any code?

No, there will be no lab questions, nor any questions that require you to write code. I may have some questions that give code snippets and ask "explain what this code is doing" or "this code produces this output, explain why", or possibly "there's a bug in this code, where is it?", but you won't have to write any code.

Do I have to know lots of vi or gdb commands?

No you don't. I'm not going to test you on that.

This test looks a lot harder than the Midterm.

It's not.

Can you just give me a list of the material that will be on the test like you did for the Java class?

Sure. Click here.

Stuff to Study, Chapter by Chapter

Ch 16: Networking / Sockets

Basic components / terms of network infrastructure: packet, router, hop. Recall the class exersize we did passing notes around.

Difference between Connection-oriented or stream protocol (like TCP, which has sequence numbers) and Connectionless or datagram (like UDP).

Relationship between IP addresses and hostnames; what the Domain Name System (DNS) does.

Ports / port numbers: why ports are necessary / significant. Using /etc/services to find what service runs on what port. Using nmap to scan ports. Daemon programs that run on a port.

Difference between Domain Sockets (single-host) and Internet Sockets (multi-host).

Programs: telnet, ping, ifconfig, host, nslookup, netstat, nmap, netcat (nc), traceroute

Sockets on the server side: socket / bind / listen / accept, and sockets on the client side: socket / connect.

Ch 17: Time

The time() syscall retrieves the number of seconds since the Epoch.

Sleeping with sleep() / usleep() / nanosleep() / select().

Difference between one-shot timers and recurring timers. Using either alarm() or setitimer() and receiving a SIGALRM.

Ch 18: Random Numbers

Pseudorandom vs. Random.

Linux (and other Unicies) seed an entropy pool (/dev/random and /dev/urandom) with environment noise.

Seeding the random number generator with srand() and using rand() to return random numbers.

Ch 19-20: Nothing

Ch 21: String Matching

Difference between globbing & regular expressions.

Reveiw some of the regex metacharacters. Know what a "metacharacter" is.

Programs: grep / egrep.

Programming stuff: regcomp / regerror / regexec / regfree

Ch 22: S-Lang

We covered readline on this day. Know what readline does.

Know what the S-Lang library is and what it can do for you.

Know what a character set is.

I'm not going to put a lot of SLang functions on the test. Just hit on the high points here.

Ch 23: Berkeley DB

Know what an Abstract Data Type (or "ADT") is.

Hash: An array is a list indexed by number, a hash is a list indexed by a string.

Keys and values.

Review the database operations: dbopen, db->close, add / edit: db->put, iterating: db->seq, retrieving one rec: db->get, removing: db->del. You should be pretty familiar with these by now.

Ch 24: Parsing Command-Line Options

Know what an "option" (or flag) is.

Differences between: getopt, getopt_long, popt.

Know what an option string is and what it means (i.e. "ab:c:d::")

Ch 25: Dynamically Loading Libraries at Run-Time

Review Function Pointers.

Understand what a "function signature" is.

Retrieving functions from shared libraries at run-time with: dlopen, dlsym, dlclose. Also, error-checking with dlerror.

Ch 26: Names and the User Database

Some important system files to know about:

  1. /etc/passwd - stores user information
  2. /etc/group - holds group information
  3. /etc/shadow - holds passwords.
  4. /var/log/utmp - holds login information

"GECOS" information is stuff like full name, office, phone number, etc. It is read by the finger program and can be changed with the chfn program.

The who program will show who is logged in, the last program will show a list of the last login attempts.

Other Stuff

Re-declaring variables with extern.

Know about getting on-line documentation with man.

Any of the programs we looked at in class might show up in the Matching or FITB section (things like "nmap", "grep", etc.).