Web Resources for CS3650 (Computer Systems)

Final exam: Apr. 27:
The final exam will be on Friday, Apr. 27 from 8 a.m. - 10 a.m. in 201 Mugar Life Science Bldg. It will be open book, open notes.

NOTE for Spring, 2018:
This web page is for the section of Prof. Cooperman, and not for the section of Prof. Tuck. Please note that the two version of this course may be similar, but are not tightly coupled.

Instructor: Gene Cooperman
Spring Semester, 2018

The office hours are as stated on the syllabus (11:30 - 12:30, after class, on Tuesdays and Fridays for Spring, 2018), and by appointment.
In addition, upper class tutoring is available. The schdule is posted there for wak-in or one-on-one tutoring. When you discover which tutors (i.e., for which days) specialize in Computer Systems, please pass that information to me, and I will post that information here.

See below for:


Course basics: Here are some immediate resources in the course for doing homework, following the readings, etc.

  1. The homework subdirectory of the course directory contains all course homework, and the course directory contains all handouts, and the syllabus. The syllabus contains the required readings in the textbook. The course directory is also available from our Linux machines as /course/cs3650/.
  2. The course directory includes a help directory. There are two older reviews of UNIX there. But please consider this excellent modern introduction to UNIX by M. Stonebank.
  3. Please also note the directory for UNIX (Linux) editors. You will need to login to a Linux machine to use these. They are in /course/cs3650/unix-editors. For example, to learn vi (estimated time: one hour), login to Linux and do:
        vi /course/cs3650/editors-unix/vitutor.vi
    and follow the on-screen instructions.
  4. Appendix A is also online (requires CCIS Linux password). It is the manual for MIPS Assembly language. Read it, and re-read it.
  5. Portions of the rest of an older edition of the text CD are also available online (requires CCIS password).
  6. Some help files for Linux and its compilers, editors, etc. are also available. As you use Linux, please look into using gdb (GNU debugger), which will help you greatly in debugging. This will help when you test your homeworks on our Linux machines.
  7. There is also a good, free on-line C book by Mike Banahan, Declan Brady and Mark Doran.
  8. If you use Windows, there is a free, open-source IDE (Integrated Development Environment) for C/C++, Dev-C++. Homeworks must be handed in using C, but this is a subset of C++. When your code works, you must still test it under Linux:
    gcc myfile.c; ./a.out
    If it doesn't work on our Linux system, it will be graded as not working.
  9. Additional help available: Upper Class Tutoring (but please do also come to my office hours)

Going beyond: enrichment material:

Texts for second half of course:

MIPS Simulator for Assembly Language homework (MARS):

  1. There is a MIPS Assembly language simulator with free downloads available and online documentation. For your convenience, a copy of the simulator is at: MIPS-simulator.
  2. To begin running the simulator, go inside the folder, and double-click on the Mars.jar icon. Alternatively, if running from the command line in Linux, type: java -jar Mars.jar If you download Mars.jar for your computer, there are also suggestions on that page for running Mars.
  3. The syntax of the assembly language is intended to be compatible with Appendix B of our textbook (also available online (requires CCIS password)).
  4. The software is distributed as a Java .jar file. It requires Java J2SE 1.5 or later. Depending on your configuration, you may be able to directly open it from the download menu.

    If you have trouble, or if you prefer to run from the command line on your own computer, the Java SDK is is also available for free download from the same download page. The instructions for running it from Windows or DOS should work equally well on Linux. The CCIS machines should already have the necessary Java SDK installed.

  5. GOTCHAS: There are several important things to watch out for.
    1. When you hit the "Assemble" menu item, any error messages about failure to assemble are in the bottom window pane, tab: "Mars Messages". Input/Output is in the bottom window pane, tab: "Run I/O"
    2. If you paste assembly code into the edit window pane, you must save that code to a file before Mars will let you assemble it.
    3. If you have selected a box with your mouse (e.g. "Value" box in the data window pane, or "Register" box), then Mars will not update the value in that box. Mars assumes you prefer to write your own value into that box, and not to allow the assembly program to use that box.
    4. If your program stops at an error, read the "Mars Messages" for the cause of the error, and then hit the "Backstep" menu item to see what caused that error. Continue hitting "Backstep" or "Singlestep" in order to identify the error.
    5. Your main routine must call the "exit" system call to terminate. It may not simply call return ("jr $ra"). Note that page B-44 of Appendix B of the text (fourth edition) has a table of "system services" (system calls). These allow you to do "exit" and also I/O.
  6. One of the nicer features of this software is a limited backstep capability (opposite of single-step) for debugging. In addition, the help menu includes a short summary of the MIPS assembly instructions. In general, I like this IDE for assembly even better than some of the IDEs that I have seen for C/C++/Java. (The one feature that I found a little unintuitive is that if you want to look at the stack (for example) instead of data, you must go to the Data Segment window pane, and use the drop-down menu at the bottom of that pane to choose "current $sp" instead of ".data".)
  7. Please note the three sample assembly programs, along with an accompanying tutorial on the same web page.
  8. I'd appreciate if if you could be on the lookout for any unusual issues, and report them promptly (along with possible workarounds), so the rest of the class can benefit. Thanks very much for your help on this.


Current Events

NEWS (for Spring, 2018):
Razer Phone 2 (with youtube video of two-phase vapor chamber in second half of video) Two security bugs, recently discovered, that affect most CPUs (technical paper released on Jan. 3, 2018):
  1. Meltdown paper (potentially affects CPUs implementing out-of-order executation, a feature that has been present on many CPUs since 1995)
  2. Spectre paper (potentially read the data in the address space of a different user process)

NEWS (from Spring, 2016 and earlier):
New memory technology: 3D XPoint (Intel/Micron, from press release)
     (non-volatile memory (like Flash/SSD), but 1,000 times faster and byte-addressable; at a price between Flash and RAM ??; available now in small quantities for special applications)

OLDER NEWS from Spring, 2015:
NEWS: Talk by Yale Patt (famous researcher in Computer Architecture)
NEWS: 2015 CCIS Colloquia (research talks by invited guests to CCIS: topics including security, big data, social networks, robotics, natural language, etc.)
NEWS: Android Apps that Never Die (talk by me, Gene Cooperman, and Rohan Garg, at ACM undergrad chapter: 6 p.m., Wed., Feb. 25, 104 WVG) (pizza included)
NEWS: One VLSI fabrication facility: $6.2 billion as of 2014 (from digitimes.com): UMC to build 12-inch fab in Xiamen


What are the largest supercomputers today?


Intel Announces Knights Mill: A Xeon Phi For Deep Learning (see also Coral supercomputers, below)

Deep Learning on NVIDIA GPUs

DeepMind Beats Human Champion at Game of Go (in 2015)

"[The deep learning algorithm of] AlphaGo doesn't actually use that much hardware in play, but we needed a lot of hardware to train it and do all the different versions and have them play each other in tournaments on the cloud. That takes quite a lot of hardware to do efficiently, so we couldn't have done it in this time frame without those resources."
NEWS: Coral supercomputers (appearing from 2016--2018; see especially the table, lower down in this article)

What are some popular programming languages today?

Relative Popularity of Different Languages

Benchmark Games (Which is faster, C, Java, or Python?):
(Benchmarks are notoriously variable. Be careful about how you interpret this.)

Three Newer Languages (with lessons from Scheme/Java/C/C++)

A Brief Glimpse at Some Other Assembly Languages


The GNU debugger

GDB (GNU DeBugger):
  A Few Simple Debugging Commands Save You Hours of Work

	  gdb --args  
	  Example:  gdb --args ./a.out
	  break, continue
	  next, step, finish  (next line, step inside fnc, finish current fnc)
	  where, frame, list (e.g.: where; frame 0; list)
	  info threads, thread (e.g.: thread 2)
	  ptype, print  (   ptype argv[0]; print argv[0]   )
	  < Cursor keys work, TAB provides auto-complete >
          set follow-fork-mode child  (needed for debugging child process in shell)
	  help    e.g.: (gdb) help continue
  NOTE: For those who like a full-screen display of the current code, try the command ^Xa (ctrl-X a) to turn full-screen mode on and off.



There are some good introductory materials for Python in the instructor's directory. After trying those out, here are some other Python background materials:


Virtual memory

The following note by Rob Landley is a truly excellent summary of the most important points of virtual memory as it's really used (not just the textbook theoretical synopsis):