✞ JMJ ✞

ad majorem Dei gloriam

CPS 444/544: UNIX/Linux Programming

Department of Computer Science, University of Dayton

Fall 2019

Table of Contents (TOC)

Course Description

CPS [45]44 (3 hours) prepares students for developing software in the UNIX/Linux environment using the C and Go programming languages. Topics include libraries and system calls, shells, system structures and internals, interprocess communication (pipes and signals), communicating sequential processes, network programming (client-server model and sockets), configuration and compilation management, pattern matching and filters, shell programming, automatic program generation, and GUI programming. Students can also expect a survey of various software tools supporting systems programming, including gcc, gdb, make, git, sed and awk, and lex and yacc. The course does not aim to be comprehensive, but rather focuses on thematic issues. Assignments are designed to provide students with a pragmatic exposure to these tools as well as issues faced by modern practitioners. CPS [45]44 is a programming-intensive course.

Course Details

Pre-requisite:
CPS 356 (Operating Systems).
Meeting times:
Tue Thu 2:00pm-3:15pm, Miriam Hall Room 201.
Instructor:
Dr. Perugini, e-mail id: sperugini1, tel: 229-4079, office: AN 145
OHs: M 11:00am-noon & 1:15pm-2:15pm; W 11:00am-noon & 1:15pm-2:15pm; Th 3:30pm-4:30pm (only when classes are in session); & by appointment.
Student Helper:
Kyle Mielke (e-mail id: mielkek1); Miriam Hall 16
OHs: M 5:05pm-6:05pm; T 12:30pm-2:00pm; W 5:05pm-6:05pm; Th 12:30pm-2:00pm (only when class is in session); & by appointment.

TOC

Required Textbook

    [LCP] Linux and C Programming by S. Perugini. 2019. Draft (Available as a Resource in Isidore).

TOC

Course Wordle

CPS 444/544: UNIX/Linux Programming/Fall 2019

TOC

Learning Outcomes

TOC

Course Outline

(required reading assignments, course notes, & homeworks)

TOC

Evaluation Criteria

(all figures below are approximate, and subject to change within the first few weeks of the course)
Component Quantity Points per Total points
Homeworks ~10 varies 300 (+ 38 EC)
Exams 2 varies 350
(comprehensive) Final exam and project 1 350 350
Total:1,000

Homeworks involves analytical, theoretical, and programming exercises. The programming requires a fair amount of critical thought and design, and approximately 500-1000 lines of code. To prepare students for the realities of computer science problems in industry and graduate school (and beyond) this course encourages (and rewards) self-reliance and independent, self-directed work. Handwritten assignments are not accepted. Assignments are due at 2:00pm in class. Late assignments are not accepted. No exceptions. All exams are in-class, closed-book, and closed-notes. Attendance is mandatory at all examinations; make-ups are not given. Any missed examination will result in a zero. Make no assumptions about anything; always consult the instructor first. Final letter grades of A, A-, B+, B, B-, C+, C, C-, and D start approximately at 93, 90, 87, 83, 80, 77, 73, 70, and 60 percent, respectively.

TOC

Workload

CPS [45]44 is a challenging course and moves at a very fast pace. Spending a minimum of five hours outside of class each week reading, studying, and programming is required. I advise you to see me to discuss any problems you may have before you are evaluated.

TOC

Classroom & Course Policies

Students are expected to conduct themselves with respect, integrity, and virtue. Keep phones and similar devices in a silent mode and put away during class (i.e., out of sight). The use of laptop computers and similar devices is not permitted in class. Audio or video recording of any kind in class is strictly prohibited.

TOC

Academic Integrity

To achieve the course objectives, homework assignments must be a sole result of your work, not be shared with other students, and prepared in accordance with the University Honor Pledge (see below). Moreover, you may not plagiarize code from any, cited or uncited, textbooks, online resources, or other authors. There is no team, group-work assignments in this course. Discussions among classmates must never include pending assignments. No exemptions. All questions and comments about a pending assignment must only be directed to the instructor and teaching assistants. Evidence indicating a violation of this policy will be handled according to the University Academic Honor Code and result in a doubly-weighted zero which will not be dropped (e.g., if the assignment is worth 100 points, you receive a 0/200) or a zero on the next exam. Make no assumptions about this policy; always consult the instructor first. No student should ever feel that they must resort to academic dishonesty. You are encouraged to consult the instructor if you are struggling with the course or an assignment. No grade is worth your integrity. Honesty in your academic work will develop into professional integrity. The faculty and students of the University of Dayton will not tolerate any form of academic dishonesty.

The Honor Pledge as listed in the Academic Honor Code section of the Undergraduate Catalog applies in full to CPS 444.

The Honor Pledge as listed in the Academic Honor Code section of the Graduate Catalog applies in full to CPS 544.

Honor code FAQ

TOC

Homeworks

Homework Assigned Due Total points
Homework #1 Aug 22 Aug 29 35
Homework #2 Aug 29 Sep 5 45
Homework #3 Sep 5 Sep 12 40
Homework #4 Sep 12 Sep 17 20
Homework #5 Sep 17 Oct 1 30
Homework #6 Oct 15 Oct 31 60
Homework #7 Nov 5 Nov 12 35
Homework #8 Nov 12 Nov 19 35
Homework #9 Nov 21 Dec 5 38
Total Homework Points: 300 (+ 38 EC)

TOC

Homework #1

Assigned: August 22
Due: August 29, 2:00pm

Total points: 35 points

Style guide | Academic Integrity | Evaluation Criteria

[LCP] Programming Exercise 4.31.31

There is a reference executable of a solution for this homework available at /home/perugini_cps444/share/homeworks/hw1/diff1.

How to submit

Note: All directory and filenames below are case-sensitive. You must use the directory and filenames exactly as shown below (i.e., all lower case).

Prepare your source code file as /home/<logname>/homeworks/hw1/diff1.go, where <logname> is your login name (e.g., FA_19_CPS444_03). Only your source file diff1.go will be electronically collected from this location in your Linux account on the deadline.

Failure to follow these submission requirements will result in a 10% penalty.

Evaluation

Ninety percent of your score will come from correctness and 10% of your score will come from following our programming style guide. Applicable submission penalties will then be applied.

TOC

Homework #2

Assigned: August 28
Due: September 5, 2:00pm

Total points: 45 points

Style guide | Academic Integrity | Evaluation Criteria

  1. (15 points) [LCP] Conceptual Exercise 7.4.27. (Do not change your umask as part of this exercise.)
  2. (30 points) [LCP] Programming Exercise 7.4.32. There is a reference executable of a solution for this exercise available at /home/perugini_cps444/share/homeworks/hw2/env1 or you can use the env command on the system as a reference executable.

How to submit

Note: All directory and filenames below are case-sensitive. You must use the directory and filenames exactly as shown below (i.e., all lower case).

Prepare your files as /home/<logname>/homeworks/hw2/env1.go and /home/<logname>/homeworks/hw2/envcust.pdf, where <logname> is your login name (e.g., FA_19_CPS444_03). Only your files env1.go and envcust.pdf will be electronically collected from this location in your Linux account on the deadline.

Failure to follow these submission requirements will result in a 10% penalty.

Evaluation

Ninety percent of your score will come from correctness and 10% of your score will come from following our programming style guide. Applicable submission penalties will then be applied.

TOC

Homework #3

Assigned: September 5
Due: September 12, 2:00pm

Total points: 40 points

Style guide | Academic Integrity | Evaluation Criteria

[LCP] Programming Exercise 5.4.17

There is a reference executable of a solution for this exercise available at /home/perugini_cps444/share/homeworks/hw3/logapp.

How to submit

Note: All directory and filenames below are case-sensitive. You must use the directory and filenames exactly as shown below (i.e., all lower case).

Prepare your source code file as /home/<logname>/homeworks/hw3/loggerlib.go, where <logname> is your login name (e.g., FA_19_CPS444_03). Only your source file loggerlib.go will be electronically collected from this location in your Linux account on the deadline.

Failure to follow these submission requirements will result in a 10% penalty.

Evaluation

Ninety percent of your score will come from correctness and 10% of your score will come from following our programming style guide. Applicable submission penalties will then be applied.

TOC

Homework #4

Assigned: September 12
Due: September 17, 2:00pm

Total points: 20 points

Style guide | Academic Integrity | Evaluation Criteria

[LCP] Programming Exercise 5.5.23

How to submit

Run the following commands on your Makefile to convert it to PDF.
$ enscript -o Makefile.ps Makefile
$ ps2pdf Makefile.ps
Print Makefile.pdf and submit a hardcopy of it in class at 2:00pm. Also, submit the dependency graph in class.

TOC

Homework #5

Assigned: September 17
Due: October 1, 2:00pm

Total points: 30 points

Style guide | Academic Integrity | Evaluation Criteria

[LCP] Programming Exercise 5.5.24

TOC

Homework #6

Assigned: October 15
Due: October 31, 2:00pm

Total points: 60 points

Style guide | Academic Integrity | Evaluation Criteria

[LCP] Programming Exercise 7.8.3

How to submit

Note: All directory and filenames below are case-sensitive. You must use the directory and filenames exactly as shown below (i.e., all lower case).

Include a README file in the hw6 directory answering the following questions: What keeps the server running, even after all of the client processes have terminated? Is it possible for a malicious client to bring the server down?

When you structure your project directory as shown above simply tar the hw6 directory as follows: tar cvf hw6.tar hw6/. This will make it easy both for you to submit and us to grade because your submission will already contain the source code files supplied to you.

Only the file /home/<logname>/homeworks/hw6/hw6.tar will be electronically collected from your account on the deadline.

Failure to follow these submission requirements will result in a 10% penalty.

Evaluation

Ninety percent of your score will come from the correctness of your system, and 10% of your score will come from following our programming style guide. Applicable submission penalties will then be applied.

TOC

Homework #7

Assigned: November 5
Due: November 12, 2:00pm

Total points: 35 points (+ 10 points EC)

Style guide | Academic Integrity | Evaluation Criteria

[LCP] Programming Exercise 8.6.1 (Webpage Scraping)

Extra credit: correct solutions which do not rely on the presence of the pvsurls.txt file will receive an extra 10 points.

Also, submit part a of HW2 ([LCP] Conceptual Exercise 7.4.27) with HW7 on November 12. You will submit a hardcopy of /home/<logname>/homeworks/hw2/envcust.pdf in class as well.

How to submit

Note: All directory and filenames below are case-sensitive. You must use the directory and filenames exactly as shown below (i.e., all lower case).

Prepare your source code file as /home/<logname>/homeworks/hw7/pvsfilter, where <logname> is your login name (e.g., FA_19_CPS444_03). Your source file pvsfilter will be electronically collected from this location in your Linux account on the deadline.

Failure to follow these submission requirements will result in a 10% penalty.

Evaluation

Ninety percent of your score will come from correctness and 10% of your score will come from following our programming style guide. Applicable submission penalties will then be applied.

TOC

Homework #8

Assigned: November 12
Due: November 19, 2:00pm

Total points: 35 points

Style guide | Academic Integrity | Evaluation Criteria

[LCP] Programming Project 9.8 (filecount script).

Sample test data

There is a transcript of several invocations of filecount on cpssuse07.cps.udayton.edu here.

How to submit

Note: All directory and filenames below are case-sensitive. You must use the directory and filenames exactly as shown below (i.e., all lower case).

Prepare your source code file as /home/<logname>/homeworks/hw8/filecount, where <logname> is your login name (e.g., FA_19_CPS444_03). Your source file filecount will be electronically collected from this location in your Linux account on the deadline.

Failure to follow these submission requirements will result in a 10% penalty.

Evaluation

Ninety percent of your score will come from correctness and 10% of your score will come from following our programming style guide. Applicable submission penalties will then be applied.

TOC

Homework #9

Assigned: November 21
Due: December 5, 2:00pm

Total points: 38 points

Style guide | Academic Integrity | Evaluation Criteria

[LCP] Programming Project 10.2.20 on p. 303-305 (Exercise 10.2.1).

Sample test data

You will find a codebase of C/C++ source at ~perugini_cps444/share/hw9.tar. Output from sample test runs using this codebase is here.

How to submit

Note: All directory and filenames below are case-sensitive. You must use the directory and filenames exactly as shown below (i.e., all lower case).

Prepare your lex specification file as /home/<logname>/homeworks/hw9/showheaders.l and your Makefile as /home/<logname>/homeworks/hw9/Makefile, where <logname> is your login name (e.g., FA_19_CPS444_03).

Archive only your specification file and Makefile by running the following command on system from your /home/<logname>/homeworks/hw9 directory:

Only the file /home/<logname>/homeworks/hw8/showheaders.tar will be electronically collected from this location in your Linux account on the deadline.

Failure to follow these submission requirements will result in a 10% penalty.

Evaluation

Ninety percent of your score will come from correctness and 10% of your score will come from following our programming style guide. Applicable submission penalties will then be applied.

TOC

Exams

  1. Exam I (closed book, closed notes): Oct 3

  2. Exam II (closed book, closed notes): Nov 21

  3. Final Exam (comprehensive, closed book, closed notes): Wed Dec 11, 10:10am-noon, Miriam Hall 201.

TOC

Quick Reference Sheets

TOC

Other Helpful ...

Programming style guide

Quick Reference Sheets:
  • Vim quick reference sheet
  • Linux quick reference sheet
  • C quick reference sheet
  • Advanced Linux quick reference sheet
  • Go quick reference sheet
  • Elixir quick reference sheet

  • Practice problems:
    see conceptual and programming exercises in [LCP]; (outdated, but still relevant) practice problems.

    Grades:
    available in Isidore

    Computer accounts:
    Linux account access | UDit | A beginner's guide to effective e-mail

    Helpful links:
    academic calendar (PDF) | student handbook | UDit FERPA policies

    Feedback:
    Dr. Perugini welcomes any feedback you may have on the course motif and approach, style of the lectures, the concepts presented in class, the course webpage, homeworks, deadlines, exams, course and grading policies, or your general experience in the course.

    TOC

    Last modified:
    ad majorem Dei gloriam

    ✞ JMJ ✞