COMP2001/COMP2014 Introduction to System Programming

(Summer 2012)

Class Schedule


LA C264. New!

Class Times:

Monday and Wednesday,  18:05 PM - 20:55 PM, 07-MAY - 19-JUN

Course Website:

Instructor Information





Office Hours

Hua Li

HP 5331


Tuesday 4:00 PM - 5:30 PM or by appointment

Teaching Assistants


Office Hours

Office Location


David Krutsko

Thursday 3:00-5:00


Joshua Brach Wednesday 3:30-5:30 3341HP

Course Description

This course is an introduction to programming with procedures and primitive data types, designed for B.C.S. students with C and Unix. Topics include: arrays, strings, pointers, heap and stack memory allocation and deallocation, linked list manipulations, and system/library calls.

Topics Covered

The course will cover the following topics, although some material may be omitted due to time constraints:

What is systems programming
Main tools
Introduction to Linux
Procedural program development
Fundamentals of C
Debugging techniques
Data Types and Structures
Bits, bytes, data types (bit models, bitwise operations, memory map)
Advanced data types (arrays, strings, structures)
Memory Management
Pointers (pointer arithmetic, parameter passing, pointers and arrays, pointers and structures)
Dynamic memory allocation (heap vs. function call stack, double pointers)
Linked lists (insertion, iterative traversal, recursive traversal, deletion)
Program Management
Program building (object code, compiling, linking, Makefiles)
Code organization (functions, multiple files, variable scope, preprocessing, typedefs)
Program distribution methods (archives, packages)
External Resources
I/O (streams, buffers, pipes, files, devices)
System calls (process, signal, socket)
Libraries (C standard library, making a library)


COMP 1406/1006

Course Objectives

- Learn basic programming skills with C and Unix
- Understand and apply basic programming conventions:
proper variable names
appropriate commenting
indentation using established style
Understand how to use primitive data types and structures:
bit models and representations
arrays, strings, structures
Understand basics of memory management:
primitive data types
storage class
memory allocation
static vs. dynamic memory allocation
pointers, double pointers
garbage collection
program memory organization
function call stack, contents of stack frame
data segment
code segment
Program building:
build programs across multiple header and source files
Library functions and system calls:
research and understand standard library function and system call documentation
create a new library for distribution
program with system calls:
stream and file I/O
signal handling
inter-process communications (sockets, RPC)

Textbook (s)

Main textbook (suggested):
Adam Hoover, System Programming with C and Unix, Addison-Wesley, 2010. ISBN:
0132487047 (note: this ISBN includes a free copy of Granneman, Linux Phrasebook, Sams Publishing, 2006.)
Additional resources:
Brian W. Kernighan and Dennis Ritchie, The C Programming Language, 2nd edition, Prentice Hall, 1988. ISBN: 0131103628
Scott Granneman, Linux Phrasebook, Sams Publishing, 2006.

Laboratory Software

SCS Linux network
External access


Students will be evaluated in this course according to the following measures.



Due Date

Three assignments

10%, 15%, 15%

May 17 (noon), May 30 (noon), June 14 (noon)

Two in-class tests

10%, 10%

May 23 (6:05- 7:35), June 6 (6:05 - 7:35)

Final exam


To be announced

In-class Tests
In-class tests will be 90 minutes in length and closed book.
Final Exam Note
The final exam will be closed book and will cover all the material presented during the lectures and class discussions for the entire term.
There will be three (3) assignments in this course, and they will be accessible from the course web page. Assignments must be submitted on Carleton's WebCT BEFORE the due date and time. NO LATE ASSIGNMENTS WILL BE ACCEPTED.


Course slides will be made available before the lectures, but these will only contain the outlines for the lectures. The final exams will cover all the material presented during the lectures and in the class discussions. Class attendance is strongly recommended.

SCS Computer Accounts

Any student taking an SCS course qualifies to have an SCS account. SCS accounts can be created at the following URL: SCS students can access one of the designated labs for your course. The labs are operational 7 days a week 24 hours per day, please be advised that the building will be closed overnight, Mon. - Fri. 23:00 - 8:00 and on weekends from 17:00 - 8:00. Technical support is available in room HP5161 Monday to Friday from 9:00 until 17:00. All SCS account related information is accessible at the following URL: 

Collaboration Policy

Collaborating on assignments is STRICTLY DISALLOWED. You must complete the work by yourself. If you need help, please see a TA or your instructor. Posting assignment solutions on discussion boards before the due date and time is also prohibited.

Undergraduate Academic Advisor

The Undergraduate Advisor for the School of Computer Science is available in Room 5302C HP, by telephone at 520-2600, ext. 4364 or by email at The undergraduate advisor can assist with information about prerequisites and preclusions, course substitutions/equivalencies, understanding your academic audit and the remaining requirements for graduation. The undergraduate advisor will also refer students to appropriate resources such as the Science Student Success Centre, Learning Support Services and the Writing Tutorial Services.

University Policies

Student Academic Integrity Policy

Every student should be familiar with the Carleton University student academic integrity policy. A student found in violation of academic integrity standards may be awarded penalties which range from a reprimand to receiving a grade of F in the course or even being expelled from the program or University. Some examples of offences are: plagiarism and unauthorized co-operation or collaboration. Information on this policy may be found in the Undergraduate Calendar.


As defined by Senate, "plagiarism is presenting, whether intentional or not, the ideas, expression of ideas or work of others as one's own". Such reported offences will be reviewed by the office of the Dean of Science.

Unauthorized Co-operation or Collaboration

Senate policy states that "to ensure fairness and equity in assessment of term work, students shall not co-operate or collaborate in the completion of an academic assignment, in whole or in part, when the instructor has indicated that the assignment is to be completed on an individual basis". Please refer to the course outline statement or the instructor concerning this issue.

Students with Disabilities Requiring Academic Accommodations

Register with the Paul Menton Centre for Students with Disabilities (PMC) for a formal evaluation of disability-related needs. Documented disabilities could include but are not limited to mobility/physical impairments, specific Learning Disabilities (LD), psychiatric/psychological disabilities, sensory disabilities, Attention Deficit Hyperactivity Disorder (ADHD), and chronic medical conditions. Registered PMC students are required to contact the PMC, 613-520-6608, every term to ensure that I receive your Letter of Accommodation, no later than two weeks before the first assignment is due or the first in-class test/midterm requiring accommodations. If you only require accommodations for your formally scheduled exam(s) in this course, please submit your request for accommodations to PMC by the deadlines published on the PMC website:

Religious Obligation

Write to me concerning any requests for academic accommodation during the first two weeks of class, or as soon as possible after the need for accommodation is known to exist. For more details visit the Equity Services website

Pregnancy Obligation

Write to me concerning any requests for academic accommodation during the first two weeks of class, or as soon as possible after the need for accommodation is known to exist. For more details visit the Equity Services website

Medical Certificate

The following is a link to the official medical certificate accepted by Carleton University for the deferral of final examinations or assignments in undergraduate courses. To access the form, please go to