Computer Science, Prifysgol Cymru Aberystwyth University of Wales
CSM3710 (1995-96 session)
C and UNIX Systems Programming
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 interface to the programmer.
The
facilities of C will be introduced by comparison with those of
Ada, 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.
Aims, Objectives, Syllabus, Booklist
Further Details
- Number of lectures
- 24
- Number of seminars/tutorials
- 4
- Number of practicals
- 0
- Coordinator
- Dr. Edel Sherratt
- Other staff involved
- Not yet known
- Pre-requisites
-
CSM2210
- Co-requisites
-
CSM0430
- Incompatibilities
- None
- Assessment
- Assessed coursework - 100%
- Timing
- This module is offered only in Semester 2
Aims
The aim of this course is to teach the student the
fundamentals of the C language. In order to compare the
facilities and underlying philosophy of C with that of Ada, the
first part of the course will draw closely on the material that
is covered in
CSM0430
.
The UNIX operating system
is studied as an example of the operating systems material
covered in
CSM2210
and also as an application of the C
language.
-
The first part of the course will cover the C language,
paying special attention to the differences in facilities and
philosophy from those of Ada.
-
The second part of the course looks at the UNIX operating
system as an example of an operating system programming
interface and also at the binding that the UNIX operating
system presents to the C programmer.
Objectives
The detailed objectives of this module are:
-
To provide students with enough facility in C programming
that they are able to read, write and debug C programs.
-
To examine the philosophy behind the creation of the C
language.
-
To examine the similarities and differences between C and
Ada.
-
To examine the structure of the UNIX operating
system.
-
To examine the philosophy behind the creation of
UNIX.
-
To examine the programming interface to UNIX from
C.
-
To give the student practice in understanding operating
system facilities.
-
To underline the importance of standards.
Syllabus
-
Basic Concepts - 1 Lecture
-
History of the C language, philosophical
differences between C language design and Ada. Basic form of a C
program compared with that of an Ada program. Using the
compiler.
-
Control Structures - 2 Lectures
-
Sequence, branching and iteration in C compared with that
of Ada.
-
Basic Data Structures - 1 Lecture
-
Review of basic data types and operators in
C.
-
Subprograms - 1 Lecture
-
Discussion of ways in which functions are
implemented, and used in C, including parameter passing
mechanisms.
-
Composite Data
Structures - 1 Lecture
-
A first discussion of Arrays in C.
Input/Output.
-
Software Support
Tools - 1 Lecture
-
Make, Lint, Debuggers (UPS). Libraries and
library utilities.
-
C Programming Style and
Portability - 1 Lecture
-
Language standards. Portability. Programming
standards.
-
Arrays, Pointers and
Functions - 2 Lectures
-
A discussion of pointer data types, how they relate to
arrays, and how they contrast with the Ada access type.
-
Dynamic Data Structures - 2 Lectures
-
Implementation of various record structures and dynamic
structures. Pointers. Malloc. Examples in C. Parallels will be
drawn with similar constructs in Ada.
-
Pitfalls - 1 Lecture
-
Major problem areas. Design rationale of C
and of Ada in problem areas.
-
Further
Features - 1 Lecture
-
C preprocessor, header files, conditional
inclusion, macro substitution, bitwise operators, casts,
enumeration, scope, static and external declarations, separate
compilation
-
The Structure of UNIX - 2 Lectures
-
An overview of the structure of the UNIX operating system
and a description of the major components, including: the
kernel, device drivers, the filesystem, the process, the
terminal. An introduction to the programming interface to Unix.
-
The Filesystem and Files - 2 Lectures
-
The structure of the filesystem and associated operations.
The types of file and the operations on files.
-
The
Process and Interprocess Communication - 2 Lectures
-
The concept of the process and associated operations.
-
The Terminal - 1 Lecture
-
A study of the general interface.
-
Network Programming - 1 Lecture
-
A study of network programming using remote
procedure calls and the Transport Level Interface.
-
Standards - 1 Lecture
-
ANSI 'C'; IEEE POSIX; UNIX International
SVID; XOPEN XPG; COSE
-
Window systems and Event-Driven
Programming - 1 Lecture
-
An appreciation of some of the problems
involved in the programming of applications which interact with
the X window system. Includes studying event-driven programming
techniques.
Booklist
Students are likely to need ready access to the following
-
L. Ameraal.
C for Programmers.
Wiley, 1991.
-
A. Kelley and I. Pohl.
A Book on C: programming in C.
Benjamin Cummings, 3rd edition, 1995.
-
C. Brown.
UNIX Distributed Programming.
Addison Wesley, 1994.
- Notes
- Access to either Ameraal or Kelley and Pohl will
normally be sufficient.
The following should be consulted for different approaches or for further information
-
B.W. Kernighan and D. Ritchie.
The C Programming Language - 2nd Edition.
Prentice Hall, 1988.
-
J. Cox and B. Goodheart.
The Magic garden.
Prentice Hall, 1994.
-
Andrew Koenig.
C - Traps and Pitfalls.
Addison Wesley, 1988.
-
L.W. Cannon et.al.
Indian Hill C Style and Coding Standards.
Technical report, University of Toronto, 1990.
This highly recommended document is available in the home directory
of user cmk as misc/c/docs/ihstyle.ps.
Version 1.2
Syllabus
John Hunt Departmental Advisor
jjh@aber.ac.uk
Dept of Computer Science, UW Aberystwyth (disclaimer)