|Module Title||COMPUTER ARCHITECTURE, C AND UNIX SYSTEMS PROGRAMMING|
|Co-ordinator||Mr David E Price|
|Other staff||Mr David E Price, Mr David J Smith, Dr David Barnes, Dr Frederick W Long, Mr Peter Hoskins, Dr Adrian D Shaw, Mr Richard C Shipman|
|Course delivery||Lecture||44 Hours.|
|Seminars / Tutorials||up to 2 x 1 hour sessions|
|Practical||up to 11 x 2 hours (un-timetabled, in students' own time)|
|Other||Assessed coursework - 75 hours|
|Other||Revision / background reading etc. - 55 hours|
This module aims to teach the basic features of the C programming language, and provides an introduction to the structure of the UNIX operating system and the UNIX programming interface. Many of 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 development tools.
The module considers how a program, written in a high level language, (using C as an example), is represented as low level assembly language and ultimately executed by a computer.
The latter part of the course will introduce the interface presented to Unix by functions and system calls for use from C.
The module will also consider the relevance of standards, both in C and in UNIX.
An introduction to the module.
2. Revision of "What is a computer?" - 3 Lectures
Block diagram overview; CPU, memory, I/O, Bus. Memory, Digital Logic; pigeon-hole model, address and contents, bits bytes and words. Address, data and control buses. Basic data transfer.
3. Inside the CPU - 3 Lectures
Simple examples of instructions. The fetch-execute cycle and the program counter. Registers. ALU. Control unit. Implementing a machine code in hardware.
4. A real CPU example: for instance the Motorola 68 HC11or similar - 5 Lectures
Some machine codes and mnemonics. Addressing modes. Assembly code.
5. Introduction to executing high-level software - 2 Lectures
Machine-code equivalents of high-level constructs. Function calls. Stack frames and local variables.
6. I/O - 3 Lectures
Reading and writing data. Interrupts. Transferring large amounts of data; DMA, block I/O.
7. Case Studies of typical assembly language programs - 3 Lectures
A small group of typical assembly language programs will be presented and discussed as examples of good practice.
8. Exercises - 5 Practicals
Use a CPU simulator to watch instruction execution. Assembly language comprehension (probably, but not necessarily, by writing a program).
9. Basic Concepts of C - 2 Lectures
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.
10. Control Structures - 2 Lectures
Sequence, branching and iteration in C compared with that of Java.
11. Basic Data Structures - 1 Lecture
Review of basic data types and operators in C.
12. Functions - 1 Lecture
Discussion of ways in which functions are implemented, and used in C, including parameter passing mechanisms.
13. Composite Data Structures - 1 Lecture
A first discussion of Arrays in C. Input/Output.
14. Software Support Tools - 1 Lecture
Make, Lint, Debuggers. Libraries and library utilities. Static/Dynamic analysers.
15. C Programming Style and Portability - 1 Lecture
Language standards. Portability. Programming standards.
16. Arrays, Pointers and Functions - 2 Lectures
A discussion of pointer data types, how they relate to arrays, and how they contrast with Java objects.
17. 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.
18. Pitfalls - 1 Lecture
Major problem areas. Design rationale of C and of Java in problem areas.
19. Further Features - 1 Lecture
C preprocessor, header files, conditional inclusion, macro substitution, bitwise operators, casts, enumeration, scope, static and external declarations, separate compilation.
20. Case Studies of typical ANSI C programs - 4 Lectures
A small group of typical ANSI C programs will be presented and discussed as examples of good practice.
21. Exercises - 4 Practicals
Formative practicals covering the main features of the C language.
22. Representation of a typical C program in assembly language - 2 Lectures
Extending the material introduced earlier in the module to examine how a typical small C program is represented in assembly language after it has been compiled.
23. Exercises - 1 Practical
Formative practical covering the representation of a simple C program in assembly language.
24. 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.
25. The Filesystem and Files - 1 Lectures
The function and system calls available from C to interact with files and filesystems.
26. Exercises - 1 Practical
Formative practical covering the use of C functions and system calls to interact with the facilities of the UNIX operating system.
27 Summary and Conclusion - 1 lecture
Drawing together the topics covered in the module.
|Problem solving||This is inherent in both the formative practical work and the assessed coursework.|
|Research skills||The students will need to search for and use relevant technical information while completing practical and assessed coursework.|
|Communication||Written skills will be needed to complete supporting documents to accompany assessed coursework.|
|Improving own Learning and Performance||See 2 above|
|Information Technology||The whole module concerns this area.|
|Application of Number||No.|
|Personal Development and Career planning||Carefully time management will be needed as so to enable them to complete coursework etc.|
|Subject Specific Skills||They will develop a detailed knowledge of the internal functioning of a computer system and how programs gain access to the facilities of an operating system.|
This module is at CQFW Level 5