The University of Western Australia
CITS2002 Systems Programming

Department of Computer Science and Software Engineering

CITS2002 Systems Programming

Unit schedule

The materials presented here do not define the whole unit. Reviewing lecture material comprises about of the effort required for this unit. The remainder of your time should be spent reading the recommended reading, participating in workshops, and undertaking the laboratory tasks and projects.

Please note the order and topics of lectures will almost certainly change throughout the semester. Please refer to this webpage, rather than a printed copy, for up-to-date information.

Week Lectures (each Monday and Tuesday) and Workshops (Fridays) Laboratories and Projects
Week 1
Mon 26th July
Lecture-1 (single page)
Administrivia; The C programming language; Why C?; A brief history of C; Standardization.
Lecture-2 (single page)
The structure of a C program; Basic datatypes; Variables, naming, and scope.
Flow-control in C programs; Conditional tests, Boolean values, and conditional execution; Bounded and unbounded loops, and their equivalence.

Workshop-1 - getting started with practical work (recorded, but no slides).

No labtimes this week.

Linux and C compiler basics

Installing Linux on your
laptop or desktop computer

Frequently used Linux commands

Week 2
Mon 2nd Aug
Lecture-3 (single page)
An introduction to operating systems; A brief history of operating systems; The contemporary role of operating systems.
Lecture-4 (single page)
Functions in C; Passing parameters to functions; Returning values from functions; the static keyword; Functions receiving a variable number of parameters.

Workshop-2 - reviewing Conditions, Loops, and Standard Library Functions
and the heavily commented solution we developed.

and some sample solutions.
Week 3
Mon 9th Aug
Lecture-5 (single page)
An overview of computer hardware components; The processor and its registers; The memory hierarchy; Code execution.
Lecture-6 (single page)
Aggregate data structures in C - arrays and strings; Initializing arrays and strings; Formatting results into character arrays; Defining and accessing structures; Better representations of our data - enumerated types.

Workshop-3 - reviewing functions and parameter passing
and the heavily commented solution we developed.

and some sample solutions.
Week 4
Mon 16th Aug
Lecture-7 (single page)
Operating system processes; The state of an operating system process; Timer interrupts; The scheduling of processes; Process suspension and swapping.
Lecture-8 (single page)
File input and output (I/O); Reading and writing text files; Reading and writing binary data.

Workshop-4 - evaluating arithmetic expressions using a stack-based machine
and the basic solution and one supporting variables we developed.

and some sample solutions.
Week 5
Mon 23rd Aug
Lecture-9 (single page)
Creating new processes; Parent and child processes; Waiting for process termination; Overlaying a new process image; The importance of the exit status.
Lecture-10 (single page)
Operating system services; The interface between operating systems and programming languages.

Workshop-5 - Project 1 discussion; come prepared with your questions.

1st programming project


Due 11:59pm,
Fri 17th Sept (wk 7)
Week 6
Mon 30st Aug
Lecture-11 (single page)
An introduction to memory management; Allocating physical memory to processes; Fixed and dynamic partitioning schemes; Simple memory paging.
Lecture-12 (single page)
The principle of referential locality; Memory paging in more detail; Virtual memory.

Workshop-6 - creating and managing processes using system-calls
and the files developed and discussed:
goodchessmove.c, manychessmoves.c, and

Non-teaching week
Mon 6th Sept
Non-teaching week (no lectures or scheduled laboratories)


Week 7
Mon 13th Sept
Lecture-13 (single page)
Addresses and pointers in C; The relationship between pointers and arrays; Pointer arithmetic; Passing pointers to functions.
Lecture-14 (single page)
Dynamic memory allocation; Allocating memory for arrays and strings; Reallocating and deallocating memory; Pointers to structures; Sorting an array of values.

Friday - no workshop this week

Week 8
Mon 20th Sept
Lecture-15 (single page)
File-system basics; The file management system; Directory structures; File allocation methods.
Lecture-16 (single page)
System-calls and system-defined structures; Accessing structures using pointers; Defining our own datatypes; Finding the attributes of a file; Reading the contents of a directory; Bitwise operators in C11; File and Directory Permissions.

Workshop-7 - building a hashtable data structure
and the solution we developed.

and some sample solutions.
Week 9
Mon 27th Sept
Monday 27th September - public and UWA holiday, no lecture or laboratory sessions
Lecture-17 (single page)
Developing C programs in multiple files; Linking; Simplifying program development with make; Supporting command-line options with getopt.

Workshop-8 - building a system-utility similar to ls
and the solutions we developed.

and some sample solutions.
Week 10
Mon 4th Oct
Lecture-18 (single page)
Multi-threaded programming; Thread support in standard-C; Benefits of threads; Threads versus processes; Thread creation, execution, and termination;
Lecture-19 (single page)
Waiting for threads; Synchronization using mutexes; Condition variables; When are threads faster, and when slower?

Workshop-9 - Project 2 discussion; come prepared with your questions.

2nd programming project


Due 11:59pm,
Fri 22nd Oct (wk 12)
Week 11
Mon 11th Oct
Lecture-20 (single page)
Operating system support for users and groups; Properties of the Unix superuser; Changing and setting user information.
Lecture-21 (single page)
Portable systems programs; Using the preprocessor to isolate system-specific code; Preprocessor tokens for C language standards and operating system platforms; System-specific integer datatypes; Unicode support in C11.

Friday - no workshop this week

Week 12
Mon 18th Oct
Lecture-22 (single page)
A simplified comparison of the C and C++ programming languages; Header files, declarations, and definitions; Standard I/O streams and file streams; Parameter passing by reference; Structures .vs. classes; Constructors, destructors; Differences in dynamic memory allocation; Function overloading and templates. Mixing C and C++ in the same program;

Lecture-23 - (recorded, but no slides).
Discussion on questions from last year's final examination.

Friday - no workshop this week

Department of Computer Science and Software Engineering

This Page

Written by:
[email protected] and [email protected]