Processes vs Closures
Operating systems need to implement a fresh callstack for every preemptable app. We stuff function-based program snippets into envelopes and we call these envelopes processes. A process contains a unique callstack and a place to save away the contents of CPU registers and various other stuff.
Closures are but little blobs of mutable state. Closures, hence, are like little processes. Why don’t we use closures to implement operating processes? Why do we insist on implementing huge closures by hand in assembler instead of using little closures? Probably because it seemed like a good idea back in 1950.
See Also
References: https://guitarvydas.github.io/2024/01/06/References.html
Blog:
https://guitarvydas.github.io/
Videos: https://www.youtube.com/@programmingsimplicity2980
Discord: https://discord.gg/Jjx62ypR
Leanpub: [WIP] https://leanpub.com/u/paul-tarvydas
Gumroad:
https://tarvydas.gumroad.com
Twitter: @paul_tarvydas

