Module Identifier | CS23420 | ||||||||||||||
Module Title | COMPUTER ARCHITECTURE, C AND UNIX SYSTEMS PROGRAMMING | ||||||||||||||
Academic Year | 2005/2006 | ||||||||||||||
Co-ordinator | Mr David E Price | ||||||||||||||
Semester | Semester 1 | ||||||||||||||
Other staff | Dr Adrian D Shaw, Mr David E Price, Dr David Barnes, Mr Peter Hoskins, Mr Richard C Shipman | ||||||||||||||
Pre-Requisite | CS10110 or equivalent prior knowledge | ||||||||||||||
Co-Requisite | CS21120 | ||||||||||||||
Mutually Exclusive | CS23710, CI33710, CS15410, CI25410 | ||||||||||||||
Course delivery | Lecture | ||||||||||||||
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 | ||||||||||||||
Assessment |
| ||||||||||||||
Further details | http://www.aber.ac.uk/compsci/ModuleInfo/CS23420 |
This module aims to teach the basic features of the C programming language, 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 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.
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 - 4 LecturesSome 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. Exercises - 3 Practicals
Use a CPU simulator to watch instruction execution. Assembly language comprehension (probably, but not necessarily, by writing a program).
8. 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.
9. Control Structures - 2 Lectures
Sequence, branching and iteration in C compared with that of Java.
10. Basic Data Structures - 1 Lecture
Review of basic data types and operators in C.
11. Functions - 1 Lecture
Discussion of ways in which functions are implemented, and used in C, including parameter passing mechanisms.
12. Composite Data Structures - 1 Lecture
A first discussion of Arrays in C. Input/Output.
13. Software Support Tools - 1 Lecture
Make, Lint, Debuggers. Libraries and library utilities. Static/Dynamic analysers.
14. C Programming Style and Portability - 1 Lecture
Language standards. Portability. Programming standards.
15. Arrays, Pointers and Functions - 2 Lectures
A discussion of pointer data types, how they relate to arrays, and how they contrast with Java objects.
16. 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.
17. Pitfalls - 1 Lecture
Major problem areas. Design rationale of C and of Java in problem areas.
18. Further Features - 1 Lecture
C preprocessor, header files, conditional inclusion, macro substitution, bitwise operators, casts, enumeration, scope, static and external declarations, separate compilation.
19. Exercises - 4 Practicals
Formative practicals covering the main features of the C language.
20. 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.
21. Exercises - 1 Practical
Formative practical covering the representation of a simple C program in assembly language.
22. 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.
23. The Filesystem and Files - 3 Lectures
The structure of the filesystem and associated operations. The types of file and the operations on files. The function and system calls available from C to interact with files and filesystems.
24. Process Management - 3 Lectures
The manipulation of processes and interprocess communication. The function and system calls available from C to interact with processes and communication between them within a single computer.
25. Communications Support - 3 Lectures
The support for communication between processes separated by network connections. The function and system calls available from C to enable inter process communication across networks.
26. Exercises - 3 Practicals
Formative practicals covering the use of C functions and system calls to interact with the facilities of the UNIX operating system.
27 Summary and Conclusions - 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 | ||
Team work | No. | ||
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