runtimejs / runtime

[not maintained] Lightweight JavaScript library operating system for the cloud
http://runtimejs.org
Apache License 2.0
1.93k stars 128 forks source link

Process model #10

Closed kjnsn closed 9 years ago

kjnsn commented 10 years ago

How would the concept of a "process" fit in with the kernel? How would I start one? And how would a restricted set of functionality be given to a process?

I think it would be useful to have a central process manager; this need not be complicated.

Would processes inherit their parents "environment"? This is an incredibly useful feature on UNIX, as it allows you to configure programs on the fly.

iefserge commented 10 years ago

Userspace process manager APIs are still in development, but current internal kernel API to start process looks like this (depends on resources module)

resources.processManager.create(rt.initrdText("/app/test.js"), arguments);

And how would a restricted set of functionality be given to a process? Would processes inherit their parents "environment"?

You need to provide everything process needs in it's arguments object. This includes system resources, interfaces, environment, command line etc.

iefserge commented 9 years ago

Closing this, now we have isolates instead of processes. Yay! Note: Isolate creation APIs are still in development.