Chapo144
Chapo144

Reputation: 102

How Dart Isolates are implemented under the hood

I know Dart VM creates and manages the Isolates allocating a unique memory heap to each isolate. But at the end on OS level every program is executing in form of Processes and Threads. This makes me very confused about Isolates. No docs or articles I found helpful this far.

On my machine like I launched 10000 isolates which Future.delayed for 30s and stopped. But I found out 0 increase in number of running processes and a non linear increase in number of threads(which might or might not be related to number of running isolates). There were total 315 running processes on my PC before, during, after execution of program. Although Threads got increased but only by few hundreds to thousands but definitely not 10000.

How does a Dart code with Isolates executes from the OS point of view ? Further it would be really helpful if someone can point me to the specific source code implementation where Dart VM is managing Isolates on OS level something like calling OS APIs.

Upvotes: 0

Views: 68

Answers (0)

Related Questions