All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Restartable Sequences: A Linux Kernel Feature for Lock-Free Thread-Safe Programming

By

grappler

8h ago· 26 min readenInsight

Summary

This article explores restartable sequences (rseq), a Linux kernel feature introduced in version 4.18 (circa 2018) that enables creation of thread-safe data structures without traditional locks or atomic operations, scaling efficiently to many-core microprocessors. The author notes that rseq currently requires handwritten assembly code on Linux, but predicts a future where all operating systems support rseq(), all system programming languages are redesigned to express restartable sequences, and all software is rewritten to use them.

Key quotes

· 4 pulled
The best kept secret at the frontier of system programming right now is the Linux 4.18+ (c. 2018) concept of restartable sequences or rseq for short.
They allow you to create thread-safe data structures without locks or atomics which scale to microprocessors with many cores.
It's currently only possible to use rseq on Linux using handwritten assembly code.
I believe in the future, all operating systems will be updated to support rseq(), all system programming languages will be redesigned to be able to express restartable sequences
Snippet from the RSS feed
All languages will change to express restartable sequences, and all software will be rewritten to use them.

You might also wanna read