Last update: 9/6/2017
Exercise #1.The objective is to introduce you to our VM environment. There is nothing for you to turn in.....if you are not able to run the tests please contact us.
Step 1. Go through the procedures to setup a single VM.
Step 2. To install a set of example scripts and programs, please perform these steps.
- On your VM, create a working directory for CPSC3600, and then a subdirectory called 'code'
- There are two ways to proceed:
- If you use git, you can issue 'git clone anonymous@buffet.cs.clemson.edu:jmarty/NetworksAtSoC' (and thereafter use 'git status' to see if there are changes or 'git fetch' to get the latest code).
- Or use the program wget to download the tar.gz as follows:
- At the parent directory of 'code', issue a 'wget --no-check-certificate https://people.cs.clemson.edu/~jmarty/courses/Fall-2017/CPSC360/code/cpsc3600Code.tar.gz'
- WARNING: This will overwrite the current ./code directory!!!
- To unpack (you can do a single command, but I suggest getting in the habit of checking the tar file:
- gzip -d cpsc3600Code.tar.gz
- tar -xf cpsc3600Code.tar
- A brief introduction to the code....NOTE: You are welcome to use any of this code for any coding assignment for our class.
- bash- holds several bash scripts that we will look over (and possibly build upon)
- python- several python versions of the bash and C programs have been ported to python. We won't focus on Python this semester but feel free to learn/use !!
- cCode- example programs we will use during the semester.
Step 3. To make sure your system is working run a simple Unix program that illustrates the use of signals and timestamps. The program is setup to loop forever, sleeping 1 seconds every loop iteration. Each iteration displays the actual amount of time it slept. Ideally, the actual time equals 1 second. This program has been used in the past to create a timeseries of data that can be used to assess the accuracy (or inaccuracy) of sleeping for a precise amount of time.Issue a 'man -a sleep' to learn more about sleep (also issue a 'man -a nanosleep').
- cd ./code/cCode/UnixExamples/exampleTime1
- make clean
- make
- ./go