- Tarides - Software Engineer
- Recurse Center - Spring 1, 2019
- BangBangCon West - Co-Organiser
What even is a
systems programming language?
"A system program is
an integrated set of
threshold of size
Systems Programming Languages
(Bergeron et al. 1972)
- The system program is likely to be used to support other software programs.
- It is designed for continued “production” use rather than a one-shot solution to a single
A language which can be used without undue concern
for bit twiddling.
of Scripting languages
Rise of Scripting languages
- Systems programming languages designed to build more primitive computer elements.
- Scripting languages are designed for gluing.
- Dropbox was able to build surprisingly large and scalable systems on just Python.
“prototype” code to “production” code.
What is a systems
programming language today?
Where does Rust
Systems programming is
reading the internet.
Writing our own container!
What even is a container?
Containers are processes born from tarballs
anchored to namespaces controlled by cgroups.
Deconstructing the container:
Change the root directory for the current process and its children for isolation.
HOW TO CHROOT?
- Namespaces determine what a process can see.
- Multiple namespaces: pid, net, uts, ipc, user, mnt
- Creating namespaces:
- A namespace is destroyed once the last process in a namespace leaves.
- Enter a namespace:
How to create a namespace?
- Allow processes to be organized into hierarchical groups.
- The resources and usage of these groups can be limited.
- Implemented through a pseudo filesystem called cgroupfs.
- Subgroups inherit the limits set on the parent group.
- A process can be a part of only one cgroup.
- A subsystem controls each resource, e.g. the memory subsystem controls the memory use.
let mut cgroups = PathBuf::from("/sys/fs/cgroup/");
let pid_max = cgroups.join();