Web Resources for CS3650
NOTE for Fall, 2020:
This web page is for the section of Prof. Cooperman, only.
Specially for this semester,
I have included a statistics web page linking to
Coronavirus deaths and cases for Northeastern U., Massachusetts,
the United States, and around the world.
The office hours are as stated on the syllabus
(Mon. and Thurs., 1:30 - 2:30; for Fall, 2020),
and by appointment.
Here are some immediate resources in the course for doing homework, following
the readings, etc.
- Course home:
- The course materials will always be available either from this web page or
from the course directory on the Khoury Linux computers: /course/cs3650/.
- The course is based on Linux (the third of the three popular
operating systems). If you do not yet have a Khoury Linux account, get one.
If you are not fluent in the basics of Linux/UNIX,
please go to any of the good tutorials on the Web.
Personally, I like:
Other useful tips on Linux:
- Productivity tip: In most settings: the four cursor keys work
(for editing the current or previous commands);
and the <TAB> key works (for auto-completion of filenames and commands).
- If you're using Apple (the second most popular operating system), the
terminal window provides you with a UNIX-like environment.
- If you're using Windows (the most popular operating system), you can
install WSL2 (Windows Subsytem for Linux, version 2).
This gives you a Linux virtual machine side-by-side with Windows.
If you are unsure of which Linux distribution to use, Ubuntu is
a common first choice for those unfamiliar with Linux.
(When I followed the instructions for WSL2, I got
Error 0x1bc and I fixed it by downloading
the MSI package listed here. I then needed to enter "Windows
Features" in the search bar, and then select "Windows Hypervisor
Platform", and then go back to following the Microsoft
Windows instructions. Some people may also need to turn on
virtualization in their BIOS. After entering BIOS, examine
all options in all tabs with the letter 'v'. For me,
the option was "AMD SVM".)
- Regardless of whether you are using Linux, Apple, or Windows/WSL2
on your laptop, practice using
ssh USERNAME@login.ccs.neu.edu and
scp myfile.txt USERNAME@login.ccs.neu.edu:
(and notice the final colon with the 'scp' command line).
For help, try:
man ssh and
- The syllabus
contains the required readings in the textbook. It's available
from the link or from /course/cs3650/ (the course directory)
on Khoury Linux computers.
- The homework subdirectory
of the course directory contains all course homework,
and the course directory contains all handouts.
- Help directory:
- The course directory includes a help directory.
There are two older reviews of UNIX there.
excellent modern introduction to UNIX by M. Stonebank.
- Linux editors:
- Please also note the directory for
UNIX (Linux) editors.
On Khoury Linux, try:
cd /course/cs3650/unix-editors. The editor vi
is a popular choice. To learn vi (estimated time: one hour),
login to Khoury Linux and do:
and follow the on-screen instructions.
- MIPS assembly language:
- The assembly portion of the course will be based on MIPS.
You can find the textbook's
"Green Card" online. You can find a manual for MIPS as
Appendix A in the textbook or else
Appendix A online. The latter requires your Khoury Linux password.
Read this, and re-read it.
The course will also heavily use the MIPS simulator.
- C language:
- We will briefly review the C language (the core of Java, but including
primitive types, only). For a more extensive overview of C, consider
a good, free
on-line C book by Mike Banahan, Declan Brady and Mark Doran.
- GDB debugger, gcc compiler, etc.:
- Some help files for Linux and its compilers,
editors, etc. are also available.
As you use Linux, please especially practice using GDB
(GNU debugger). This will help when you test your homeworks under Linux.
It will also reward you with more productive debugging for the rest of
your computer science career.
- Undergraduate tutoring:
- Khoury College used to offer free undergraduate upper-class tutoriing.
I don't see a link to it right now (as of Sept., 2020).
If someone knows more about the current status of this resource,
tell me, and I'll update a link to it.
Going beyond: enrichment material:
- Some students have asked about a book for a more advanced introduction
to Linux and systems programming. This book goes well beyond what is
needed for the course. But for those who are interested, there is:
Advanced UNIX Programming, by Marc J. Rochkind
- If you're interested in reading the original UNIX research paper, which
announced the implementation of UNIX to the world, see
The UNIX Time-Sharing System (1974).
Lecture on Parallel Computing (read the first half only, for
a nice overview and graphs of why multi-core is necessary, and
the benefits of many-core)
Texts for second half of course:
- Online text: ostep.org
(The final will cover all of the chapters on concurrency;
and also the chapters on files
from "Files and Directories" through "Fast File System (FFS)":
superblock, inode, etc. --- you do not
need to read about I/O Devices, disk drives and disk arrays.)
UNIX xv6 (hyperlinked):
UNIX xv6 (hyperlinked): (systems team re-organizing
our web directories?)
xv6 source code for UNIX kernel: especially see:
proc.c,h (process table);
swtch.S (context switch to a new process);
spinlock.c,h (spinlock, like a mutex);
file.c,h (file descriptor pointing to an open file);
fs.c,h (filesystem using superblock, inode, etc.);
pipe.c,h (pipes: e.g.,
ls | wc );
bio.c,h (buffered I/O: linked list of buffers acting as a cache
for disk blocks or disk sectors).
If you are curious, you can also read about the
history of xv6.
Book with commentary on xv6-rev8 (UNIX kernel)
- Python (based on materials in
Early history of Python (just for fun)
MIPS Simulator for Assembly Language homework (MARS):
- 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.
There is also an
online video demo of the Mars simulator.
- 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.
- The syntax of the assembly language is intended to be compatible
with Appendix B of our textbook (also
(requires CCIS password)).
- 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.
- GOTCHAS: There are several important things to watch out for.
- 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"
- 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.
- 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.
- 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.
- 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.
- 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".)
- Please note the
three sample assembly programs, along with an accompanying
tutorial on the same web page.
- 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.
OLD NEWS (from 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):
(potentially affects CPUs implementing out-of-order execution,
a feature that has been present on many CPUs since 1995)
(potentially read the data in the address space of a different
NEWS (from Spring, 2016
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:
Talk by Yale Patt (famous researcher
in Computer Architecture)
2015 CCIS Colloquia (research talks by invited guests to CCIS: topics including security, big data, social networks, robotics, natural language, etc.)
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)
One VLSI fabrication facility: $6.2 billion as of 2014
UMC to build 12-inch fab in Xiamen
Deep Learning on NVIDIA GPUs
DeepMind Beats Human Champion at Game of Go
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."
(appearing from 2016--2018; see especially the table, lower down
in this article)
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++)
- Go (widely used at Google;
also the source language for
a new type of lightweight virtual machine built on
top of Linux containers)
- Rust (grew out
of Mozilla, the developer of Firefox; may be used for a future
version of Firefox)
- Scala (runs on JVM;
Spark, a proposed successor to Hadoop, is built using Scala,
and supports Scala, Java, and Python)
A Few Simple Debugging Commands Save You Hours of Work
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.
Example: gdb --args ./a.out
COMMON gdb COMMANDS:
BREAKPOINTS: break, continue
STARTING: break main, run
WHERE AM I: info threads, thread 1; where, frame 2; list
PRINT: ptype, print ( ptype argv; print argv )
EXECUTING: next, step, finish, continue
(next line, step inside fnc, finish current fnc, cont. to next breakpoint)
< Cursor keys work, TAB provides auto-complete >
PARENT AND CHILD PROCESSES:
set follow-fork-mode child
(after call to fork(), switch to debugging child process)
DEBUGGING INFINITE LOOP:
run; TYPE ^C (ctrl-C) TO TALK TO gdb; where; print var1; etc.
HELP: help e.g.: (gdb) help continue
There are some good introductory materials for Python in
the instructor's directory.
After trying those out, here are some other Python background
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