Skip to content

Make the unit of preemptive termination controllable #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dead-claudia opened this issue Oct 26, 2021 · 0 comments
Open

Make the unit of preemptive termination controllable #4

dead-claudia opened this issue Oct 26, 2021 · 0 comments

Comments

@dead-claudia
Copy link

I'm thinking this could employ some rules to reduce the size of the unit of preemptive termination, as well as allowing users to artificially reduce it further as desired:

  • If an agent lacks a reference to a shared array buffer, it terminates that agent only.
  • If an agent has a reference to a shared array buffer, all agents are terminated by default.
  • Agents can opt on a per-agent basis to remain alive when another agent referencing a shared array buffer it also holds a reference to terminates. In this case, the opt-in makes it clear that the agent should be prepared to deal with potentially inconsistent state. (There are mechanisms for ensuring consistency in the face of potential sudden preemption - operating systems already necessarily use these for reasons like power failure tolerance.)
  • In all cases, the SAB remains alive and usable as long as agents with references to it retain their references.

This would be able to strike a compromise and avoid the issues detailed in https://github.com/tc39/proposal-oom-fails-fast#can-the-uopt-be-finer-grain-than-an-agent-cluster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant