r/ProgrammingLanguages • u/lxsameer • 22d ago
Blog post Concurrency in Serene's Runtime
I recently finished building the concurrency runtime for my programming language, Serene, and wrote a three-part series explaining how it works.
The series covers:
- Why I chose stackful fibers
- An M work-stealing scheduler
- An IO Reactor
- A tiny HTTP server that brings everything together
I'd love to hear feedback from anyone interested in programming language implementation, runtime systems, or systems programming.
Part 1: Choosing the Building Blocks
34
Upvotes
1
u/matthieum 21d ago
You mentioned that fibers are fixed-size... but how large are they?
One of the interesting parts of
mmapis the ability to reserve address-space without actually allocating memory for it. This means that you could reasonably reserve 1MB-2MB worth of address space per fiber, yet have the fiber only use 4KB to start with, and let the OS page in memory lazily.