CSC 2560
Systems Programming
A required course in the CS or CIS major in the Fitchburg State BS program
Spring 2016 -- 3 credit hours

CSC2560-012:00PM-3:15PMTue, Thu: Jan 21-May 12 Edgerley 106

Contact Information

Instructor:Stephen Taylor
Office: Edgerly 312A
Office hours: W: 11:00-12:15; 2:00-3:30, (and by appointment)
Web page:
Office phone: 978-665-3704
Home phone: 508-867-9288

Course Description: (From the catalog) This course provides the student with the fundamentals of structured programming at the systems level. UNIX is used as a base for this course. Students obtain a thorough knowledge of the C language, comfort in using the UNIX operating system and an appreciation for a systems approach to low-level programming tasks.

We assume you already know how to program from previous courses; in this course you will learn some new concepts, and yet another language. C is still an important language in the marketplace, but in addition it is used as the foundation for python, java, and many of the other languages you have yet to learn.

As part of that foundation, C requires you to explicitly manage memory allocation and deallocation, and for that management requires you to use, and gives you the opportunity to misuse, pointers.

Occasionally we'll discuss how the C ideas relate to the similar but safer ideas in Python and Java. The basic scheme for programming in all three languages is the same, but the tools that the languages provide are different.

The course is named Systems Programming because traditionally big tools like compilers, shells, and operating systems have been written in C. Part of the reason for that choice is that, in return for extra effort, C gives you greater control how resources like memory and I/O devices are used. Part of the reason is that while Java and Python promise you freedom to switch between machines -- for example, you can develop Android apps on the PC and then run them on your phone -- each C compiler builds code for a specific machine, and this often gives C programs a speed advantage. Part of the reason is just an accident of history; large new systems today may be written in any language. But C still has a place when you want firmer control over what your program is doing. For example, most embedded systems are still programmed in C.

Course goals

Course Goals:
  1. Introduction to linux, the Dos box, Windows
  2. C syntax. functions, main(), struct, union
  3. pointers
  4. reference parameters
  5. strings in C
  6. Manual memory management with malloc() and free()
  7. linked lists
  8. trees
  9. system calls.
  10. some small systems:

Course Objectives

Upon successful completion of this course, a student will have demonstrated knowledge of:

Attendance policy

There are two class meetings each week. I expect you to attend them all. Please talk to me if this creates a schedule conflict for you.

This is partly a lab course. You can't do the labs if you aren't in the lab. I don't take attendence, but my grading reflects my expectation of seeing you regularly:

Quizzes and exams are ordinarily due in the period in which they are given, and may not be turned in later, although they may be excused if you have a convincing story, such as your grandmother getting married in Provincetown.

Labs are due on the day on which they are assigned, but not necessarily in class. Anything turned in by midnight is on time, and unless I am actually in my office at midnight, anything I find in the Blackboard dropbox on the following morning is assumed to have been turned in on time.

Papers and programming assignments are similarly due by midnight. Late papers and programs may be accepted after their due date, but I am likely to mark them down for lateness.

Course resources

The textbooks for this course are all available online. The Downey C book is not available any other way, although he has a book Think C++ which you probably shouldn't buy for this course. Editions of the Morin book are also available on paper.

The texts are:

Allan Downey, Thomas Scheffler, Think C: How to think like a Computer Scientist

This is an introduction to C for non-programmers, so you should be able to skim it. Don't go too fast, though. For the first few weeks of the class, I'll assign a chapter of the book per lecture, plus programming exercises to turn in; my plan is that the programs should take you less than two hours altogether, but that isn't likely to be true if you haven't glanced over the material in the chapter. Of course, I'll also cover some of the content in lecture, but not necessarily all the pieces you'll need.

I also assign a couple of chapters from

the wikibook C programming It reads like it was written by a committee, each member of which hoped that the others were covering the fundamentals. But we'll use a couple of the late chapters, once we've mastered the fundamentals with Think C Neither of these is a great reference. So as the semester goes on you'll want good reference material. The following are good references, but unless you already know quite a bit of C, they're not much fun to read from start to finish (and it would take quite a long time:)

The GNU C manual
The GNU C pre-processor manual,
The C library reference guide This is probably the reference you'll want to look at most often. It is available on paper from Amazon. Although it is updated frequently, major changes are rare, and if you do buy it on paper, an older version, like 2001, would be fine. is the documentation for the linux system calls, but the unix system calls are almost the same, and the C library for Windows provides versions of these functions when possible (which isn't always.)

This is the operating-system dependent part of C, the source of many glitches which prevent programs from running freely on every system.

Another text, for linked lists and trees (and quite a bit more that we won't cover) is Pat Morin, Open Data Structures The book has an on-line website at and is also available in paperback from Amazon. We're only going to use a couple of chapters this term.

I like the idea of

Andy Oram and Adam Hyde, editors: Introduction to the command line

but I only plan to assign a few pages of this book. I hope you'll be tempted to browse through more of it though, because it really does give you good suggestions.

Operating System

I run Ubuntu linux on my laptop, because I'm not very enthusiastic about the options for software development on MS Windows. There are C compilers for Windows and DOS, though. See below.

One component of the course is my intention to make you familiar with unix-style operating systems and software development on the command line. Towards the end of the course we will write systems software to run on unix-like systems. Such systems include:

C Compiler Software


For Windows:


Microsoft Visual Studio system continues to support C, although it no longer appears in any of the menus and is hard to find in the documentation. You should be able to download a copy of Visual Studio through Fitchburg State arrangement with the Microsoft DreamSpark program

Included with Visual Studio is the non-mouse version of the software, which runs in a DOS box (with appropriate paths and environmental variables set.) The Visual Studio installation includes an entry for Command Line Utiliies which is a DOS box properly setup to run the C compiler, which is named vc.exe.

mingw includes gcc, the GNU C compiler, and gdb, the GNU debugger, excellent tools for this course.

DJGPP is named after its C++ compiler, which is called GPP for GNU - PLUS - PLUS. The DJ is after the initials of the package originator, DJ DeLorie. It includes a version of gcc and gdb. Both mingw and DJGPP compilers are available on the Fitchburg State computer science image.


(for Linux)

Almost every linux installation either includes a C compiler, usually gcc, or has a site from which you can download one. For example, the slax distro, which I plugged above as being designed to run from a USB thumbdrive, includes gcc, but you have to download gdb if you want it.


From time to time I will put programs from lectures on the web.

I usually record grades in blackboard.

Reading and Lab Project Schedule:

Final Exam

There is a final exam, and two or three mid-term exams, all of which are in very similar formats, although of course they cover different material.


  1. Introduction to linux, the Dos box, Windows
  2. C syntax. functions, main(), struct, union
  3. pointers
  4. reference parameters
  5. strings in C
  6. Manual memory management with malloc() and free()
  7. linked lists
  8. trees
  9. system calls.
  10. some small systems:


Tentative grade rubric:

  1. There will be several pop quizes, making up in total 10% of the final grade.
  2. There will be several programming projects, making up 50% of the final grade.
  3. There will be a final exam and two midterms, which will make up 30% of the final grade
  4. The remaining 10% of the grade will be based on class participation and other utterly subjective measures.

Late work

Deadlines are made to be bent, but exceptions create extra work for me. Assignments are due at the beginning of class. Work received after 12:35 PM is late. I may give credit or partial credit for late work, but you should talk to me as soon as you know it will be late. I will always give at least partial credit for partial work, so turning in something incomplete but on time is a sensible strategy.

I do not consider homework which is emailed to me to be turned in on time, no matter when you sent it. Instead use the Blackboard dropbox.

There are no makeup or early exams, but I may excuse an exam for a good story, presented in advance, like your grandmother getting married that day in Provincetown.

Each student is responsible for completing all course requirements and for keeping up with all activities of the course (whether a student is present or not).

Academic Honesty

I expect you to be so interested in your projects and homeworks that you discuss them with everyone, including your mom, your little brother, and other members of the class (who will at least know what they're being sympathetic about.) So I won't be too surprised if several people come up with the same idea, or even the same programming trick. But I want you to do each homework yourself, and I don't want you to share typing, even if you both worked on the problem together, and you can't really tell anymore who came up with what. (Except of course for group projects, for which the group will be designated in advance.) To keep from confusing me, you should mention everyone you talked to and every web site you looked at in your development diary. You can only skip mentioning your little brother, if you think he wasn't any help at all...

I consider it plagiarism to share typing or fail to give credit to other peoples' ideas.

Fitchburg State College has an Academic Integrity policy, which can be found in the college catalog. Penalties for academic dishonesty, including submitting work which is not your own, and assisting other students on examinations, can be severe.


If you require course adaptations or accommodation because of a disability or acute medical condition or if you require assistance in the event of an emergency evacuation of the classroom, please see the instructor as soon as possible. Students with disabilities are encouraged to register with the Office of Disability Services on the 3rd floor of the Hammond Building.