Technische Universität Braunschweig
  • Studium & Lehre
    • Vor dem Studium
      • Informationen für Studieninteressierte
      • Studiengänge von A-Z
      • Bewerbung
      • Fit4TU - Self-Assessment
      • Beratungsangebote für Studieninteressierte
      • Warum Braunschweig?
    • Im Studium
      • Erstsemester-Hub
      • Semestertermine
      • Lehrveranstaltungen
      • Studien-ABC
      • Studienorganisation
      • Beratungsnavi
      • Zusatzqualifikationen
      • Finanzierung und Kosten
      • Besondere Studienbedingungen
      • Gesundheit & Wohlbefinden
      • Campusleben
    • Nach dem Studium
      • Exmatrikulation und Vorlegalisation
      • Nach dem Abschluss
      • Alumni*ae
    • Strategien und Qualitätsmanagement
      • Strategiepapiere für Studium und Lehre
      • Studienqualitätsmittel
      • Studiengangsentwicklung
      • Qualitätsmanagement
      • Systemakkreditierung
      • Rechtliche Grundlagen
      • TU Lehrpreis
    • Für Lehrende
      • Informationen für Lehrende
      • Konzepte
      • Lernmanagementsystem Stud.IP
    • Kontakt
      • Studienservice-Center
      • Sag's uns - in Studium und Lehre
      • Zentrale Studienberatung
      • Immatrikulationsamt
      • Abteilung 16 - Studium und Lehre
      • Career Service
      • Projekthaus
  • Forschung
    • Forschungsprofil
      • Forschungsschwerpunkte
      • Exzellenzcluster der TU Braunschweig
      • Forschungsprojekte
      • Forschungszentren
      • Forschungsprofile der Professuren
    • Frühe Karrierephase
      • Förderung in den frühen Phasen der wissenschaftlichen Karriere
      • Promotion
      • Postdocs
      • Nachwuchsgruppenleitung
      • Junior Professur und Tenure-Track
      • Habilitation
      • Service-Angebote für Wissenschaftler*innen
    • Forschungsdaten & Transparenz
      • Transparenz in der Forschung
      • Forschungsdaten
      • Open Access Strategie
      • Digitale Forschungsanzeige
    • Forschungsförderung
      • Netzwerk Forschungsförderung
      • Datenbanken und Stiftungen
    • Kontakt
      • Forschungsservice
      • Graduiertenakademie
  • International
    • Internationale Studierende
      • Warum Braunschweig?
      • Studium mit Abschluss
      • Austauschstudium
      • TU Braunschweig Summer School
      • Geflüchtete
      • International Student Support
    • Wege ins Ausland
      • Studium im Ausland
      • Praktikum im Ausland
      • Lehren und Forschen im Ausland
      • Arbeiten im Ausland
    • Internationale Forschende
      • Welcome Support
      • Promotionsstudium
      • Service für gastgebende Einrichtungen
    • Sprachen und interkulturelle Kompetenzvermittlung
      • Deutsch lernen
      • Fremdsprachen lernen
      • Interkulturelle Kompetenzvermittlung
    • Internationales Profil
      • Internationalisierung
      • Internationale Kooperationen
      • Strategische Partnerschaften
      • Internationale Netzwerke
    • International House
      • Wir über uns
      • Kontakt & Sprechstunden
      • Aktuelles und Termine
      • International Days
      • 5. Studentische Konferenz: Internationalisierung der Hochschulen
      • Newsletter, Podcast & Videos
      • Stellenausschreibungen
  • Die TU Braunschweig
    • Unser Profil
      • Ziele & Werte
      • Ordnungen und Leitlinien
      • Allianzen & Partner
      • Hochschulentwicklung 2030
      • Stiftungsuniversität
      • Internationale Strategie
      • Fakten & Zahlen
      • Unsere Geschichte
    • Karriere
      • Arbeiten an der TU
      • Stellenmarkt
      • Berufsausbildung an der TU
    • Wirtschaft & Unternehmen
      • Unternehmensgründung
      • Freunde & Förderer
    • Öffentlichkeit
      • Veranstaltungskalender
      • Check-in für Schüler*innen
      • Hochschulinformationstag (HIT)
      • Kinder-Uni
      • Das Studierendenhaus
      • Gasthörer*innen & Senior*innenstudium
      • Nutzung der Universitätsbibliothek
    • Presse & Kommunikation
      • Stabsstelle Presse und Kommunikation
      • Medienservice
      • Ansprechpartner*innen
      • Tipps für Wissenschaftler*innen
      • Themen und Stories
    • Kontakt
      • Allgemeiner Kontakt
      • Anreise
      • Für Hinweisgeber
  • Struktur
    • Leitung & Verwaltung
      • Das Präsidium
      • Stabsstellen
      • Verwaltung
      • Organe, Statusgruppen und Kommissionen
    • Fakultäten
      • Carl-Friedrich-Gauß-Fakultät
      • Fakultät für Lebenswissenschaften
      • Fakultät Architektur, Bauingenieurwesen und Umweltwissenschaften
      • Fakultät für Maschinenbau
      • Fakultät für Elektrotechnik, Informationstechnik, Physik
      • Fakultät für Geistes- und Erziehungswissenschaften
    • Institute
      • Institute von A-Z
    • Einrichtungen
      • Universitätsbibliothek
      • Gauß-IT-Zentrum
      • Zentrale Personalentwicklung
      • International House
      • Projekthaus
      • Transferservice
      • Hochschulsportzentrum
      • Einrichtungen von A-Z
    • Studierendenschaft
      • Studierendenparlament
      • Fachschaften
      • Studentische Wahlen
    • Lehrer*innenbildung
      • Lehrer*innenfortbildung
      • Forschung
    • Chancengleichheit
      • Gleichstellung
      • Familie
      • Diversität
    • Kontakt
      • Personensuche
  • Suche
  • Schnellzugriff
    • Personensuche
    • Webmail
    • cloud.TU Braunschweig
    • Messenger
    • Mensa
    • TUconnect (Studierendenportal)
    • Lehrveranstaltungen
    • Im Notfall
    • Stud.IP
    • UB Katalog
    • Status GITZ-Dienste
    • Störungsmeldung GB3
    • IT Dienste
    • Informationsportal (Beschäftigte)
    • Beratungsnavi
    • Linksammlung
    • DE
    • EN
    • IBR YouTube
    • Facebook
    • Instagram
    • YouTube
    • LinkedIn
    • Mastodon
Menü
  • Struktur
  • Fakultäten
  • Carl-Friedrich-Gauß-Fakultät
  • Institute
  • Institut für Betriebssysteme und Rechnerverbund
  • Prof. Dr.-Ing. Christian Dietrich
  • Advent(2)
Logo IBR
IBR Login
  • Institut für Betriebssysteme und Rechnerverbund
    • News
    • Wir über uns
      • Gesamtes Team
      • Anreise
      • Raumplan
      • Projekte
      • Veröffentlichungen
      • Software
      • News Archiv
    • Connected and Mobile Systems
      • Team
      • Lehrveranstaltungen
      • Abschlussarbeiten
      • Projekte
      • Veröffentlichungen
      • Software
      • Datensätze
    • Verlässliche Systemsoftware
      • Übersicht
      • Team
      • Lehre
      • Arbeiten & Jobs
      • Forschung
      • Publikationen
    • Algorithmik
      • Team
      • Lehrveranstaltungen
      • Abschlussarbeiten
      • Projekte
      • Veröffentlichungen
    • Mikroprozessorlabor
    • Studium
      • Sommersemester 2025
      • Wintersemester 2024/2025
      • Abschlussarbeiten
    • Service
      • Bibliothek
      • Mailinglisten
      • Webmail
      • Knowledgebase
      • Wiki
      • Account Management
      • Service-Status
    • Spin-Offs
      • Docoloc
      • bliq (formerly AIPARK)
      • Confidential Technologies
    • Forschungsverbünde
      • IST.hub
  • Task Overview
  • Git repository
  • Mailing list
  • Matrix-Channel

Advent(2) -- The System Call Advent Calendar

Welcome to the Advent(2), the Advent calendar of the Institute of Operating Systems and Computer Networks at the TU Braunschweig. Every day of December, we will open a door and find a system call, a concept or an interface of Linux. Behind each door, there is a short article and a small exercise, for which the solution is provided the following day.

Christian Dietrich
The system call advent calendar is being organized by Prof. Christian Dietrich. Explore the upcoming topics for Bachelor's and Master's theses! If you are considering pursuing a PhD under his guidance, do not hesitate to reach out: dietrich-at-ibr.cs.tu-bs.de

Introduction

System calls are commands that our programs send to the operating system kernel to get things done. And there are a lot of system calls that we can choose from. In our programs, system calls look like normal function calls as the C library provides thin wrapper functions that pack the arguments, invoke the OS, and post-process the return code (errno(3)).

From your experience, it might be quite muddy to know whether a C-library function is a thin wrapper around a bare system call (like open(2)), a thick wrapper that provides additional user space functionality (like fopen(3)), or a function that does not involve the kernel (like atoi(3)). Most of the time, this distinction does not matter at all. However, in this Advent(2), we want to focus on the bare and naked OS interface and show you abstractions, interfaces, and concepts that are interesting, not well-known, or just plain useful. At the beginning, we will have a slow start, we will see things that you might already know, or at least you believe to know.

For this project, we will often link man-pages(7) that contain the detailed descriptions of the involved system calls. Read them! At least the DESCRIPTION section. With more and more of those, you will get a deeper understanding of the basic UNIX concepts. These man pages are organized in so-called "sections", where section 1 refers to command-line tools (e.g., cat(1)), section 2 to system-call wrappers (e.g., open(2)), and section 3 to C-library functions (e.g., fopen(3), atoi(3)). While you can read those manual pages in your browser, the man(1) command-line tool is even more useful, as it is always at your fingertips when you at work with the shell. Try it ($ in monotype indicates a shell prompt):

$ man 1 man
$ man 2 open
$ man 3 fopen

About the Advent(2)

We will describe a system-call, a concept or an interface each day. Thereby, we will not stick to the POSIX standards, but we will enjoy the full depth of Linux specific interfaces! You can either just read and enjoy these articles (and the solution code) or you can work out the tasks by yourself. The most important part of this calendar is that we have some fun together and learn something about Linux.

What you need is a Linux shell (as we focus on Linux) with the gcc C compiler installed (apt-get install build-essential). The easiest way to get such an environment is to use SSH to log into you local university's computer pool. But also an Ubuntu installation in a virtual machine or the Windows Subsystem for Linux (WSL) are viable options. For some exercises, you will need a relatively recent Linux kernel (> 5.10) as we will explore some shiny new features.

Calendar

Creative Illustration for The Endless Advent Calendar

24

The Endless Advent Calendar

process 61 lines

[prctl(2), sigaction(2)]

Creative Illustration for Counting Presents. Fast!

23

Counting Presents. Fast!

ipc 12 lines

[getcpu(2), rseq(2)]

Creative Illustration for On Christmas, They Come and Go!

22

On Christmas, They Come and Go!

process 115 lines

[netlink(7), netlink(3)]

Creative Illustration for Let the Children Speak up!

21

Let the Children Speak up!

ipc 155 lines

[sendmsg(2), cmsg(3), unix(7)]

Creative Illustration for Don't Dip Your Fingers into the Sauce!

20

Don't Dip Your Fingers into the Sauce!

process 52 lines

[process_vm_readv(2), process_vm_writev(2)]

Creative Illustration for Cookie Counting

19

Cookie Counting

process 69 lines

[perf_event_open(2)]

Creative Illustration for A Trace of Cookie Crumbs

18

A Trace of Cookie Crumbs

process 63 lines

[ptrace(2)]

Creative Illustration for Stop Asking for more Presents

17

Stop Asking for more Presents

process 59 lines

[seccomp(2)]

Creative Illustration for Spin the Advent Wreath as Fast as You can

16

Spin the Advent Wreath as Fast as You can

file 171 lines

[io_uring_setup(2), io_uring_register(2)]

Creative Illustration for Let the ELF Note Everything

15

Let the ELF Note Everything

ipc 114 lines

[pty(7), termios(3)]

Creative Illustration for Last Christmas I Gave you my Letter

14

Last Christmas I Gave you my Letter

file 137 lines

[getdents64(2), statx(2)]

Creative Illustration for Santas Postbox (2)

13

Santas Postbox (2)

ipc 43 lines

[signalfd(2), signal(7), mq_overview(7), mq_open(2), mq_timedreceive(2)]

Creative Illustration for Santa's Postbox

12

Santa's Postbox

ipc 74 lines

[fifo(7), unix(7), mknod(2)]

Creative Illustration for Send a Letter to Santa. Fast.

11

Send a Letter to Santa. Fast.

ipc 44 lines

[sendfile(2), memfd_create(2)]

Creative Illustration for Pipes Full of Gravy

10

Pipes Full of Gravy

ipc 131 lines

[epoll_create(2), epoll_ctl(2), epoll_wait(2), pipe(7), splice(2)]

Creative Illustration for For Christmas, Checks are Extended

9

For Christmas, Checks are Extended

file 65 lines

[getxattr(2), setxattr(2), listxattr(2)]

Creative Illustration for Wishlist Sorting

8

Wishlist Sorting

file 61 lines

[readv(2), writev(2), preadv(2), pwritev(2)]

Creative Illustration for Select a Gift

7

Select a Gift

file 110 lines

[select(2)]

Creative Illustration for The Self-Healing Road to Perdition

6

The Self-Healing Road to Perdition

process 90 lines

[sigaction(2)]

Creative Illustration for Wake me up before you clo-close!

5

Wake me up before you clo-close!

file 70 lines

[inotify_init(2), inotify_add_watch(2), read(2)]

Creative Illustration for Workbench Management

4

Workbench Management

ipc 101 lines

[futex(2)]

Creative Illustration for A Map to Persistance!

3

A Map to Persistance!

memory 65 lines

[mmap(2), ftruncate(2)]

Creative Illustration for Clone a Chimera!

2

Clone a Chimera!

process 45 lines

[clone(2), fork(2), getpid(2), gettid(2)]

Creative Illustration for The cat on the tip of the iceberg

1

The cat on the tip of the iceberg

file 45 lines

[open(2), pread(2), close(2)]

Last modified: 2023-12-01 15:52:27.445711, Last author: , Permalink: /p/advent


aktualisiert am 25.11.2024, 11:03 von Prof. Dr.-Ing. Christian Dietrich

Für alle

Stellen der TU Braunschweig
Jobbörse des Career Service
Merchandising
Sponsoring- & Spendenleistungen
Drittmittelgeförderte Forschungsprojekte
Vertrauenspersonen für Hinweisgeber

Für Studierende

Semestertermine
Lehrveranstaltungen
Studiengänge von A-Z
Informationen für Erstsemester
TUCard

Interne Tools

Status GITZ-Dienste
Handbuch für TYPO3 (Intern)
Corporate Design-Toolbox (Intern)
Glossar (DE-EN)
Meine Daten ändern
Hochschulöffentliche Bekanntmachungen

Kontakt

Technische Universität Braunschweig
Universitätsplatz 2
38106 Braunschweig
Postfach: 38092 Braunschweig
Telefon: +49 (0) 531 391-0

Anreise

© Technische Universität Braunschweig
Impressum Datenschutz Barrierefreiheit