CMPT 300: Operating Systems I
There two labs: one in room 4080 and contains Linux Machines, and one in room 4050 and contains Windows Machines. Your SFU account should work on any machine in the two labs.
The lab consists of 28 machines running Win XP and one machine running Linux. You can log on any of them using your SFU computing ID and password. The Linux server is named: csil-cpu.cs.surrey.sfu.ca. All machines have VMPlayer virtual machine software installed. Briefly, VMplayer allows us to create one or more virtual machines on top of the physical machine. You will use the virtual machines to test some of your assignments that require you to modify the kernel. You can obtain a version of Linux (Ubunto) to use on VMs from here. To use the virtual machine on your home machine, simply download and install the VMPlayer for Windows, then download and unzip the virtual machine. Open the file "Other Linux 2.6.x kernel.vmx" in VMPlayer. Then press the green play button and the VM will start. For security reasons, VMs are not connected to the network, but rather only to the local host machines, that is, each VM can access only the Win XP machine that is running it. Therefore for transferring files to the VM you need to first transfer them to the local machine that is running VMPlayer and then use FTP to transfer files to the VM.
Types of the Programming Assignments
You will have two different types of assignments during the course. In one type, you will develop user-level code, and in the other will develop both kernel-level and user-level code. In the first type (user-level code), you will develop and test your code on the Linux server: csil-cpu.cs.surrey.sfu.ca. You will not need the virtual machines in anyway.
In the second type of assignments, you will modify the Linux kernel and develop some applications to test your modifications. In this case, you will first do all your coding and compilation on the Linux server and then test your code on the VMs. You will not be able to test your modified kernel on the Linux server because: (i) your modifications may (actually, often) cause the machine to crash, (ii) you will need the password of the root, which is too risky to give to any student, and (iii) even if we give the root password to you, we will not be able to dedicate a machine for each student to test his/her code on it. In sum, you will test your code on the VMs, which will look exactly like real machines running Linux, except that when they crash no harm will happen to the physical machine or any other machine in the network.
Working on the Assignments in the Lab
I. User-level Assignments
All coding and testing will be done on the Linux
server csil-cpu.cs.surrey.sfu.ca. To
log on that machine from ANY Win XP machine in the
Now, you are in the Linux environment, you develop your code according to the requirements of the assignment.
II. Kernel-level Assignments
In these assignments, the coding is done on the Linux server and the testing is done on the VMs. For the coding phase, you do exactly as above. To test your code, you need to transfer it to the VM. What you will typically transfer is a new image of the kernel which has all your kernel modifications. In addition, you may transfer some user-level code (e.g. modified header files) for testing your new kernel.
To test on the VM, you need to start VMPlayer:
Start --> Programs --> All Software--> VMware --> VMPlayer. Open the CMPT300 image and press the "Play" button on the toolbar; this will boot the virtual machine. When prompted to enter username, enter cmpt300, the password is cmpt.
Note: Pressing CTRL + SPACE will move the cursor from the VM to the Win XP.
After starting the VM, you can transfer the code to it using WS_FTP in two steps: (i) transfer the code from the Linux server to the Win XP machine, then (ii) transfer the code from the Win XP to the VM. Remember that the VM is connected only to the local machine, not to the network. The IP address of the VM can be obtained using command ifconfig –a. Use the IP address of the VM and ftp to that IP address using command ftp in cmd (windows command prompt). Enter username and password. Use command put to transfer the file as \> put filename. Issue quit command when you are done.
Important note: When the VM resets upon power-off, any changes you make will NOT be saved. So, it is highly advisable that you do not do any coding on the VM. And if you do modify some files (say some testing files), remember to transfer them back the Linux server.
The following suggestions will help you configure your machine to work on the assignments remotely. The assumption is you are running Win XP.
· Install a secure shell client (e.g., SSH Secure Shell) . Configure SSH to enable tunneling. Free SSH clients can be obtained from the SSH Corporation (here) or a light-weight one called PuTTY (here). For SSH, press Edit --> Settings --> Profile Settings --> Tunneling --> "Tunnel X11 Connections". For PuTTY, go to Connection --> SSH --> X11 and check "Enable X11 Forwarding".
Install an X-server, for example, Cygwin/X. To start
X, go to Start --> Programs --> Cygwin/X
--> xterm. To auto-start X when you start your
computer, create a shortcut in the Startup program group to c:\cygwin\usr\X11R6\bin\startwin.bat
(replace c:\cygwin with wherever you installed Cygwin).
· Start the X-server before running SSH.
· Now, you can use SSH to log on the Linux machine (csil-cpu.cs.surrey.sfu.ca) to develop the code.