Re: Parameters vs. threads
Lassi Kortela 24 Apr 2020 08:58 UTC
> Otherwise, look at all the things you have to virtualize: not just the
> umask and working directory, but the euid and egid, the environment
> variables, and the effects of fork(): that's as far as the paper goes.
> Not mentioned but also per-process are the process root directory, the
> command line (if it's mutable), the array of file descriptors, the
> process security context, the process resource limits like ulimit, the
> mount points, the signal handlers, ....
Basically like implementing Cygwin, but running multiple copies of it in
the same OS process, and every host OS has a different set of resources
to virtualize instead of being able to rely on Windows. Sounds fun :)
Over the long term, major advances in programming languages tend to come
from adding restrictions (automatic memory management, immutable data).
Restrictions on the programmer give more leeway to do useful things in
the language.
> "Threads share state. This
> enables inter-thread communication by explicitly providing several
> threads access to shared state by lexical binding."
All general-purpose operating systems have shared memory between
processes, and things like X Window System and PostgreSQL rely on it.