| Module Identifier |
CI33710 |
| Module Title |
C AND UNIX SYSTEMS PROGRAMMING |
| Academic Year |
2005/2006 |
| Co-ordinator |
Mr David E Price |
| Semester |
Semester 1 |
| Other staff |
Mr David E Price, Dr Frederick W Long, Mr Peter Hoskins, Mr Richard C Shipman |
| Pre-Requisite |
CI21120 |
| Co-Requisite |
CI33010 |
| Mutually Exclusive |
CS23710 |
| Course delivery |
Lecture | 22 lectures |
| |
Seminars / Tutorials | up to 2 x 1 hour sessions |
| |
Practical | up to 15 x 2 hours |
| Assessment |
| Assessment Type | Assessment Length/Details | Proportion |
| Semester Assessment | 4 pieces of coursework | 100% |
| Supplementary Exam | will take the same form, under the Departments' policy | |
|
Learning outcomes
On completion of this module a student should:
-
have consolidated and extended their knowledge of programming languages;
-
be able utilize the new skills acquired to analyse and solve problems using the C language;
-
should be able to exercise significant judgment in being able to evaluate whether C or Java would be the most appropriate language to use for a range of situations;
-
be able to use specialized skills, namely in the use of operating system facilities;
-
will have reviewed the importance of standards by means of studying the specifications of ANSI standard C and the POSIX operating systems interface.
Brief description
The main objectives of this course are to teach the basic features of the C programming language, the structure of the UNIX operating system and the UNIX programming interface. The facilities of C will be introduced by comparison with those of Java, the emphasis being on the rationale behind the language design decisions for the two programming languages. Emphasis will also be placed on C programming incorporating good modular design, readability, portability, and use of appropriate tools.
The second part of the course will address the structure of the UNIX operating system and the interface presented by functions and system calls for use from C.
The module will also consider the relevance of standards, both in C and in UNIX.
Content
1. Basic Concepts - 1 Lecture
History of the C language, philosophical differences between C language design and Java. ANSI C. Basic form of a C program
compared with that of a Java program. Using the compiler.
2. Control Structures - 2 Lectures
Sequence, branching and iteration in C compared with that of Java.
3. Basic Data Structures - 1 Lecture
Review of basic data types and operators in C.
4. Functions - 1 Lecture
Discussion of ways in which functions are implemented, and used in C, including parameter passing mechanisms.
5. Composite Data Structures - 1 Lecture
A first discussion of Arrays in C. Input/Output.
6. Software Support Tools - 1 Lecture
Make, Lint, Debuggers. Libraries and library utilities. Static/Dynamic analysers.
7. C Programming Style and Portability - 1 Lecture
Language standards. Portability. Programming standards.
8. Arrays, Pointers and Functions - 2 Lectures
A discussion of pointer data types, how they relate to arrays, and how they contrast with Java objects.
9. Dynamic Data Structures - 2 Lectures
Implementation of various record structures and dynamic structures. Pointers. Malloc. Examples in C. Parallels will be drawn with how the internals of Java do this for you.
10. Pitfalls - 1 Lecture
Major problem areas. Design rationale of C and of Java in problem areas.
11. Further Features - 1 Lecture
C preprocessor, header files, conditional inclusion, macro substitution, bitwise operators, casts, enumeration, scope, static and external declarations, separate compilation.
12. The Structure of UNIX - 1 Lecture
An overview of the structure of the UNIX operating system and a description of the major components, including: the kernel, device drivers, IEEE POSIX and the terminal. An introduction to the programming interface to UNIX.
13. The Filesystem and Files - 2 Lectures
The structure of the filesystem and associated operations. The types of file and the operations on files.
14. Process Management - 2 Lectures
The manipulation of processes and interprocess communication.
15. Communications Support - 3 Lectures
The support for communication between processes separated by network connections.
Reading Lists
Books
** Recommended Text
A. Kelley and I. Pohl (1998) A Book on C: programming in C
4th. Addison Wesley Longman ISBN 0201183994
K. Haviland, D. Gray and B. Salama (1998) UNIX Systems Programming
2nd Ed.. Addison-Wesley ISBN 0201877589
Prinz, Peter. (2003.) C :pocket reference /Peter Prinz and Ulla Kirch-Prinz ; translated by Tony Crawford.
0596004362
** Consult For Futher Information
C. Brown (1994) UNIX Distributed Programming
Addison Wesley
B.W. Kernighan and D. Ritchie (1988) The C Programming Language
2nd. Prentice Hall 0131103628
Kernighan, Brian W. (1999.) The practice of programming /Brian W. Kernighan, Rob Pike.
020161586X
Andrew Koenig (1988) C - Traps and Pitfalls
Addison Wesley 0201179288
L. Ammeraal (1991) C for Programmers
Wiley 0471928518
Technical Reports
** Supplementary Text
L.W. Cannon et.al. (1990) Indian Hill C Style and Coding Standards
University of Toronto
Notes
This module is at CQFW Level 6