CS3060 Notes

Study guide for final exam

Slides
The textbook slides are available here: http://codex.cs.yale.edu/avi/os-book/OS9/slide-dir/index.html

Slides for Chapters 1 and 2

Slides for Chapter 3

Slides for Chapter 4

run.c Thread programming example from Wednesday, July 12th

slideSet17.ppt Dr. deBry's slides for Unix threads

slideSet18a.ppt Dr. deBry's slides for synchronization (Chapter 5)

Chapter 5 Notes

slideSet23.ppt Dr. deBry's slides for virtual memory (Chapter 9)

slideSet10.ppt Dr. deBry's slides for disk scheduling

slideSet08.ppt Dr. deBry's slides for the kernel directory interface

slideSet09.ppt Dr. deBry's slides for file systems (Chapters 11 and 12)

Server Access
The name of the server for this class is cs3060.tc.uvu.edu Your login name is your UV ID. The temporary password was (or will be) sent to your myUVU (UV Link) email address. The system will require you to change your password the first time you log in. You can log in using a secure shell (SSH) client such as PuTTY. Once you log in, you can use Unix shell commands as explained in class and described in the Unix Commands link below.

Here is the information you need to connect with PuTTY:
Host name: cs3060.tc.uvu.edu
Connection type: SSH
Port number: 22

UNIX Commands
There is an introductory tutorial for UNIX commands at http://www.ee.surrey.ac.uk/Teaching/Unix

Here is a link to the Guide to Unix wiki book: http://en.wikibooks.org/wiki/Guide_to_Unix There is a list of commands in the "Quick Reference" section.

Editors

Emacs
Here are links to two Emacs tutorials:
http://www.jesshamrick.com/2012/09/10/absolute-beginners-guide-to-emacs/
https://www.gnu.org/software/emacs/tour/

Vim
Here are a couple of Vim resources:
https://danielmiessler.com/study/vim/
https://linuxconfig.org/vim-tutorial

Nano is another editor that is available on the server.

Virtual Machines
Why, When, and How To Use a Virtual Machine
Beginner Geek: How to Create and Use Virtual Machines

Our textbook has a virtual machine that you can download and run using VirtualBox:
Operating Systems Concepts virtual machine
Note: The OSC-2016.ova download is almost three gigabytes, so you'll need to use a high-bandwidth Internet connection or allow a lot of time to download it.

C Programming Wikibook
http://en.wikibooks.org/wiki/C_Programming You'll find information about C strings (null-terminated strings) in the Beginning C section in Arrays and Strings and in the Intermediate C section in String Manipulation.

C Programming on UNIX
This web site has information about programming in C and UNIX system calls: http://www.cs.cf.ac.uk/Dave/C/CE.html
This web site has a section on using the make utility.

The C Book
Here's a link to an online book about C programming that might be helpful. http://publications.gbdirect.co.uk/c_book/

CodingUnit C Tutorials and Reference
http://www.codingunit.com/category/c-tutorials
http://www.codingunit.com/category/c-language-reference

Input in C programs
Using printf for output in C works pretty well, but input is tricky. There's a scanf function, but it's error prone and usually not a good way to go. fgets or getline are probably the best input functions to use. You can read about them at these links:
• Here's a link to a Stack Overflow question about input in C:
http://stackoverflow.com/questions/9278226/which-is-the-best-way-to-get-input-from-user-in-c
• This is a link to a blog post about the getline function:
http://c-for-dummies.com/blog/?p=1112

make
Here's a link to a make tutorial from Middle Tennessee State University:
http://www.mtsu.edu/~csdept/FacilitiesAndResources/make.htm

hello.c and Makefile
Here is an example of a simple program and Makefile:
hello.c      Makefile
Note: If you look at the C program in a web browser it might not display correctly because of the < and > characters that are part of the program.

Git
Pro Git is a book that is available in print, in a browser, and in PDF form. The browser and PDF versions are free.
https://git-scm.com/book/en/v2

For this class you'll want to read Chapter 1 and sections 2.1 to 2.5 of Chapter 2.

Sample threads code
threads.zip

Shell command to find partial anagrams: anagram.sh
This script is from Foundations of Computer Science by Alfred V. Aho and Jeffrey D. Ullman. It has been modified slightly to work on OS X.