\documentstyle[12pt]{article}
% \pagestyle{empty}

%set dimensions of columns, gap between columns, and space between paragraphs
\setlength{\textheight}{8.75in}
\setlength{\columnsep}{2.0pc}
\setlength{\textwidth}{6.8in}
\setlength{\footheight}{0.0in}
\setlength{\topmargin}{0.0in}
\setlength{\headheight}{0.0in}
\setlength{\headsep}{0.0in}
\setlength{\oddsidemargin}{-.19in}
\setlength{\evensidemargin}{-.19in}
\setlength{\parindent}{1pc}

% \setlength{\textwidth}{480pt}
% \setlength{\oddsidemargin}{-15pt}
% \setlength{\evensidemargin}{-15pt}
% \setlength{\topmargin}{0pt}
% \setlength{\textheight}{640pt}
% \setlength{\footskip}{15pt}
% \setlength{\footheight}{15pt}

% \newenvironment{proof}%
% {\relax{\noindent\sc Proof.\ \ }}%
% {\ifhmode\nobreak\qed\par\fi\medskip}

% \newcommand{\forprelim}[1]{#1}
% \newcommand{\forfinal}[1]{\mbox{}}

\begin{document}

\title{\vskip-60pt Computer Science 271 \\
Software I: Utilities and Internals}

\author{Dr. Stephen Bloch \\
office 112 Alumn\ae\ Hall \\
phone 877-4483 \\
email {\tt sbloch@panther.adelphi.edu} \\
office hours 11--12 TTh, 1--4 W, or by appointment}

\maketitle

\section{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.

\pagebreak[3]
\section{Texts}
In the course of the semester I expect you to read most of the book
{\em 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.

\section{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.

% These numeric grades will be converted to letter grades as follows:
% I'll draw a curve showing the distribution of numeric grades, and look
% for naturally-occurring ``clumps''.  For each clump, especially the
% top and bottom ones, I'll examine some exam and
% homework papers to decide what letter grade seems appropriate.  This
% method corrects for excessively hard or excessively easy assignments
% while not penalizing anybody for having genius classmates.

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.
% (and I'd
% prefer it if you let me know earlier --- you should know within the
% first week of class when all your exams are).
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.

\section{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.
 
\section{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.

% \subsection{Floating Events}
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 {\em vice versa},
the schedule will shift slightly.

% In no case will an assignment be due earlier than indicated in the
% following schedule, but some may be due later; this will be announced
% in class a reasonable time in advance.  I'll try to keep an updated
% version of this schedule available online.  

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.  {\bf Please read the textbook and
documentation!}

\medskip

\begin{tabbing}
{\bf Date(s) \hskip20pt} \=
{\bf Assignment} \=
{\bf Reading \hskip10pt} \=
{\bf Subject} \kill
{\bf Date(s)} \>
{\hskip-20pt \bf Assignment} \>
{\bf Reading} \>
{\hskip40pt \bf 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 ({\tt 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 \> {\tt man} pages \> The {\tt stdio} library \\
18 Oct \> \> \> Midterm exam \\
20 Oct \> HW3 \> {\tt man} pages \> The {\tt dbx} debugger \\
25--27 Oct \> \> {\tt man} pages \> The {\tt make} compilation control
utility \\
1 Nov \> HW4 \> {\tt man} pages \> Process control: {\tt fork, exec, wait} \\
3 Nov \> \> {\tt man} pages \> low-level I/O \\
4 Nov \> \> \> Last day to withdraw from classes \\
8--10 Nov \> HW3 due \> {\tt man} pages \> The {\tt lex} scanner preprocessor \\
15--17 Nov \> HW5 \> {\tt man} pages \> The {\tt 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 \> \> {\tt man} pages \> pot luck --- \LaTeX ? \\
13 Dec \> HW5 due \> \> Review for Final Exam \\
20 Dec \> \> \> Final Exam 3:30--5:30
\end{tabbing}

\end{document}
			Homework assignments
HW1: try things and show that you can do stuff
HW2: write a shell script using filters, I/O redirection, etc.
HW3: write a program using I/O & command-line arguments (say, "tr")
HW4: write a shell with built-in commands and searched-for commands.
HW5: extend that shell with pipes, detached processes, access to
environment variables.  Extra credit: suggest and implement other nifty
features. 


		Things I want to cover eventually:
make
lex?
level 2 I/O
level 1 I/O
fork, exec, wait
ls
rm, cp, mv
cat, more
man, help, docs?
(yp)passwd
finger, who
mail, write, phone
trn
vi
ed, ex
shells, shell substitutions, aliases, filec, command files
chmod
compilers
sed, awk?
grep, egrep, fgrep
stdin, stdout, I/O redirection, pipes
file system
Un*x philosophy
search paths

T  30 Aug Administrivia, Un*x philosophy, file system,
	cmds ls,rm,cp,mv,cat,more,man,help,(yp)passwd,finger,mail
Th 1  Sep stdin/stdout, I/O redirection, pipes, grep et al
T  6  Sep Rosh Hashanah -- no class
Th 8  Sep vi, ed, ex
T  13 Sep Shells, command files, shell substitutions, aliases, filec, chmod
Th 15 Sep Yom Kippur -- no class
F  16 Sep Last day to add
T  20 Sep trn? (if I have a class newsgroup)
Th 22 Sep
T  27 Sep
Th 29 Sep
F  30 Sep Last day to drop or change to P/F
T  4  Oct
Th 6  Oct
T  11 Oct
Th 13 Oct
T  18 Oct
Th 20 Oct
T  25 Oct Midterm exam?
Th 27 Oct
T  1  Nov
Th 3  Nov
F  4  Nov Last day to withdraw
T  8  Nov
Th 10 Nov
T  15 Nov
Th 17 Nov
T  22 Nov
Th 24 Nov Thanksgiving -- no class
T  29 Nov
Th 1  Dec
T  6  Dec
Th 8  Dec
T  13 Dec Thursday make-up classes
W  14 Dec--T 20 Dec final exams

