Advanced Systems Programming M (2018-2019)
This course covers advanced topics systems programming, building on the material in Systems Programming (H) to explore new techniques for safer and more effective systems programming. It will focus on programming in an unmanaged environment, where data layout matters, and where performance is critical. This might include operating systems kernels, device drivers, low-level networking code, or other areas where the software-machine interface becomes critical.
Aims and Objectives
The computing landscape has changed radically in the last decade. The desktop personal computer has become largely irrelevant, and heterogeneous, multicore, mobile, and real-time systems – smart mobile phones, netbooks, and laptops – are now ubiquitous. Yet, despite this shift, these systems are still programmed in C, and the majority run some variant of the Unix operating system.
The course aims to explore the features of modern programming languages and operating systems that can ease the challenges of systems programming, considering type systems and run-time support. It will review the research literature on systems programming and operating system interfaces, discuss the limitations of deployed systems, and consider how systems programming might evolve to address the challenges of supporting modern computing systems. Particular emphasis will be placed on system correctness and secure programming, to ensure the resulting systems are safe to use in an adversarial environment.
By the end of the course, students should be able to:
- To discuss the advantages and disadvantages of C as a systems programming language, and to compare and contrast this with a modern systems programming language, for example Rust; to discuss the role of the type system, static analysis, and verification tools in systems programming, and show awareness of how to model system properties using the type system to avoid errors;
- To discuss the challenges of secure low-level programming and write secure code in a modern systems programming language to perform systems programming tasks such as parsing hostile network input; show awareness of security problems in programs written in C;
- To discuss the advantages and disadvantages of integrating automatic memory management with the operating system/runtime, to understand the operation of popular garbage collection algorithms and alternative techniques for memory management, and know when it might be appropriate to apply such techniques and managed run-times to real-time systems and/or operating systems;
- To understand the impact of heterogeneous multicore systems on operating systems, compare and evaluate different programming models for concurrent systems, their implementation, and their impact on operating systems; and
- To construct and/or analyse simple programming to demonstrate understanding of novel techniques for memory management and/or concurrent programming, to understand the trade-offs and implementation decisions.
Systems Programming (H), Operating Systems (H), Networked Systems (H), and Functional Programming (H), or equivalent, are pre-requisites.
The course consists of a series of lectures delivered over 10 weeks, supported by a weekly 1-hour laboratory session.
Research papers will be set of background reading for some lectures. In addition, the following books may be useful:
- Steve Klabnik and Carol Nichols, "The Rust Programming Language", 2nd Edition, 2018, ISBN 978-1-59327-828-1 (Amazon, free online edition).
- Jim Blandy and Jason Orendorff, "Programming Rust", O'Reilly, 2018, ISBN 978-1-491-92728-1 (Amazon).
This is a level M course, worth 10 credits.
Assessment is by examination (80%) and assessed coursework (20%).
Past exam papers:
- Lecture 1: Advanced Topics in Systems Programming
- Lecture 2: Types and Systems Programming
- Lecture 3: Type-based Modelling and Design
- Lecture 4: Resource Ownership and Memory Management
- Lecture 5: Garbage Collection
- Lecture 6: Concurrency
- Lecture 7: Coroutines and Asynchronous Programming
- Lecture 8: Security Considerations
- Lecture 9: Review and Future Directions