(Due on the first class on Monday, Jan. 11, 2016)
I expect all students to have an initial familiarity with the more
common Linux (UNIX) system calls in the C language before the first
class of CS 5600 (before Mon., Jan. 11). This homework is intended to
establish the intended familiarity with the Linux/UNIX operating system
and will help students to get started with HW1 (to be assigned during
the first class on Jan. 11).
- Have a Linux based system accessible. There are several options:
Sometimes the CCIS machines might not be available and so it's highly
recommended to go with either option (b) or (c).
- Use the CCIS Linux machines. You can find more information
about CCIS Linux support including remote access at:
- Install a Linux distribution on your personal computer. On Windows
computer, one can enable dual booting for this purpose. On Apple
computers, dual booting is possible, but is slightly trickier
(see option "c" below).
- Install a Linux virtual machine on your Windows or Mac computer. For
Windows computers, one can use
VirtualBox (freely available)
VMware Workstation (freely available
for download via the Software Downloads link on the myNEU portal).
- Familiarize with the Linux shell and command line. There are several
online tutorials and guides. See for example the tutorials listed on:
- If you are not using the CCIS machines, install the "gcc" compiler
on your Linux installation or the Linux virtual machine.
- For Debian/Ubuntu Linux distribution, use:
sudo apt-get install build-essential
- For Fedora, use:
sudo dnf group install 'Development Tools'
- For OpenSUSE, use:
sudo zypper install -t pattern devel_basis
- Compile a simple "hello world" C program on Linux using the "gcc"
compiler and execute it.
You can compile the program using:
This generates an executable 'a.out', which can be executed using:
- Familiarize with the more common Linux system calls in the C language.
This prerequisite also includes a knowledge of C pointers.
These include: fork/execvp/waitpid, open/close, read/write/dup,
and malloc/free. In each case, you can find a detailed description
by studying the man pages. For example, 'man 2 open' on the command
line will describe everything about the call to `open()`. You can
then experiment with the system calls in your C program.
There are several good tutorials on systems programming in C.
Some possibilities are: