Computer Science 271 Software I: Utilities and Internals

Dr. Stephen Bloch office 112 Alumnæ Hall phone 877-4483

                  email sbloch@panther.adelphi.edu

office hours 11–12 TTh, 1–4 W, or by appointment

September 2, 1994

1 Subject Matter

This course will explain the basic concepts common to many computer operating systems and introduce you to a great number of tools and features provided by operating systems, especially Unix, which is currently the most popular at academic and research institutions and just coming into widespread use elsewhere.

The Unix operating system has more personality than most, not because of how it works but because the people who built (and continue to build) it left such a distinctive mark on it with their senses of beauty, humor, and responsible behaviour. These have led to a system which, once you’ve grasped its fundamental philosophy, allows you both to make efficient use of your time and to have fun at it.

The creators of Unix used computers all day, every day, and wanted to use them as efficiently as possible. These people loved elegance and simplicity, and hated re-inventing the wheel, so they built a number of simple tools that could be combined as needed in billions of ways. They also loved whimsy, so you will find a lot of puns and jokes built into the system. On the other hand, they believed strongly in personal responsibility, so destructive pranks, invasions of privacy, and insults are strongly discouraged — usually not by rules, but by peer pressure. Unix has evolved from a computer system to a philosophy and finally to a community. I hope, among other things, to make you productive and civilized members of that community.

A disadvantage of building the whole system out of simple tools is that you need to learn a lot of simple tools before you can do anything. So in the first half of the semester you’ll read a lot of documentation and try your skill on small examples. In the second half of the semester the emphasis will shift somewhat from reading about Unix tools to actually using them.

Many of the people in this class are taking CSC 270 concurrently. You’ll need to learn the same Unix tools and commands for both courses, but whereas for 270 it will suffice to learn only their simplest, most basic uses, in this class we’ll discuss each tool and command in greater detail.

2 Texts

In the course of the semester I expect you to read most of the book A Student’s Guide to Unix, by Harley Hahn. This very engaging, fun book discusses Unix philosophy and many common tools and commands. It does not cover Unix internals and programmers’ tools, so I expect you to learn about those through online documentation later in the semester. You can also learn a lot from the Net, and I may give out other reading assignments by email or in magazines.

3 Grading

As I write this (a week before classes start), I envision five homework assignments, each worth 10% of the semester grade, a midterm worth 20%, and a final exam worth 30%. This may change slightly.

Exams must be taken at the scheduled time, unless arranged in advance or prevented by a documented medical or family emergency. If you have three or more exams scheduled on the same date, or a religious holiday that conflicts with an exam or assignment due date, please notify me in writing within the first two weeks of the semester in order to receive due consideration. Exams not taken without one of the above excuses will be recorded with a grade of 0.

Homework and programming assignments will be accepted late, with a penalty of 1/3 per 24 hours or portion thereof after they’re due. An hour late is 33% off, 25 hours late is 67% off, and after 48 hours don’t bother turning it in. It’s still a good idea to do as much of it as you can, however, because I’ll assume on the exams that you’ve done the homework.

4 Ethics

A proven case of cheating or plagiarism will result in a zero for the assignment, an “F” for the course, or even dismissal from the University, depending on the severity of the case.

All work on an exam must be entirely the work of the one person whose name is at the top of the page. For homework assignments, you are permitted (and encouraged) to discuss how to solve the problem with me or with classmates, but each student must write the detailed solution separately. And yes, I can tell the difference between two students “using the same approach” and one student copying from another.

5 Schedule

This class meets every Tuesday and Thursday from 3:00 PM to 4:15 PM, except on University holidays or if I cancel class.

All dates in the following schedule are tentative, except those fixed by the University; if some topic listed here as taking one lecture in fact takes two lectures to cover adequately, or vice versa, the schedule will shift slightly.

You are expected to have read the specified chapters in the textbook before the lecture that deals with that topic; this way I can concentrate my time on answering questions and clarifying subtle or difficult points in the textbook, rather than on reading the textbook to you, which will bore both of us. Please read the textbook and documentation!

Date(s) Assignment Reading Lecture Subject 30 Aug Administrivia, accounts, & passwords 1 Sep HW1 1–4 What is an operating system? What is Unix? 6 Sep Rosh Hashanah — no class

8 Sep  6–9  Basic commands and online documentation
13 Sep  10,11  The Shell

15 Sep Yom Kippur — no class 16 Sep Last day to add classes

20 Sep  12–14  Communicating with Human Beings
22 Sep  HW1 due 19  Text editors (ex, vi, emacs, sed, awk)
27–29 Sep HW2  15–18  Filters, pipes, and combining programs

30 Sep Last day to drop classes or change to P/F option 4–6 Oct 20–22 The Unix file system 11 Oct The Shell-Program Interface 13 Oct HW2 due man pages The stdio library 18 Oct Midterm exam 20 Oct HW3 man pages The dbx debugger 25–27 Oct man pages The make compilation control utility 1 Nov HW4 man pages Process control: fork, exec, wait 3 Nov man pages low-level I/O 4 Nov Last day to withdraw from classes 8–10 Nov HW3 due man pages The lex scanner preprocessor 15–17 Nov HW5 man pages The rcs version control utility 22 Nov 23–24 The Net 24 Nov Thanksgiving — no class 29 Nov HW4 due 24–25 The Net, continued 1–8 Dec man pages pot luck — L^{A}TEX? 13 Dec HW5 due Review for Final Exam 20 Dec Final Exam 3:30–5:30