Search found 13 matches
- Mon Aug 27, 2018 8:09 pm
- Forum: General Discussion and Questions
- Topic: Process isolation
- Replies: 32
- Views: 20228
Re: Process isolation
@jockm I know you care about this but this does fit under the "Process Isolation" theme if you want to launch a .py within a .py and have them be isolated. https://github.com/micropython/micropython/issues/4081 Scoped allocation No, but it is very interesting and very cool. Thanks for pointing that...
- Mon Aug 27, 2018 3:35 pm
- Forum: General Discussion and Questions
- Topic: Process isolation
- Replies: 32
- Views: 20228
Re: Process isolation
Since you're OK with having lightweight OS, the changes you're looking to be made are pretty trivial. The state of an interpreter aka VM is contained in two things: 1. mp_state_ctx_t mp_state_ctx; 2. the heap passed to gc_init() The following changes need to be made: The MP_STATE*() macros all refe...
- Mon Aug 27, 2018 3:24 pm
- Forum: General Discussion and Questions
- Topic: Process isolation
- Replies: 32
- Views: 20228
Re: Process isolation
The bigger reason why this’ll get rejected is the still unjustified requirement for spawning to occur at the C-level. This means more infrastructure will need to be added to manage the applets with one C-API. Why is this unjustified? Just because it can be done doesn't mean you've provided a reason...
- Mon Aug 27, 2018 1:19 pm
- Forum: General Discussion and Questions
- Topic: Process isolation
- Replies: 32
- Views: 20228
Re: Process isolation
The bigger reason why this’ll get rejected is the still unjustified requirement for spawning to occur at the C-level. This means more infrastructure will need to be added to manage the applets with one C-API. Why is this unjustified? If it can be done at C-Level then you can make a module that does...
- Mon Aug 27, 2018 1:16 pm
- Forum: General Discussion and Questions
- Topic: Process isolation
- Replies: 32
- Views: 20228
Re: Process isolation
Besides that and everywhere MP_STATE* macros are used, you also have to add code to vm.c to switch the execution between the applets. I see exactly no need for this. Please explain why you think it would be required. If you have multiple VMs, you want them to execute simultaneously from the perspec...
- Mon Aug 27, 2018 5:14 am
- Forum: General Discussion and Questions
- Topic: Process isolation
- Replies: 32
- Views: 20228
Re: Process isolation
I see exactly no need for this. Please explain why you think it would be required.
- Mon Aug 27, 2018 5:10 am
- Forum: General Discussion and Questions
- Topic: Process isolation
- Replies: 32
- Views: 20228
Re: Process isolation
If you want memory isolation, you need separate heaps without question, case closed on that topic. Well heap is a specific term. If you don't have heavyweight processes you only have one heap. What is common in embedded systems is to have memory pools that are allocated within the heap and then pro...
- Sun Aug 26, 2018 9:24 pm
- Forum: General Discussion and Questions
- Topic: Process isolation
- Replies: 32
- Views: 20228
Re: Process isolation
Why isn’t it just a small refactor? Everywhere the macros MP_STATE_* are used is what you’d have to modify. Not so much. Take a look at how memory is allocated and you will see it assumes a single memory pool which isn't desirable for multiple instances in an embedded application. Imagine you have ...
- Sat Aug 25, 2018 9:45 pm
- Forum: General Discussion and Questions
- Topic: Process isolation
- Replies: 32
- Views: 20228
Re: Process isolation
There was an effort to port MicroPython to mbed , but unfortunately it seems to have stalled shortly after it began in 2016. And anyway it was based on the obsolete old mbed not on the current mbed OS. But, AFAICS, this shows that in theory it should be possible to run MicroPython as a thread under...
- Sat Aug 25, 2018 8:02 pm
- Forum: General Discussion and Questions
- Topic: Process isolation
- Replies: 32
- Views: 20228
Re: Process isolation
In my other post I explained a use case for wanting multiple interpreters — to achieve isolation. Here I was asking if there was some other way to do this, and was told to use multiple processes to run multiple interpreters; and you know my response to that. I thought I would ask in case there were ...