Lecture 1 provides an introduction to the course. It reviews the course
aims and objectives, intended learning outcomes, and timetable, and it
outlines the means by which the course will be assessed.
00:00:00.834
Welcome to Advanced Systems Programming.
00:00:03.667
For those who don't know me,
00:00:04.959
my name is Colin Perkins
00:00:06.542
and I'll be giving the lectures for this course.
00:00:09.875
In this first lecture, I'll introduce the course
00:00:12.250
and talk about how the material will be structured.
00:00:16.667
As I said, I'm Colin Perkins
00:00:18.542
and I'm the coordinator for this course
00:00:20.375
and will be giving the lectures
00:00:21.667
along with Paul Harvey.
00:00:23.583
Our contact details are on the slide.
00:00:26.291
If you have questions about the material
00:00:28.000
covered in the course, I'm happy to answer them by email.
00:00:31.750
We also have labs and discussion sessions
00:00:33.834
throughout the course
00:00:35.000
where we can talk about the material
00:00:36.583
and you can ask questions.
00:00:38.917
The lecture slides, recordings, transcripts,
00:00:42.125
lab exercises and other course materials
00:00:45.417
can also be found on Moodle and on my website.
00:00:50.708
So what's this course about?
00:00:53.291
Well, over the last 15 years or so,
00:00:55.792
we've seen a shift in the technology landscape.
00:00:59.625
We've gone from a world dominated
00:01:01.250
by desktop PCs running Windows,
00:01:04.041
with a relatively small number of servers
00:01:06.542
often located on site to support those PCs,
00:01:10.375
to a world dominated by smartphones and cloud computing.
00:01:15.083
Devices are now much more likely to be mobile
00:01:17.417
and battery-powered,
00:01:19.166
and connected to a network
00:01:20.458
that lets them offload computation
00:01:21.917
and data to remote cloud computing resources
00:01:24.542
in dedicated data centers.
00:01:28.792
This changes the way we use those devices
00:01:31.041
and the type of applications we use.
00:01:34.792
We're also increasingly using real-time applications
00:01:37.667
like telephony, video conferencing,
00:01:40.208
streaming video, or gaming
00:01:42.417
on our smartphones, tablets,
00:01:44.625
and other general-purpose computing devices.
00:01:48.667
And there are also increasing numbers of servers.
00:01:52.250
These are not battery-powered or mobile,
00:01:54.583
but they are also increasingly power-aware,
00:01:57.667
as data center operators
00:01:59.583
strive to reduce the electricity
00:02:02.000
and air conditioning costs of operating their services,
00:02:05.291
and to reduce their environmental impact.
00:02:09.708
And the devices we use are increasingly concurrent,
00:02:13.083
in part because the data center
00:02:15.458
is a natural home for concurrency,
00:02:17.750
running millions of instances of the same service
00:02:20.125
to meet the needs of different users.
00:02:23.500
But it's also in part
00:02:24.792
because the need to control power consumption
00:02:27.333
has pushed mobile CPUs
00:02:29.083
in the direction of multi-core support.
00:02:34.625
Despite these massive shifts,
00:02:36.458
the underlying operating system and software stack
00:02:39.959
has changed relatively little.
00:02:43.333
The operating system on my smartphone, for example,
00:02:46.625
runs the same underlying operating system
00:02:49.166
and software stack
00:02:50.417
as the desktop workstation I used as a PhD student
00:02:53.875
30 years ago.
00:02:56.667
It uses the same operating system kernel.
00:03:00.208
It's programmed using the same programming language
00:03:02.750
and shares many of the same software libraries,
00:03:05.000
APIs, and features.
00:03:08.792
The code has evolved and changed, of course.
00:03:11.834
but the organization, architecture
00:03:14.291
and underlying approaches to writing the system
00:03:17.166
remain surprisingly similar.
00:03:20.208
This technology and programming model
00:03:22.625
is increasingly limited
00:03:24.458
and increasingly limiting.
00:03:30.000
In this course
00:03:30.834
we'll explore some new technologies
00:03:32.792
and new approaches that aim to support safer and
00:03:35.583
more effective systems programming.
00:03:38.291
We'll talk about advances in programming languages
00:03:41.375
that allows to retain the advantages
00:03:43.458
of systems programming languages, such as C,
00:03:47.000
in terms of control over data representation
00:03:49.625
and high performance,
00:03:51.000
while being much safer and easier to program.
00:03:55.291
We'll talk about how operating systems
00:03:57.291
might change to better support writers of device drivers,
00:04:00.166
low-level networking code,
00:04:02.083
and so on,
00:04:03.625
with the goal of improving safety and security
00:04:06.333
of the the entire system.
00:04:11.708
The aims of the course are to explore the features of modern
00:04:14.667
programming languages and operating systems
00:04:16.667
that can ease the challenges of
00:04:18.375
systems programming,
00:04:19.875
focusing on type systems and runtime support.
00:04:23.667
We’ll review the literature
00:04:25.083
on systems programming and operating systems design,
00:04:28.250
discuss limitations of deployed systems,
00:04:30.750
consider how systems programming might evolve to
00:04:33.708
address the challenges
00:04:35.166
of supporting modern computing systems.
00:04:38.583
In particular,
00:04:39.792
the course will aim to highlight
00:04:41.166
how modern programming languages and new
00:04:43.625
approaches to software development
00:04:45.542
can help ensure system correctness and security.
00:04:49.625
Fundamentally, we'll be looking at how systems programming
00:04:52.667
is changing to support new applications and new uses.
00:04:59.208
What are the expected learning outcomes?
00:05:02.875
Well, first and most importantly,
00:05:05.208
by the end of the course you should understand
00:05:07.667
the advantages and disadvantages
00:05:09.625
of using C as a systems programming language.
00:05:14.208
You should be able to discuss the benefits
00:05:16.041
of using a modern,
00:05:17.166
strongly typed systems programming language
00:05:19.417
as an alternative,
00:05:20.959
and you should have an understanding
00:05:22.750
of the concepts behind type-driven development
00:05:25.125
and the role of the type system
00:05:26.625
in ensuring code correctness.
00:05:31.250
Second, you should have some understanding
00:05:33.708
of the challenges in writing secure systems code.
00:05:38.333
In particular, you should understand
00:05:40.083
some of the issues around memory safety
00:05:42.291
and parsing untrusted network inputs.
00:05:45.542
And you should understand why those tasks
00:05:47.458
are difficult in C.
00:05:51.583
Third, you should understand the basics
00:05:53.875
of how garbage collection,
00:05:55.417
reference counting,
00:05:56.834
region-based memory management,
00:05:58.834
and manual memory management work.
00:06:02.375
You should have some idea when it's
00:06:03.917
appropriate to use each approach,
00:06:05.375
and what are the trade-offs between them.
00:06:10.208
You should understand why multi-core
00:06:11.959
systems are becoming popular,
00:06:13.750
and the hardware trends which are driving this.
00:06:17.291
And you should have an understanding
00:06:18.959
of the different approaches to concurrent programming.
00:06:21.208
including multi-threading,
00:06:22.959
actor-based systems,
00:06:24.333
concurrent transactions and co-routines
00:06:27.208
and what are the different trade-offs
00:06:29.083
and strengths and weaknesses
00:06:30.458
between them.
00:06:33.458
And finally you should be able to write simple programs in a
00:06:36.708
modern systems programming language
00:06:38.792
to demonstrate your understanding.
00:06:44.917
There are number of prerequisites for this course.
00:06:48.792
First, you're expected to be familiar
00:06:51.417
with the C programming language.
00:06:54.291
You won't need to write any C programs in this course,
00:06:57.542
but you will need to read and understand C code.
00:07:02.125
One of the aims of this course
00:07:03.875
is to make you aware of the strengths
00:07:05.542
and weaknesses of C as a
00:07:06.834
programming language
00:07:08.291
and to compare C to other languages.
00:07:11.500
To do this you need to
00:07:12.959
understand C programming.
00:07:15.542
You need to understand also the basics of operating
00:07:18.208
systems and networking.
00:07:20.625
This is a systems programming course
00:07:22.500
and the operating systems
00:07:23.875
and networks are two of the main areas
00:07:25.834
where systems programming is used.
00:07:29.667
And you need a conceptual understanding
00:07:31.417
of functional programming.
00:07:34.000
You won't need to read them on a few lines of Haskell code
00:07:36.667
and you certainly won't need to
00:07:38.125
write any Haskell programs.
00:07:40.542
But the ideas behind Haskell and functional
00:07:43.125
programming are important.
00:07:45.834
We'll be talking a lot about how functional
00:07:48.417
programming concepts and some
00:07:49.959
of the ideas around modern type systems,
00:07:52.291
both of which were pioneered in Haskell,
00:07:54.750
can be used in more mainstream
00:07:56.458
systems programming tasks.
00:08:00.250
This material broadly matches the systems programming,
00:08:03.583
operating systems, network systems
00:08:05.834
and functional programming courses in Glasgow.
00:08:08.250
Computing Science.
00:08:10.959
You can take this course if you haven't done
00:08:12.792
those other courses
00:08:14.291
but you may need to do some catching up in your own time.
00:08:20.959
The course is structured as a mixture of lectures and labs.
00:08:24.917
The lectures run weekly
00:08:26.667
with a new topic each week for 10 weeks.
00:08:29.625
The lectures are pre-recorded
00:08:31.750
and there's a group discussion slot and Q&A each week.
00:08:36.250
The labs are also organised weekly
00:08:38.708
but some exercises are expected to
00:08:40.375
take one week to complete while others will take
00:08:42.708
two weeks.
00:08:44.291
The labs finish after nine weeks.
00:08:50.583
Lecture recordings will be made available
00:08:52.291
ahead of time and will comprise
00:08:53.917
around an hour's worth of material each week
00:08:56.333
split into several shorter parts.
00:08:59.959
Each lecture will be accompanied by a set of
00:09:01.917
discussion questions that will be
00:09:03.500
available on Moodle and on the course website.
00:09:07.166
These discussion questions are not assessed
00:09:09.250
and are intended to help you understand the material.
00:09:13.750
The sessions timetabled on Wednesday mornings
00:09:15.792
are intended for a discussion of the lecture
00:09:17.792
material and questions.
00:09:20.166
You must watch the lecture videos and think about the
00:09:22.875
discussion questions before the timetabled sessions.
00:09:27.959
This discussion slot is your main opportunity
00:09:30.375
to ask questions about the material
00:09:32.458
and you should come prepared
00:09:33.792
to talk and discuss the material at this time.
00:09:37.625
The more questions and discussion we have
00:09:40.041
the more useful it will be.
00:09:45.000
In addition there are weekly labs
00:09:46.875
during the first nine weeks of the course.
00:09:50.041
As with the lectures,
00:09:51.417
the lab materials will be made available
00:09:53.583
in advance of the timetable sessions.
00:09:56.500
You should read the lab sheets
00:09:57.959
and make a start on the exercises in your own time
00:10:00.708
before the labs.
00:10:03.542
The timetable sessions on Wednesday afternoons are there for
00:10:06.375
discussion and support of the lab exercises.
00:10:10.000
You should try to solve the lab exercises
00:10:12.250
and think of questions you might need to ask
00:10:14.583
before the timetabled support slot
00:10:16.792
so we can effectively help you.
00:10:19.875
Some of the labs involve programming
00:10:22.291
but many of them also have a discussion component
00:10:24.708
and are perhaps closer to tutorials in nature.
00:10:29.333
For these labs, read the handouts,
00:10:31.125
think about the questions,
00:10:32.750
and come prepared to discuss the material
00:10:34.708
during the lab sessions.
00:10:40.583
The course will use the Rust programming language
00:10:42.750
to illustrate type-driven design
00:10:44.542
and ownership tracking for systems programming.
00:10:47.875
You're expected to learn the basics
00:10:49.458
of how to program in Rust as part of the course.
00:10:53.875
The two books listed on the slide
00:10:55.542
provide good introduction to Rust
00:10:57.917
to complement the material we'll cover in the lectures.
00:11:02.166
The first book,
00:11:03.041
The Rust Programming Language,
00:11:04.708
by Steve Klabnik and Carol Nichols,
00:11:06.959
is a standard tutorial introduction to Rust.
00:11:10.667
It's available for free on the Rust Language website.
00:11:15.125
The second book,
00:11:16.083
Programming Rust by Jim Blandy and Jason Orendorf,
00:11:19.500
is more expensive if you buy it,
00:11:22.041
but I think it has the better explanation
00:11:24.000
of many of the concepts.
00:11:26.500
The link on the slide offers free access to this book
00:11:29.417
via the university library.
00:11:32.583
I strongly recommend that you read one of these books
00:11:34.959
to build on the lectures and lab exercises.
00:11:41.333
In addition to the two books
00:11:42.667
on the Rust programming language,
00:11:44.500
the lectures will also refer to various
00:11:46.417
research papers and blog posts.
00:11:50.166
You're expected to read this material.
00:11:53.583
For all the research papers,
00:11:55.125
either a URL or a digital object identifier,
00:11:58.250
a DOI, will be provided.
00:12:01.750
If a DOI is given,
00:12:03.583
go to dx.doi.org,
00:12:06.333
enter the DOI, and it will redirect you to the paper.
00:12:11.792
All the papers mentioned in the course
00:12:13.458
are accessible at no cost from the campus network
00:12:16.166
or via the university's VPN service.
00:12:19.875
In most cases you should also be able to get access
00:12:22.625
by following the institutional login option
00:12:24.959
on the publisher's website,
00:12:26.542
selecting the University of Glasgow and
00:12:28.750
entering your login details.
00:12:31.875
Under no circumstances should you
00:12:33.875
pay to access any of these papers.
00:12:36.542
If you can't get access for free,
00:12:38.333
email me and I'll send you a copy.
00:12:42.125
Indeed, don't pay to access any research papers.
00:12:45.708
It's perhaps not widely known,
00:12:47.291
but authors of research papers don't get paid
00:12:50.000
if you buy a copy of their paper from the publisher.
00:12:53.917
In fact, most research paper authors
00:12:55.875
actually pay to publish their papers.
00:12:59.500
If you want a copy of a research paper
00:13:01.375
and you can't find it for free online,
00:13:03.458
then email the author and ask.
00:13:06.500
They'll almost always just send you a copy by return.
00:13:12.000
Now, as I said earlier,
00:13:13.250
you're expected to read these papers.
00:13:16.208
When you do, read them to understand
00:13:18.041
the concepts and the ideas, not the details.
00:13:21.792
Don't worry if you don't understand
00:13:23.625
everything in the papers,
00:13:25.125
and skip over details and parts you don't understand.
00:13:29.125
You're looking to get a feel for the ideas,
00:13:31.166
not to understand every detail.
00:13:34.417
Some of the ideas mentioned in these papers will be good,
00:13:37.333
some perhaps less so.
00:13:39.583
Some will be interesting but impractical.
00:13:42.750
And what's impractical today
00:13:44.375
might become important tomorrow
00:13:46.125
due to changes in technology, economics or society.
00:13:51.125
The goal of the papers is to help you think more deeply
00:13:53.667
about the subject,
00:13:54.667
not to suggest particular desirable outcomes.
00:13:59.708
And if you've not read many research papers before,
00:14:02.500
the "How to Read a Research Paper"
00:14:05.041
paper linked from the slide,might be useful.
00:14:12.333
Assessment for the course comprises
00:14:14.667
an exam worth 80% of the marks,
00:14:17.250
with the coursework being worth the remaining 20%.
00:14:21.417
The assessed coursework will comprise two exercises,
00:14:24.166
each worth 10% of the marks.
00:14:27.291
The first assessed exercise
00:14:28.792
will be about memory management.
00:14:30.667
It will be made available at the start of lecture
00:14:33.500
and will be due at the end of lecture 7.
00:14:37.542
The second assessed exercise will be a concurrent
00:14:40.208
programming exercise using the Rust programming language.
00:14:44.083
It will be made available at the start of lecture 7
00:14:46.375
and will be due on the day of lecture 9.
00:14:49.875
There will also be an exam,
00:14:51.208
worth 80% of the marks for the course,
00:14:53.333
sometime in April or May.
00:14:56.625
Past papers and a sample exam paper,
00:14:58.917
with worked answers, are available on Moodle.
00:15:02.625
The material covered in the lectures and labs is examinable,
00:15:06.792
and, importantly, so are the ideas
00:15:08.875
discussed in the cited papers and blog posts.
00:15:13.542
The goal is to test your understanding of the concepts,
00:15:16.500
not to test your memory of all the details.
00:15:20.375
Reading widely and broadly understanding the material is important.
00:15:25.166
If you only watch the lectures,
00:15:26.750
and skim the reading,
00:15:27.959
you'll miss important ideas.
00:15:33.041
So that concludes these introductory remarks.
00:15:36.166
The main lecture content starts in week two.
00:15:39.917
Please make sure you watch lecture two
00:15:41.875
and think about the discussion questions before then‘
00:15:44.375
and come prepared to discuss.
00:15:47.625
The labs start in week one.
00:15:50.625
Please review the lab handouts
00:15:52.083
and start on the exercises
00:15:53.792
and think about the discussion questions before then.
00:15:56.750
Thank you.
The discussion session in week 1 will review the course structure,
goals, and logistics. There will be time to ask any questions about
the course, lectures, and labs.