ECE322 T (Systems Programming) Autumn 2022
Tues, Thurs at 5:05 pm in Cox Science 42

The Book

Examinations:

Assignments

Submit by email to grader322 at rabbit.eng.miami.edu with subject line = your name + which assignment,
code, comments, and basic demonstration of it working, in one happily readable document.

     1   Due Sat 10 Sept.
     Interact with a linked list of named places.   
2 Due Mon 3 Oct.
A very very basic unix shell.
3 Due Sun 23 Oct. Strict deadline. No lateness at all will be accepted.
The binary file of student grades.
4 Sunday 6th Nov.
Your own implementation of the ls command.
5 Sunday 20th Nov.
A better shell, with variables, aliasses and globs.
6 Tuesday 6th Dec.
A shell script.
* Thursday 15th Dec.
Absolute latest for submitting anything.

PC log in - use Putty or your own preferred SSH app.
OR mac users: start the terminal app, windows users: start powershell, then type the command
ssh username@rabbit.eng.miami.edu and type your password when prompted.
Windows users beware: you can't use ctrl-V in pico, but page up and page down will do the job.

Class History

Class 1  ‑ Tue 23‑8‑2022   Quick introductions.
Beginning to program in C: standard includes, the nature of C-strings.
strdup(), its implementation, and how and why it is used.
Class 2  ‑ Thur 25‑8‑2022 C string functions from <string.h> and their implementations:
strlen, strcpy, strcat, strcmp, strcasecmp, strncpy, strncmp, strncat, strstr, strtok.
Class 3  ‑ Tue 30‑8‑2022 General guidance for programming in C instead of C++,
Particular details about the C input/output library stdio.h
The beginnings of a data-structure program in C - a binary tree.
Class 4  ‑ Thur 1‑9‑2022 Finalising the tree program, and examining different ways for adding.
A command line tokeniser for eventual use in a shell program.
Class 5  ‑ Tue 6‑9‑2022 Creating subprocesses and making them do useful things:
A first look at fork and getpid,
Making a program run "ls -l" for itself,
Enabling that program to inspect the results of "ls -l".
Class 6  ‑ Thur 8‑9‑2022 More about pipe and dup and so-on.
Correctly using fdopen to make Tuesday's program work usefully,
Easier: redirecting output to a file,
All about open(), <fcntl.h>, wait, WIFEXITED, etc.
Class 7  ‑ Tue 13‑9‑2022 Our weather recordings file,
Creating a compressed binary file from ordinary text data using unix functions,
Binary chop search on that binary file with unix functions,
The same but using C functions.
Class 8  ‑ Thur 15‑9‑2022 Using the debugger when things go wrong,
Separate compilation and .h and .o files,
Comparing two trees, taking advantage of processes (not finished yet).
Class 9  ‑ Tue 20‑9‑2022 Completing the tree-comparing program, it needed an fdopen,
Signals - sending and receiving.
Handling signals, and a little example.
Class 10  ‑ Thur 22‑9‑2022 Recording and using time in unix,
Reading directories and the stat function,
/etc/passwd and the password database functions,
The directory-listing program,
The /etc/passwd searching program.
Class 11  ‑ Tue 27‑9‑2022 Class conducted by zoom because of the weather.
A lot about the shell ("unix commands" as they are often incorrectly called),
Here's everything we did, in one big annoying file.
Class 12  ‑ Thur 29‑9‑2022 Hard links and symbolic links,
Automatic scripts when you log in or start a new shell process,
Get used to the useful little commands, scan the man page(s),
Some shell scripts: first, second, third, fourth;
Remember #!/bin/tcsh, and you may need to type e.g. ./first not just first as I did.
Class 13  ‑ Tue 4‑10‑2022 More useful commands for scripts.
Developing a very basic backup script one step at a time: one, two, three, four.
Class 14  ‑ Thur 6‑10‑2022 Preparing for the test.
Class 15  ‑ Tue 11‑10‑2022 The first mid-term.
Here's the first test from 2020.
Possible topics:
  • C programming in general, string functions in particular.
  • processes, fork, wait, dup, etc.
  • C i/o functions, Unix i/o functions, binary data files.
  • Files and directories, links.
Class 16  ‑ Tue 18‑10‑2022 A few more things about the shell while we were waiting for late-comers.
What we learned from the test (Question 2).
Class 17  ‑ Thur 20‑10‑2022 What we learned from the test (Question 3).
Class 18  ‑ Tue 25‑10‑2022 What we learned from the test (Question 1).
Some more shell things.
A simple backup utility, just starting it.
Class 19  ‑ Thur 27‑10‑2022 Accenture Visit today shortly after class: The details, and The poster.
Completing the backup utility,
Time functions again.
The qsort function and its friends. A closer look at the void * type.
Just beginning to look at macros.
Class 20  ‑ Tue 1‑11‑2022 More about macros and related features,
The little bit operations reminding program,
Bit packing and similar things.
Class 21  ‑ Thur 3‑11‑2022 Some general observations about the way the internet works,
Internet functions,
Starting to write our own very basic server.
Class 22  ‑ Tue 8‑11‑2022 Some words about system or C functions that return pointers,
We completed our very basic time-saying internet server,
And made a client to go with it.
Class 23  ‑ Thur 10‑11‑2022 A quick exploration of a network protocol, HTTP: the modified server, and the modified client.
Using bash.
Class 24  ‑ Tue 15‑11‑2022 Preparing for the second test.
Class 25  ‑ Thur 17‑11‑2022 Second mid-term. Topics: bit packing, internet programming, shell scripting, files and directories.
sample one, sample two, sample three.
Class 26  ‑ Tue 22‑11‑2022 Special reading assignment:
       Read about the history of Unix here, and here.
Make sure you look up any terms that you don't completely understand.
There will be a quiz.
Class 27  ‑ Tue 29‑11‑2022 The final homework.
Going over the second test,
The editing disaster - I hope you at least managed to take advantage of it!
Don't write right up to the corners.
setjmp and longjmp.
Make, first sample, second sample, and much more.
Class 28  ‑ Thur 1‑12‑2022 Continuing with make, lots of little details,
Regular expressions: an example of regcomp and regexec, and with multiple matches, egrep.
Maybe even a bit of Pthreads.
Class 29  ‑ Tue 6‑12‑2022 (Proper indentation, sensible names, functions with clear objectives, etc)
Whatever is needed to be ready for the final.
Topics:
1: Binary files,
2: C programming,
3: Processes,
5: Bit operations,
6: Internet programming,
7: Files and directories etc, in C,
9: Tcsh shell scripting.